diff --git a/resources/views/print/laporan_ansuran.blade.php b/resources/views/print/laporan_ansuran.blade.php index 223b3a6..99403f3 100644 --- a/resources/views/print/laporan_ansuran.blade.php +++ b/resources/views/print/laporan_ansuran.blade.php @@ -205,52 +205,78 @@ No K/P Tempoh Baki Pembiayaan (RM) + Bayaran Pemb. (RM) Bayaran (RM) Keuntungan (RM) - @php $counter = 1;$totalduitmasuk = 0;$totalkeuntungan = 0; @endphp + @php $counter = 1;$totalduitmasuk = 0;$totalkeuntungan = 0; $totalpendahuluan = 0;@endphp @foreach($tebus as $index=>$item) - @php $totalduitmasuk += $item['duit_masuk'];$totalkeuntungan += $item['bayaran_keuntungan']; @endphp + @php $totalduitmasuk += $item['duit_masuk'];$totalkeuntungan += $item['bayaran_keuntungan'];$totalpendahuluan += $item['bayaran_pembiayaan']; @endphp + @if($index > 0) + @if($item['teller'] != $tebus[$index - 1]['teller']) + + Teller : {{ $item['teller'] }} + + @php $totaldmteller = 0;$totalupahteller = 0;$totalpendhteller = 0; @endphp + @endif + @else + + Teller : {{ $item['teller'] }} + + @php $totaldmteller = 0;$totalupahteller = 0;$totalpendhteller = 0; @endphp + @endif {{ $counter }} {{$item['norujukan']}} - - @php - $gadai_detail = Http::get($api_url . '/api/gadai/norujukan/'. $item['norujukan'])->json(); - $customer_detail = Http::get($api_url . '/api/customers/' . $gadai_detail[0][0]['nokp'])->json(); - - echo $customer_detail['nama']; - @endphp - - {{ $gadai_detail[0][0]['nokp'] }} - {{ $gadai_detail[0][0]['tempoh'] }} - {{ number_format($gadai_detail[0][0]['bakipjm'],2) }} + {{ $item['nama'] }} + {{ $item['nokp'] }} + {{ $item['tempoh'] }} + {{ number_format($item['bakipjm'],2) }} + {{ number_format($item['bayaran_pembiayaan'],2) }} {{ number_format($item['duit_masuk'],2) }} {{ number_format($item['bayaran_keuntungan'],2) }} - @php $counter++; @endphp + @php $totaldmteller += $item['duit_masuk'];$totalupahteller += $item['bayaran_keuntungan'];$totalpendhteller += $item['bayaran_pembiayaan']; @endphp @if($index+1 < sizeof($tebus)) @if($item['teller'] != $tebus[$index + 1]['teller']) {{ $counter-1 }} Jumlah Bagi Teller : {{ $item['teller'] }} - {{ number_format($totalduitmasuk,2) }} - {{ number_format($totalkeuntungan,2) }} + {{ number_format($totalpendhteller,2) }} + {{ number_format($totaldmteller,2) }} + {{ number_format($totalupahteller,2) }} - @php $counter = 0; @endphp + @php $counter = 1;$totaldmteller = 0;$totalupahteller = 0;$totalpendhteller = 0;@endphp @endif @else {{ $counter-1 }} Jumlah Bagi Teller : {{ $item['teller'] }} - {{ number_format($totalduitmasuk,2) }} - {{ number_format($totalkeuntungan,2) }} + {{ number_format($totalpendhteller,2) }} + {{ number_format($totaldmteller,2) }} + {{ number_format($totalupahteller,2) }} @endif @endforeach -
-
+

+ + + + + + + + + + + + + +
Bayaran Pemb. (RM)Bayaran (RM)Keuntungan (RM)
JUMLAH KESELURUHAN{{ number_format($totalpendahuluan,2) }}{{ number_format($totalduitmasuk,2) }}{{ number_format($totalkeuntungan,2) }}
+ +

+

diff --git a/resources/views/print/laporan_penebusan.blade.php b/resources/views/print/laporan_penebusan.blade.php index ef7621e..2901ae9 100644 --- a/resources/views/print/laporan_penebusan.blade.php +++ b/resources/views/print/laporan_penebusan.blade.php @@ -198,10 +198,10 @@ - - + + @@ -229,21 +229,17 @@ - + @@ -334,8 +330,6 @@
Norujukan Nama No KPT GadaiT TebusMasa JBG J TebusNilai Marhun(RM) Pembiayaan(RM) Upah/Keuntungan(RM) Bayaran(RM){{ $item['nama'] }} {{ $item['nokp'] }} - @php - $myDateTime = DateTime::createFromFormat('Y-m-d', $item['t_gadai']); - $formattedweddingdate = $myDateTime->format('d-m-Y'); - echo($formattedweddingdate); - @endphp - - @php - $myDateTime = DateTime::createFromFormat('Y-m-d', $item['t_tebus']); - $formattedweddingdate = $myDateTime->format('d-m-Y'); - echo($formattedweddingdate); + @php + $dt = new DateTime($item['tarikh_bayaran']); + $time = $dt->format('h:i:s'); + echo date($time); @endphp {{ $item['jbg'] }} {{$item['jenistebus']}} + {{ number_format($item['nilaimarhun'],2) }} + {{ number_format($item['pinjaman'],2) }} {{ number_format($item['bakiupah'],2) }} {{ number_format($item['bakipjm'],2) }}
-{{--
JUMLAH KESELURUHAN BAYARAN : RM {{ number_format($totalbayaran,2) }}
--}} -

diff --git a/resources/views/print/laporan_upah.blade.php b/resources/views/print/laporan_upah.blade.php index cfb975b..4c6316b 100644 --- a/resources/views/print/laporan_upah.blade.php +++ b/resources/views/print/laporan_upah.blade.php @@ -221,13 +221,13 @@ - - - + + + @php $counter = 1; $totalbayaran = 0; $totalpembiayaan = 0; $totalpembiayaanteller = 0; $totalbayaranteller = 0; @endphp @foreach($advansur as $index=>$item) - @php $totalbayaran += $item['upahDibayar']; $totalpembiayaan += $item['pinjaman'];$totalbayaranteller += $item['upahDibayar']; $totalpembiayaanteller += $item['pinjaman']; @endphp + @php $totalbayaran += $item['upahDibayar']; $totalpembiayaan += $item['pinjaman']; @endphp @if($index > 0) @if($item['teller'] != $advansur[$index - 1]['teller']) @@ -242,32 +242,30 @@ @php $counter = 1;$totalpembiayaanteller = 0; $totalbayaranteller = 0; @endphp @endif - - + @php $counter++; @endphp + @php $totalbayaranteller += $item['upahDibayar']; $totalpembiayaanteller += $item['pinjaman']; @endphp @if($index+1 < sizeof($advansur)) @if($item['teller'] != $advansur[$index + 1]['teller']) - + - @php @endphp @endif @else - + - @endif
Tarikh No Rujukan TellerPinjamanJBGUpah DibayarTempohPembiayaan (RM)Upah Dibayar (RM)
{{ $counter }} {{ $item['tarikh'] }} {{ $item['norujukan'] }} {{ $item['teller'] }}{{ number_format($item['pinjaman'],2) }} {{ $item['jbg'] }}{{ number_format($item['pinjaman'],2) }} {{ number_format($item['upahDibayar'],2) }}
{{ $counter-1 }} Jumlah Bagi Teller : {{ $item['teller'] }}{{ $counter-1 }} Jumlah Bagi Teller : {{ $item['teller'] }} {{ number_format($totalpembiayaanteller,2) }} {{ number_format($totalbayaranteller,2) }}
{{ $counter-1 }} Jumlah Bagi Teller : {{ $item['teller'] }}{{ $counter-1 }} Jumlah Bagi Teller : {{ $item['teller'] }} {{ number_format($totalpembiayaanteller,2) }} {{ number_format($totalbayaranteller,2) }}