diff --git a/resources/views/customers/info.blade.php b/resources/views/customers/info.blade.php index 7d8fdfc..75894b4 100644 --- a/resources/views/customers/info.blade.php +++ b/resources/views/customers/info.blade.php @@ -231,7 +231,7 @@
- +
@@ -528,6 +528,27 @@ minimumFractionDigits: 2 }); + function checkCanChangeGadaianDetail(norujukan){ + let gadai_tawarruq = fetch(api_url + '/api/gadai/norujukan/' + norujukan ); + + gadai_tawarruq + .then(response => response.json()) + .then(response => response[0][0]) + .then(gadaian => { + return gadaian.historygadaian; + }) + .then(historygadaian => { + let button_edit_gadaian = document.querySelector('#button-edit-gadaian'); + + if(historygadaian === '0' || historygadaian === null || historygadaian.length === 0) { + button_edit_gadaian.disabled = false; + return; + } + + button_edit_gadaian.disabled = true; + }) + } + function checkserah(data){ var urlpenebusan = $(data).data("url"); var norujukan = $(data).data("norujukan"); @@ -781,8 +802,12 @@ }else{ var taglel = ''; } + + let table_norujukan = gadai_detail["norujukan"]; + let radio_action = "onclick=checkCanChangeGadaianDetail(" + "'" + table_norujukan + "'" + ")"; + xtawarruq.row.add([ - '', + '', '' + gadai_detail['norujukan'] + '', gadai_detail['t_gadai'], tarikh_matang, @@ -799,7 +824,7 @@ if(tagarrahnbid == 1){ $.ajax({ method:"GET", - async:false, + async:false, url:api_arrahnbid + 'portalApi?norujukan=' + gadai_detail['norujukan'], success: function(data){ @@ -822,8 +847,11 @@ } } + let table_norujukan = gadai_detail["norujukan"]; + let radio_action = "onclick=checkCanChangeGadaianDetail(" + "'" + table_norujukan + "'" + ")"; + tablegadai.row.add([ - '', + '', '' + gadai_detail['norujukan'] + '', gadai_detail['t_gadai'], tarikh_matang, @@ -2397,7 +2425,7 @@ allowOutsideClick: false, }); } - + }, error: function (request, status, error) { alert(request.responseText); diff --git a/resources/views/khazanah/laporan/ansuran.blade.php b/resources/views/khazanah/laporan/ansuran.blade.php index 5d7fa10..2e93c50 100644 --- a/resources/views/khazanah/laporan/ansuran.blade.php +++ b/resources/views/khazanah/laporan/ansuran.blade.php @@ -9,7 +9,6 @@ @@ -45,15 +44,19 @@ Nama No K/P Tempoh - Baki Pembiayaan - Bayaran - Keuntungan + Baki Pembiayaan (RM) + Bayaran (RM) + Ujrah (RM) + Keuntungan 1% (RM) + Keuntungan (RM) TOTAL + + @@ -114,6 +117,8 @@ var total_pinjaman = 0; var total_bayaran = 0; var total_keuntungan = 0; + var total_ansuranujrah = 0; + var total_ansuranonepercent = 0; tabletebus.clear().draw(); $.each(data,function(index,tebus){ $.ajax({ @@ -127,6 +132,9 @@ total_pinjaman += Number(gadai[0][0]['bakipjm']); total_bayaran += Number(tebus['duit_masuk']); total_keuntungan += Number(tebus['bayaran_keuntungan']); + total_ansuranujrah += Number(tebus['ansuranujrah']); + total_ansuranonepercent += Number(tebus['ansuranonepercent']); + tabletebus.row.add([ counter, tebus['norujukan'], @@ -135,15 +143,23 @@ gadai[0][0]['tempoh'], gadai[0][0]['bakipjm'], tebus['duit_masuk'], + tebus['ansuranujrah'], + tebus['ansuranonepercent'], tebus['bayaran_keuntungan'] ]).draw(); $('#pinjamantotal').text(formatter.format(total_pinjaman.toFixed(2))); $('#bayarantotal').text(formatter.format(total_bayaran.toFixed(2))); + $('#ansuranujrahtotal').text(formatter.format(total_ansuranujrah.toFixed(2))); + $('#ansuranonepercenttotal').text(formatter.format(total_ansuranonepercent.toFixed(2))); $('#keuntungantotal').text(formatter.format(total_keuntungan.toFixed(2))); + + counter = counter + 1; } }); } }); + + }); } diff --git a/resources/views/khazanah/laporan/index.blade.php b/resources/views/khazanah/laporan/index.blade.php index 56fee70..e033d5c 100644 --- a/resources/views/khazanah/laporan/index.blade.php +++ b/resources/views/khazanah/laporan/index.blade.php @@ -90,7 +90,7 @@
- Ansuran + Ansuran
Stok Audit diff --git a/resources/views/print/laporan_ansuran.blade.php b/resources/views/print/laporan_ansuran.blade.php index 3fe8880..a0f6f69 100644 --- a/resources/views/print/laporan_ansuran.blade.php +++ b/resources/views/print/laporan_ansuran.blade.php @@ -203,99 +203,154 @@ No Rujukan Nama No K/P + Tarikh Bayaran Tempoh Baki Pembiayaan (RM) Bayaran Pemb. (RM) + Ujrah(RM) + Keuntungan 1% (RM) Keuntungan (RM) Bayaran (RM) - @php $counter = 1;$totalduitmasuk = 0;$totalkeuntungan = 0; $totalpendahuluan = 0;@endphp - @foreach($tebus as $index=>$item) - @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 + @php + $counter = 1; + $totalduitmasuk = 0; + $totalkeuntungan = 0; + $totalpendahuluan = 0; + $totalujrah = 0; + $totalonepercent = 0; +@endphp +@foreach($tebus as $index=>$item) +@php + $totalduitmasuk += $item['duit_masuk']; + $totalkeuntungan += $item['bayaran_keuntungan']; + $totalpendahuluan += $item['bayaran_pembiayaan']; + $totalujrah += bcdiv(round($item['ansuranujrah'],2),1,1); + $totalonepercent += bcdiv(round($item['ansuranonepercent'],2),1,1); +@endphp + +@if($index > 0) +@if($item['teller'] != $tebus[$index - 1]['teller']) + + Teller : {{ $item['teller'] }} + + @php + $totaldmteller = 0; + $totalupahteller = 0; + $totalpendhteller = 0; + $totalujrahteller = 0; + $totalonepercentteller = 0; + @endphp +@endif +@else + + Teller : {{ $item['teller'] }} + + @php + $totaldmteller = 0; + $totalupahteller = 0; + $totalpendhteller = 0; + $totalujrahteller = 0; + $totalonepercentteller = 0; + @endphp +@endif + +{{ $counter }} +{{$item['norujukan']}} +{{ $item['nama'] }} +{{ $item['nokp'] }} + @php + $myDateTime = DateTime::createFromFormat('Y-m-d H:i:s', $item['tarikh_bayaran']); + $formattedweddingdate = $myDateTime->format('d-m-Y'); + echo($formattedweddingdate) +@endphp +{{ $item['tempoh'] }} +{{ number_format($item['bakipjm'],2) }} +{{ number_format($item['bayaran_pembiayaan'],2) }} +{{ number_format(bcdiv(round($item['ansuranujrah'],2),1,1),2) }} +{{ number_format(bcdiv(round($item['ansuranonepercent'],2),1,1),2) }} +{{ number_format($item['bayaran_keuntungan'],2) }} +{{ number_format($item['duit_masuk'],2) }} + +@php $counter++; @endphp +@php + $totaldmteller += $item['duit_masuk']; + $totalupahteller += $item['bayaran_keuntungan']; + $totalpendhteller += $item['bayaran_pembiayaan']; + $totalujrahteller += bcdiv(round($item['ansuranujrah'],2),1,1); + $totalonepercentteller += bcdiv(round($item['ansuranonepercent'],2),1,1); +@endphp + +@if($index+1 < sizeof($tebus)) + @if($item['teller'] != $tebus[$index + 1]['teller']) + + {{ $counter-1 }} Jumlah Bagi Teller : {{ $item['teller'] }} + {{ number_format($totalpendhteller,2) }} + {{ number_format($totalujrahteller,2) }} + {{ number_format($totalonepercentteller,2) }} + {{ number_format($totalupahteller,2) }} + {{ number_format($totaldmteller,2) }} + + @php + $counter = 1; + $totaldmteller = 0; + $totalupahteller = 0; + $totalpendhteller = 0; + @endphp @endif - - {{ $counter }} - {{$item['norujukan']}} - {{ $item['nama'] }} - {{ $item['nokp'] }} - {{ $item['tempoh'] }} - {{ number_format($item['bakipjm'],2) }} - {{ number_format($item['bayaran_pembiayaan'],2) }} - {{ number_format($item['bayaran_keuntungan'],2) }} - {{ number_format($item['duit_masuk'],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($totalpendhteller,2) }} - {{ number_format($totalupahteller,2) }} - {{ number_format($totaldmteller,2) }} - - @php $counter = 1;$totaldmteller = 0;$totalupahteller = 0;$totalpendhteller = 0;@endphp - @endif - @else - - {{ $counter-1 }} Jumlah Bagi Teller : {{ $item['teller'] }} - {{ number_format($totalpendhteller,2) }} - {{ number_format($totalupahteller,2) }} - {{ number_format($totaldmteller,2) }} - - @endif - @endforeach +@else + + {{ $counter-1 }} Jumlah Bagi Teller : {{ $item['teller'] }} + {{ number_format($totalpendhteller,2) }} + {{ number_format($totalujrahteller,2) }} + {{ number_format($totalonepercentteller,2) }} + {{ number_format($totalupahteller,2) }} + {{ number_format($totaldmteller,2) }} + +@endif +@endforeach

- - - - - - - - - - - - + + + + + + + + + + + + + + + +
Bayaran Pemb. (RM)Keuntungan (RM)Bayaran (RM)
JUMLAH KESELURUHAN{{ number_format($totalpendahuluan,2) }}{{ number_format($totalkeuntungan,2) }}{{ number_format($totalduitmasuk,2) }}
Bayaran Pemb. (RM)Ujrah (RM)Keuntungan 1% (RM)Keuntungan (RM)Bayaran (RM)
JUMLAH KESELURUHAN{{ number_format($totalpendahuluan,2) }}{{ number_format($totalujrah,2) }}{{ number_format($totalonepercent,2) }}{{ number_format($totalkeuntungan,2) }}{{ number_format($totalduitmasuk,2) }}




- - - - - - - - - - - - - - + + + + + + + + + + + + + +
.................................................................. ..................................................................
DI SEMAK DI SAHKAN
.................................................................. ..................................................................
DI SEMAK DI SAHKAN
- diff --git a/resources/views/print/laporan_stokauditbackdate.blade.php b/resources/views/print/laporan_stokauditbackdate.blade.php index 3d9017d..4b18c6b 100644 --- a/resources/views/print/laporan_stokauditbackdate.blade.php +++ b/resources/views/print/laporan_stokauditbackdate.blade.php @@ -204,11 +204,14 @@ Pembiayaan Asal (RM) Baki Pembiayaan (RM) Kadar Upah - Tempoh Belum Bayar - Keuntungan Belum Bayar (RM) + Tempoh B.Bayar + Untung B.Bayar(RM) + Utg 1%(RM) + Ujrah(RM) Lanjutan @php $counter = 1;$totalpinjaman = 0; @endphp + {{-- {{dd($stokaudit['rekod'])}} --}} @foreach($stokaudit['rekod'] as $index=>$item) {{ $counter }} @@ -220,8 +223,13 @@ {{ number_format($item['pinjaman'],2) }} {{ number_format($item['bakipjm'],2) }} {{ number_format($item['kadarupah'],2) }} - {{ number_format($item['tempohblmbyar'],2) }} + {{ number_format($item['tempohblmbyar'],2) }} {{ number_format($item['upahblmbyar'],2) }} + {{ number_format($item['pinjaman']* 0.01,2) }} + @if($item['ujrah'] ='') + {{ number_format($item['ujrah'],2) }} + @endif + {{$item['lanjutan']}} @php $counter++; @endphp