groupby laporan perbelanjaan mengikut jenis perbelanjaan

This commit is contained in:
unknown
2024-09-02 16:41:04 +08:00
parent c1df8012f4
commit fc0c01667a
@@ -1,4 +1,5 @@
<style>
#header {
font-family: Arial, Helvetica, sans-serif;
border-collapse: collapse;
@@ -172,7 +173,7 @@
<table id="scan">
<tr>
<th colspan ="5"><b>LAPORAN WANG PERBELANJAAN</b></th>
<th colspan ="5"><b>LAPORAN WANG PERBELANJAAN test</b></th>
<th> </th>
<th> </th>
<th></th>
@@ -215,9 +216,15 @@
</table>
<br>
@php
$perbelanjaan = collect($perbelanjaan)->sortBy('kategori')->toArray();
$counter = 1;
$totalbayaran = 0;
@endphp
<table id="details">
<tr>
<th>Bil</th>
<th>Bil test</th>
<th>Tarikh</th>
<th>Kategori</th>
<th>Tuntutan Oleh</th>
@@ -225,8 +232,7 @@
<th>Baucer#</th>
<th>Jumlah (RM)</th>
</tr>
@php $counter = 1; $totalbayaran = 0;@endphp
@foreach($perbelanjaan as $index=>$item)
@foreach($perbelanjaan as $index => $item)
@php $totalbayaran += $item['bayaran']; @endphp
<tr>
<td>{{ $counter }}</td>
@@ -241,6 +247,7 @@
@endforeach
</table>
<h5 style="float:right;">JUMLAH KESELURUHAN BAYARAN : RM {{ number_format($totalbayaran,2) }}</h5>
<br>