diff --git a/app/Http/Controllers/AliranTunaiController.php b/app/Http/Controllers/AliranTunaiController.php index c44ee73..81acc37 100644 --- a/app/Http/Controllers/AliranTunaiController.php +++ b/app/Http/Controllers/AliranTunaiController.php @@ -399,7 +399,7 @@ class AliranTunaiController extends Controller if($teb['tagterima'] === 1){ if($teb['jenistebus'] === 'S') { - $totaltebusbarcodescanned += $teb['pinjaman'] + $teb['bakiupah']; + $totaltebusbarcodescanned += $teb['gadaibakipjm'] + $teb['bakiupah']; }else{ $totaltebusbarcodescanned += $teb['bakipjm']; } @@ -407,7 +407,7 @@ class AliranTunaiController extends Controller if($teb['jenistebus'] === 'S') { - $totaltebus += $teb['pinjaman'] + $teb['bakiupah']; + $totaltebus += $teb['gadaibakipjm'] + $teb['bakiupah']; }else{ $totaltebus += $teb['bakipjm']; } diff --git a/app/Http/Controllers/GadaianController.php b/app/Http/Controllers/GadaianController.php index 4365020..22e9b3d 100644 --- a/app/Http/Controllers/GadaianController.php +++ b/app/Http/Controllers/GadaianController.php @@ -304,7 +304,7 @@ class GadaianController extends Controller $cawangan_detail = $cawangan[0]; - $pembayaran_segera = "https://e-arrahn.com.my/pembayaransegeraqrreader?norujukan=".$norujukan; + $pembayaran_segera = "https://spare.arrahn.com.my/pembayaransegera"; return view('print.sag',compact('gadai_detail','customer_detail','marhun_detail','cawangan_detail','api_url','pembayaran_segera','auth_username')); } @@ -349,14 +349,7 @@ class GadaianController extends Controller // if(sizeof($customers_info) != 0) // $customers_info = $customers_info[0]; - if($penebusan['nowakil']) - { - $wakil = Http::get(config('api.url') . '/api/getwakil/' . $auth_user['cawangan'] . '/code/' . $penebusan['nowakil'])->json(); - if(sizeof($wakil) != 0) - $wakil = $wakil[0]; - } - - return view('print.resitansuran',compact('transaction','gadai','customers_info','wakil')); + return view('print.resitansuran',compact('transaction','gadai','customers_info')); } public function resitbelumansurans($id) diff --git a/app/Http/Controllers/KhazanahController.php b/app/Http/Controllers/KhazanahController.php index d5d32bf..f830989 100644 --- a/app/Http/Controllers/KhazanahController.php +++ b/app/Http/Controllers/KhazanahController.php @@ -2739,7 +2739,7 @@ class KhazanahController extends Controller $gadai_date = $split_date[2] . '-' . $split_date[1] . '-' . $split_date[0]; } - $tuntutbaki = Http::get(config('api.url'). '/api/TuntutBaki/'. $auth_user['cawangan'] ,['tarikh' => $gadai_date])->json(); + $tuntutbaki = Http::get(config('api.url'). '/api/TuntutBakiTarikh/'. $auth_user['cawangan'] ,['tarikh' => $gadai_date])->json(); $cawangan=Http::get(config('api.url').'/api/cawangan/detail/'.$auth_user['cawangan'])->json(); $cawangan_detail=$cawangan[0]; diff --git a/resources/views/customers/info.blade.php b/resources/views/customers/info.blade.php index 11506d8..a4d0f2f 100644 --- a/resources/views/customers/info.blade.php +++ b/resources/views/customers/info.blade.php @@ -462,7 +462,7 @@ }); var tablegadai = $('#myTable').DataTable({ - "scrollX": true + "scrollX": false }); var xtawarruq = $('#xtawarruq').DataTable({ @@ -473,7 +473,7 @@ }); var tablelelong = $('#lelongTable').DataTable({ - "scrollX": true + "scrollX": false }); var historybayarandatatable = $('#tablehistorybayaran').DataTable({ @@ -1595,6 +1595,9 @@ } } else { + + return false; + $.ajax({ method:'get', url: api_url + '/api/upahlamatoday/' + kodcaw + '/' + hapusid, diff --git a/resources/views/homepage/khazanah/home.blade.php b/resources/views/homepage/khazanah/home.blade.php index 6b9214b..304efd9 100644 --- a/resources/views/homepage/khazanah/home.blade.php +++ b/resources/views/homepage/khazanah/home.blade.php @@ -159,7 +159,7 @@
Kakitangan diff --git a/resources/views/khazanah/laporan/index.blade.php b/resources/views/khazanah/laporan/index.blade.php index e7523d6..91eef50 100644 --- a/resources/views/khazanah/laporan/index.blade.php +++ b/resources/views/khazanah/laporan/index.blade.php @@ -20,7 +20,7 @@ Gadaian
Pelanggan Baru diff --git a/resources/views/khazanah/laporan/tuntutbaki.blade.php b/resources/views/khazanah/laporan/tuntutbaki.blade.php index 5cd425f..8c97193 100644 --- a/resources/views/khazanah/laporan/tuntutbaki.blade.php +++ b/resources/views/khazanah/laporan/tuntutbaki.blade.php @@ -85,7 +85,7 @@ var today_date = current_year + '-' +current_month+'-'+current_date; $.ajax({ method:'get', - url: api_url + '/api/TuntutBaki/'+kodcaw, + url: api_url + '/api/TuntutBakiTarikh/'+kodcaw, data:{'tarikh' : today_date }, success: function(tuntutbaki){ console.log(tuntutbaki); @@ -100,7 +100,7 @@ var today_date = split_date[2] + '-' +split_date[1]+'-'+split_date[0]; $.ajax({ method:'get', - url: api_url + '/api/TuntutBaki/'+kodcaw, + url: api_url + '/api/TuntutBakiTarikh/'+kodcaw, data:{'tarikh' : today_date }, success: function(tuntutbaki){ gadaitable(tuntutbaki); diff --git a/resources/views/penebusan/index.blade.php b/resources/views/penebusan/index.blade.php index 5e87877..91d1d5f 100644 --- a/resources/views/penebusan/index.blade.php +++ b/resources/views/penebusan/index.blade.php @@ -768,7 +768,7 @@ break; case "S": - $("#terima_transaksi").prop('disabled', false); + $("#terima_transaksi").prop('disabled', true); $('input[type="checkbox"]').show(); $('span.spannar').hide(); @@ -792,7 +792,7 @@ break; case "P": - $("#terima_transaksi").prop('disabled', false); + $("#terima_transaksi").prop('disabled', true); $('input[type="checkbox"]').hide(); $('span.spannar').show(); @@ -835,7 +835,7 @@ $('#perludibayar').val(formatter.format(jumupah)); break; case "AT": - $("#terima_transaksi").prop('disabled', true); + $("#terima_transaksi").prop('disabled', false); $('input[type="checkbox"]').hide(); $('span.spannar').show(); @@ -1846,270 +1846,298 @@ var marginsemasa = pinjaman_baru/nmsemasa * 100; - if(marginsemasa < 10) - { - $("#terima_transaksi").prop('disabled', false); - Swal.fire('Amaran!','Margin Pembiayaan kurang daripada 10%!','error'); - return false; - } - - if(marginsemasa > 80) - { - $("#terima_transaksi").prop('disabled', false); - Swal.fire('Amaran!','Margin Pembiayaan lebih daripada 80%!','error'); - return false; - } - - if(marginsemasa > 70 && marginsemasa <= 75){ - - const swalWithBootstrapButtons = Swal.mixin({ - customClass: { - confirmButton: 'btn btn-success', - cancelButton: 'btn btn-danger' - }, - buttonsStyling: false - }); - - swalWithBootstrapButtons.fire({ - title: 'Dapatkan Pengesahan Khazanah', - text: "Tetapan margin melebihi 70% untuk Khazanah!", - icon: 'info', - showCancelButton: true, - confirmButtonText: 'Hantar', - cancelButtonText: 'Batal', - reverseButtons: true - }).then((result) => { - if (result.isConfirmed) { - - let nm = $('#nilai_marhun_total').text();let ber = $('#berat_marhun_total').text();let marg = marginsemasa; - let komen = "Pembiayaan Melebihi Margin 70%|" + nmsemasa + "|" + ber + "|" + marg + "| Auto Tawarruq"; - let teller = "{{ Auth::user()->name }}"; - + $.ajax({ + method:'get', + url: api + '/api/komuditi/check', + success:function(komoditi){ + var check_komuditi = Object.keys(komoditi).length; + if(check_komuditi == 0){ + $("#terima_transaksi").prop('disabled', false); Swal.fire({ - title: 'Tunggu Pengesahan Daripada Khazanah.', - icon: 'info', - width: 600, - padding: '3em', - background: '#fffff', - showCancelButton: false, - showConfirmButton: false, - allowOutsideClick: false, - allowEscapeKey: false, - allowEnterKey: false - }) - let siricreated = 0; - $.ajax({ - method:'post', - url: "{{ route('khazanah.createkelulusan') }}", - data: { - "_token": "{{ csrf_token() }}", - "norujukan" : norujukan, - "komen" : komen, - "jumpinjam" : pinjaman_baru, - "teller" : teller - }, - success:function(data){ - siricreated = data; - }, - error: function(xhr, status, error) { - var err = eval("(" + xhr.responseText + ")"); - alert(xhr.responseText); + icon: 'error', + title: 'Unit Komuditi Berbaki Minumum', + text: 'Sila Hubungi Operasi Untuk Membuat Pembelian Komuditi' + }); + event.preventDefault(); + return false; + }else{ + if(Number(komoditi['unit_komuditi']) < pinjaman_baru){ + $("#terima_transaksi").prop('disabled', false); + Swal.fire({ + icon: 'error', + title: 'Baki Unit Komuditi Tidak Mencukupi', + text: 'Sila Hubungi Operasi Untuk Membuat Pembelian Komuditi' + }); + event.preventDefault(); + return false; + }else{ + if(marginsemasa < 10) + { + $("#terima_transaksi").prop('disabled', false); + Swal.fire('Amaran!','Margin Pembiayaan kurang daripada 10%!','error'); + return false; } - }); - var pusher = new Pusher("{{ env('PUSHER_APP_KEY') }}", { + if(marginsemasa > 80) + { + $("#terima_transaksi").prop('disabled', false); + Swal.fire('Amaran!','Margin Pembiayaan lebih daripada 80%!','error'); + return false; + } + + if(marginsemasa > 70 && marginsemasa <= 75){ + + const swalWithBootstrapButtons = Swal.mixin({ + customClass: { + confirmButton: 'btn btn-success', + cancelButton: 'btn btn-danger' + }, + buttonsStyling: false + }); + + swalWithBootstrapButtons.fire({ + title: 'Dapatkan Pengesahan Khazanah', + text: "Tetapan margin melebihi 70% untuk Khazanah!", + icon: 'info', + showCancelButton: true, + confirmButtonText: 'Hantar', + cancelButtonText: 'Batal', + reverseButtons: true + }).then((result) => { + if (result.isConfirmed) { + + let nm = nmsemasa;let ber = $('#berat_marhun_total').text();let marg = marginsemasa; + let komen = "Pembiayaan Melebihi Margin 70%|" + nmsemasa + "|" + ber + "|" + marg + "| Auto Tawarruq"; + let teller = "{{ Auth::user()->name }}"; + + Swal.fire({ + title: 'Tunggu Pengesahan Daripada Khazanah.', + icon: 'info', + width: 600, + padding: '3em', + background: '#fffff', + showCancelButton: false, + showConfirmButton: false, + allowOutsideClick: false, + allowEscapeKey: false, + allowEnterKey: false + }) + let siricreated = 0; + $.ajax({ + method:'post', + url: "{{ route('khazanah.createkelulusan') }}", + data: { + "_token": "{{ csrf_token() }}", + "norujukan" : norujukan, + "komen" : komen, + "jumpinjam" : pinjaman_baru, + "teller" : teller + }, + success:function(data){ + siricreated = data; + }, + error: function(xhr, status, error) { + var err = eval("(" + xhr.responseText + ")"); + alert(xhr.responseText); + } + }); + + var pusher = new Pusher("{{ env('PUSHER_APP_KEY') }}", { + cluster: 'ap1', + encrypted: true + }); + + var channel = pusher.subscribe('notice-kelulusan'); + channel.bind('my-kelulusan', function(data) { + + + if(data.norujukan == norujukan && data.siri == siricreated && data.teller == teller) + { + if(data.kelulusan == 'lulus') + { + Swal.fire({ + icon: 'success', + title: 'Telah Disahkan', + text: `Komen : ${data.komen}` + }).then(function(){ + gadaiautotawarruq(); + }); + + } + else if(data.kelulusan == 'batal') + { + Swal.fire({ + icon: 'warning', + title: 'Telah Dibatalkan', + text: `Komen : ${data.komen}` + }).then(function(){ + return false; + }); + } + } + + + + }); + + + } else if (result.dismiss === Swal.DismissReason.cancel) { + $("#terima_transaksi").prop('disabled', false); + swalWithBootstrapButtons.fire( + 'Gagal', + 'Gagal mendapatkan kelulusan khazanah', + 'error' + ) + } + }); + event.preventDefault(); + return false; + + }else if((marginsemasa > 75 && marginsemasa <= 80) || pinjaman_baru >= 10000){ + + const swalWithBootstrapButtons = Swal.mixin({ + customClass: { + confirmButton: 'btn btn-success', + cancelButton: 'btn btn-danger' + }, + buttonsStyling: false + }); + + let text = ''; + if(marginsemasa > 75 && marginsemasa <= 80) + { + text = 'Tetapan margin melebihi 75% untuk Operasi!'; + }else if(pinjaman_baru >= 10000) + { + text = 'Pembiayaan melebihi RM 10,000!'; + } + + + swalWithBootstrapButtons.fire({ + title: 'Dapatkan Pengesahan Operasi', + text: text, + icon: 'info', + showCancelButton: true, + confirmButtonText: 'Hantar', + cancelButtonText: 'Batal', + reverseButtons: true + }).then((result) => { + if (result.isConfirmed) { + + let nm = $('#nilai_marhun_total').text();let ber = $('#berat_marhun_total').text();let marg = marginsemasa; + let komen = ''; + if(marginsemasa > 75 && marginsemasa <= 80) + { + komen = "Pembiayaan Melebihi Margin 75%|" + nmsemasa + "|" + ber + "|" + marg + "| Auto Tawarruq"; + }else if(pinjamanbaru >= 10000) + { + komen = "Pembiayaan Melebihi RM 10,000|" + nmsemasa + "|" + ber + "|" + marg + "| Auto Tawarruq"; + } + + let jumpinjam = $('#bakipinjaman').val().replace(/[^0-9.-]+/g,""); + let teller = "{{ Auth::user()->name }}"; + + Swal.fire({ + title: 'Tunggu Pengesahan Daripada Khazanah-Operasi.', + icon: 'info', + width: 600, + padding: '3em', + background: '#fffff', + showCancelButton: false, + showConfirmButton: false, + allowOutsideClick: false, + allowEscapeKey: false, + allowEnterKey: false + }) + let siricreated = 0; + $.ajax({ + method:'post', + url: "{{ route('operasi.createkelulusan') }}", + data: { + "_token": "{{ csrf_token() }}", + "norujukan" : norujukan, + "komen" : komen, + "jumpinjam" : pinjaman_baru, + "teller" : teller + }, + success:function(data){ + siricreated = data; + }, + error: function(xhr, status, error) { + var err = eval("(" + xhr.responseText + ")"); + alert(xhr.responseText); + } + }); + + + var pusher = new Pusher("{{ env('PUSHER_APP_KEY') }}", { cluster: 'ap1', encrypted: true }); - var channel = pusher.subscribe('notice-kelulusan'); - channel.bind('my-kelulusan', function(data) { - + var channel = pusher.subscribe('notice-kelulusan'); + channel.bind('my-kelulusan', function(data) { + - if(data.norujukan == norujukan && data.siri == siricreated && data.teller == teller) - { - if(data.kelulusan == 'lulus') - { - Swal.fire({ - icon: 'success', - title: 'Telah Disahkan', - text: `Komen : ${data.komen}` - }).then(function(){ - gadaiautotawarruq(); - }); + if(data.norujukan == norujukan && data.siri == siricreated && data.teller == teller) + { + if(data.kelulusan == 'lulus') + { + Swal.fire({ + icon: 'success', + title: 'Telah Disahkan', + text: `Komen : ${data.komen}` + }).then(function(){ + gadaiautotawarruq(); + return true; + }); - } - else if(data.kelulusan == 'batal') - { - Swal.fire({ - icon: 'warning', - title: 'Telah Dibatalkan', - text: `Komen : ${data.komen}` - }).then(function(){ - return false; - }); - } + } + else if(data.kelulusan == 'batal') + { + Swal.fire({ + icon: 'warning', + title: 'Telah Dibatalkan', + text: `Komen : ${data.komen}` + }).then(function(){ + $("#terima_gadai").prop('disabled', false); + return false; + }); + } + } + + + + }); + + + }else if (result.dismiss === Swal.DismissReason.cancel){ + $("#terima_transaksi").prop('disabled', false); + swalWithBootstrapButtons.fire( + 'Gagal', + 'Gagal mendapatkan kelulusan operasi', + 'error' + ) + } + }); + event.preventDefault(); + return false; + + }else if(marginsemasa > 80){ + $("#terima_transaksi").prop('disabled', false); + Swal.fire( + 'Amaran!', + 'Pinjaman Haruslah Dalam Lingkungan 80%!', + 'error' + ) + return false; } - - - }); - - - } else if (result.dismiss === Swal.DismissReason.cancel) { - $("#terima_transaksi").prop('disabled', false); - swalWithBootstrapButtons.fire( - 'Gagal', - 'Gagal mendapatkan kelulusan khazanah', - 'error' - ) - } - }); - event.preventDefault(); - return false; - - }else if((marginsemasa > 75 && marginsemasa <= 80) || pinjaman_baru >= 10000){ - - const swalWithBootstrapButtons = Swal.mixin({ - customClass: { - confirmButton: 'btn btn-success', - cancelButton: 'btn btn-danger' - }, - buttonsStyling: false - }); - - let text = ''; - if(marginsemasa > 75 && marginsemasa <= 80) - { - text = 'Tetapan margin melebihi 75% untuk Operasi!'; - }else if(pinjaman_baru >= 10000) - { - text = 'Pembiayaan melebihi RM 10,000!'; - } - - - swalWithBootstrapButtons.fire({ - title: 'Dapatkan Pengesahan Operasi', - text: text, - icon: 'info', - showCancelButton: true, - confirmButtonText: 'Hantar', - cancelButtonText: 'Batal', - reverseButtons: true - }).then((result) => { - if (result.isConfirmed) { - - let nm = $('#nilai_marhun_total').text();let ber = $('#berat_marhun_total').text();let marg = marginsemasa; - let komen = ''; - if(marginsemasa > 75 && marginsemasa <= 80) - { - komen = "Pembiayaan Melebihi Margin 75%|" + nmsemasa + "|" + ber + "|" + marg + "| Auto Tawarruq"; - }else if(pinjamanbaru >= 10000) - { - komen = "Pembiayaan Melebihi RM 10,000|" + nmsemasa + "|" + ber + "|" + marg + "| Auto Tawarruq"; + gadaiautotawarruq(); } - - let jumpinjam = $('#bakipinjaman').val().replace(/[^0-9.-]+/g,""); - let teller = "{{ Auth::user()->name }}"; - - Swal.fire({ - title: 'Tunggu Pengesahan Daripada Khazanah-Operasi.', - icon: 'info', - width: 600, - padding: '3em', - background: '#fffff', - showCancelButton: false, - showConfirmButton: false, - allowOutsideClick: false, - allowEscapeKey: false, - allowEnterKey: false - }) - let siricreated = 0; - $.ajax({ - method:'post', - url: "{{ route('operasi.createkelulusan') }}", - data: { - "_token": "{{ csrf_token() }}", - "norujukan" : norujukan, - "komen" : komen, - "jumpinjam" : pinjaman_baru, - "teller" : teller - }, - success:function(data){ - siricreated = data; - }, - error: function(xhr, status, error) { - var err = eval("(" + xhr.responseText + ")"); - alert(xhr.responseText); - } - }); - - - var pusher = new Pusher("{{ env('PUSHER_APP_KEY') }}", { - cluster: 'ap1', - encrypted: true - }); - - var channel = pusher.subscribe('notice-kelulusan'); - channel.bind('my-kelulusan', function(data) { - - - if(data.norujukan == norujukan && data.siri == siricreated && data.teller == teller) - { - if(data.kelulusan == 'lulus') - { - Swal.fire({ - icon: 'success', - title: 'Telah Disahkan', - text: `Komen : ${data.komen}` - }).then(function(){ - gadaiautotawarruq(); - return true; - }); - - } - else if(data.kelulusan == 'batal') - { - Swal.fire({ - icon: 'warning', - title: 'Telah Dibatalkan', - text: `Komen : ${data.komen}` - }).then(function(){ - $("#terima_gadai").prop('disabled', false); - return false; - }); - } - } - - - - }); - - - }else if (result.dismiss === Swal.DismissReason.cancel){ - $("#terima_transaksi").prop('disabled', false); - swalWithBootstrapButtons.fire( - 'Gagal', - 'Gagal mendapatkan kelulusan operasi', - 'error' - ) } - }); - event.preventDefault(); - return false; - - }else if(marginsemasa > 80){ - $("#terima_transaksi").prop('disabled', false); - Swal.fire( - 'Amaran!', - 'Pinjaman Haruslah Dalam Lingkungan 80%!', - 'error' - ) - return false; } - - - gadaiautotawarruq(); + }); ///////////// //End File// @@ -2131,7 +2159,7 @@ var pinjamanbaru = $('#pinjamanbaru').val().replace(/[^0-9.-]+/g,""); var ansuran = 0; var addpinjaman = 0; - var bakiupah = $('#jumlahupah').val().replace(/[^0-9.-]+/g,""); + var bakiupah = parseFloat($('#jumlahupah').val().replace(/[^0-9.-]+/g,"")); var bakipinjaman = parseFloat($('#pinjamanasal').val().replace(/[^0-9.-]+/g,"")) + bakiupah; var historygadaian = "{{ $gadai['norujukan'] }}"; diff --git a/resources/views/print/laporan_ansuran.blade.php b/resources/views/print/laporan_ansuran.blade.php index 99403f3..3fe8880 100644 --- a/resources/views/print/laporan_ansuran.blade.php +++ b/resources/views/print/laporan_ansuran.blade.php @@ -206,8 +206,8 @@ Tempoh Baki Pembiayaan (RM) Bayaran Pemb. (RM) - Bayaran (RM) Keuntungan (RM) + Bayaran (RM) @php $counter = 1;$totalduitmasuk = 0;$totalkeuntungan = 0; $totalpendahuluan = 0;@endphp @foreach($tebus as $index=>$item) @@ -233,8 +233,8 @@ {{ $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) }} + {{ number_format($item['duit_masuk'],2) }} @php $counter++; @endphp @php $totaldmteller += $item['duit_masuk'];$totalupahteller += $item['bayaran_keuntungan'];$totalpendhteller += $item['bayaran_pembiayaan']; @endphp @@ -243,8 +243,8 @@ {{ $counter-1 }} Jumlah Bagi Teller : {{ $item['teller'] }} {{ number_format($totalpendhteller,2) }} - {{ number_format($totaldmteller,2) }} {{ number_format($totalupahteller,2) }} + {{ number_format($totaldmteller,2) }} @php $counter = 1;$totaldmteller = 0;$totalupahteller = 0;$totalpendhteller = 0;@endphp @endif @@ -252,8 +252,8 @@ {{ $counter-1 }} Jumlah Bagi Teller : {{ $item['teller'] }} {{ number_format($totalpendhteller,2) }} - {{ number_format($totaldmteller,2) }} {{ number_format($totalupahteller,2) }} + {{ number_format($totaldmteller,2) }} @endif @endforeach @@ -264,14 +264,14 @@ Bayaran Pemb. (RM) - Bayaran (RM) Keuntungan (RM) + Bayaran (RM) JUMLAH KESELURUHAN {{ number_format($totalpendahuluan,2) }} - {{ number_format($totalduitmasuk,2) }} {{ number_format($totalkeuntungan,2) }} + {{ number_format($totalduitmasuk,2) }} diff --git a/resources/views/print/laporan_penebusan.blade.php b/resources/views/print/laporan_penebusan.blade.php index c7bf612..c7c3836 100644 --- a/resources/views/print/laporan_penebusan.blade.php +++ b/resources/views/print/laporan_penebusan.blade.php @@ -202,27 +202,28 @@ JBG J Tebus Nilai Marhun(RM) - Pembiayaan(RM) + P. Asal(RM) + B.Pembiayaan(RM) {{-- Baki Pembiayaan(RM) --}} - Upah/Keuntungan(RM) + Keuntungan(RM) Bayaran(RM) Jumlah(RM) - @php $counter = 1;$totalnm = 0; $totalbayaran = 0; $totalpinjaman = 0; $totalupah = 0;@endphp + @php $counter = 1;$totalnm = 0; $totalbayaran = 0;$totalpinjamanasal = 0; $totalpinjaman = 0; $totalupah = 0;@endphp @foreach($tebus as $index=>$item) - @php $totalbayaran += ($item['jenistebus'] === 'S') ? ($item['pinjaman']+$item['bakiupah']) : $item['bakipjm']; $totalpinjaman += ($item['hargajualan'] != $item['bakihargajualan']) ? $item['gadaibakipjm'] : $item['pinjaman']; $totalupah += $item['bakiupah']; $totalnm += $item['nilaimarhun'];@endphp + @php $totalbayaran += ($item['jenistebus'] === 'S') ? ($item['gadaibakipjm']+$item['bakiupah']) : $item['bakipjm']; $totalpinjaman += ($item['hargajualan'] != $item['bakihargajualan']) ? $item['gadaibakipjm'] : $item['pinjaman']; $totalupah += $item['bakiupah'];$totalpinjamanasal += $item['pinjaman']; $totalnm += $item['nilaimarhun'];@endphp @if($index > 0) @if($item['teller'] != $tebus[$index - 1]['teller']) Teller : {{ $item['teller'] }} - @php $totalnmteller = 0; $totalpinjamanteller = 0;$totalupahteller = 0;$totalbayaranteller = 0; @endphp + @php $totalnmteller = 0;$totalpinjamanasalteller = 0; $totalpinjamanteller = 0;$totalupahteller = 0;$totalbayaranteller = 0; @endphp @endif @else Teller : {{ $item['teller'] }} - @php $totalnmteller = 0; $totalpinjamanteller = 0;$totalupahteller = 0;$totalbayaranteller = 0; $totaljumlahteller = 0;@endphp + @php $totalnmteller = 0;$totalpinjamanasalteller = 0; $totalpinjamanteller = 0;$totalupahteller = 0;$totalbayaranteller = 0; $totaljumlahteller = 0;@endphp @endif {{ $counter }} @@ -241,6 +242,7 @@ {{ number_format($item['nilaimarhun'],2) }} + {{ number_format($item['pinjaman'],2) }} @php if($item['hargajualan'] !== $item['bakihargajualan']) @@ -251,27 +253,29 @@ {{-- {{ number_format($item['gadaibakipjm'],2) }} --}} {{ number_format($item['bakiupah'],2) }} {{ number_format($item['bakipjm'],2) }} - @php if($item['jenistebus'] == 'S'){ $total=($item['pinjaman']+$item['bakiupah']);echo number_format($total,2);} else echo number_format($item['bakipjm'],2); @endphp + @php if($item['jenistebus'] == 'S'){ $total=($item['gadaibakipjm']+$item['bakiupah']);echo number_format($total,2);} else echo number_format($item['bakipjm'],2); @endphp @php $counter++; @endphp - @php $totalnmteller += $item['nilaimarhun']; $totalpinjamanteller += ($item['hargajualan'] != $item['bakihargajualan']) ? $item['gadaibakipjm'] : $item['pinjaman'];$totalupahteller += $item['bakiupah'];$totalbayaranteller += $item['bakipjm']; @endphp - @php $totaljumlahteller += ($item['jenistebus'] === 'S') ? ($item['pinjaman']+$item['bakiupah']) : $item['bakipjm']; @endphp + @php $totalnmteller += $item['nilaimarhun'];$totalpinjamanasalteller += $item['pinjaman']; $totalpinjamanteller += ($item['hargajualan'] != $item['bakihargajualan']) ? $item['gadaibakipjm'] : $item['pinjaman'];$totalupahteller += $item['bakiupah'];$totalbayaranteller += $item['bakipjm']; @endphp + @php $totaljumlahteller += ($item['jenistebus'] === 'S') ? ($item['gadaibakipjm']+$item['bakiupah']) : $item['bakipjm']; @endphp @if($index+1 < sizeof($tebus)) @if($item['teller'] != $tebus[$index + 1]['teller']) {{ $counter-1 }} Jumlah Bagi Teller : {{ $item['teller'] }} {{ number_format($totalnmteller,2) }} + {{ number_format($totalpinjamanasalteller,2) }} {{ number_format($totalpinjamanteller,2) }} {{ number_format($totalupahteller,2) }} {{ number_format($totalbayaranteller,2) }} {{ number_format($totaljumlahteller,2) }} - @php $counter = 1;$totalpinjamanteller = 0;$totalupahteller = 0;$totalbayaranteller = 0;$totaljumlahteller = 0; @endphp + @php $counter = 1;$totalpinjamanasalteller = 0;$totalpinjamanteller = 0;$totalupahteller = 0;$totalbayaranteller = 0;$totaljumlahteller = 0; @endphp @endif @else {{ $counter-1 }} Jumlah Bagi Teller : {{ $item['teller'] }} {{ number_format($totalnmteller,2) }} + {{ number_format($totalpinjamanasalteller,2) }} {{ number_format($totalpinjamanteller,2) }} {{ number_format($totalupahteller,2) }} {{ number_format($totalbayaranteller,2) }} @@ -286,13 +290,15 @@ Nilai Marhun (RM) - Pembiayaan (RM) + Pembiayaan Asal(RM) + B. Pembiayaan (RM) Upah/Keuntungan (RM) Jumlah (RM) JUMLAH KESELURUHAN {{ number_format($totalnm,2) }} + {{ number_format($totalpinjamanasal,2) }} {{ number_format($totalpinjaman,2) }} {{ number_format($totalupah,2) }} {{ number_format($totalbayaran,2) }} @@ -331,13 +337,6 @@ {{ number_format($upahlama['total'],2) }} Not Applicable - - -{{--
JUMLAH KESELURUHAN BAYARAN : RM {{ number_format($totalbayaran,2) }}
--}} - -
-
- @@ -347,6 +346,9 @@
{{ $ansuran['bilangan'] }} Ansuran Pembiayaan
+{{--
JUMLAH KESELURUHAN BAYARAN : RM {{ number_format($totalbayaran,2) }}
--}} + +