From 95d244ff79db62a692a631adb810ff5fbfa8600d Mon Sep 17 00:00:00 2001 From: Afiq Zakwan Hamdan Date: Fri, 9 Jul 2021 00:56:33 +0800 Subject: [PATCH] sag --- resources/views/customers/index.blade.php | 29 ++- resources/views/customers/info.blade.php | 21 +- resources/views/gadaian/edit.blade.php | 15 -- resources/views/gadaian/index.blade.php | 15 -- resources/views/not_assign.blade.php | 2 +- resources/views/penebusan/index.blade.php | 22 +- resources/views/print/resitadvansur.blade.php | 4 +- resources/views/print/resitansuran.blade.php | 28 +-- .../views/print/resittambahpinjam.blade.php | 4 +- resources/views/print/resittebus.blade.php | 4 +- .../views/print/resittebussebelum.blade.php | 4 +- .../views/print/resittebusseparuh.blade.php | 4 +- resources/views/print/sag.blade.php | 238 +++++++++++++++--- 13 files changed, 271 insertions(+), 119 deletions(-) diff --git a/resources/views/customers/index.blade.php b/resources/views/customers/index.blade.php index 4c0a31c..b4cb26e 100644 --- a/resources/views/customers/index.blade.php +++ b/resources/views/customers/index.blade.php @@ -175,7 +175,7 @@ @@ -296,7 +296,7 @@ @@ -436,6 +436,7 @@ }); function verifycustomer(){ + $("#terima_ic").prop('disabled', true); var customername = $('#name').val(); var customeralamat = $('#alamat').val(); var customerposkod = $('#poskod').val(); @@ -443,6 +444,7 @@ var customerphone_alternate = $('#alternate_phone').val(); var age = $('#age').val(); if(age < 18){ + $("#terima_ic").prop('disabled', false); Swal.fire({ icon: 'error', title: 'Amaran!', @@ -452,6 +454,7 @@ return false; } if(customername == ''){ + $("#terima_ic").prop('disabled', false); Swal.fire({ icon: 'error', title: 'Amaran!', @@ -461,6 +464,7 @@ return false; } if(customeralamat == ''){ + $("#terima_ic").prop('disabled', false); Swal.fire({ icon: 'error', title: 'Amaran!', @@ -470,6 +474,7 @@ return false; } if(customerposkod == ''){ + $("#terima_ic").prop('disabled', false); Swal.fire({ icon: 'error', title: 'Amaran!', @@ -479,6 +484,7 @@ return false; }else{ if(customerposkod.length != 5){ + $("#terima_ic").prop('disabled', false); Swal.fire({ icon: 'error', title: 'Amaran!', @@ -488,6 +494,7 @@ return false; }else{ if($.isNumeric(customerposkod) == false){ + $("#terima_ic").prop('disabled', false); Swal.fire({ icon: 'error', title: 'Amaran!', @@ -499,6 +506,7 @@ } } if(customerphone == ''){ + $("#terima_ic").prop('disabled', false); Swal.fire({ icon: 'error', title: 'Amaran!', @@ -508,6 +516,7 @@ return false; }else{ if((customerphone.length < 9 || customerphone.length >= 12)){ + $("#terima_ic").prop('disabled', false); Swal.fire({ icon: 'error', title: 'Amaran!', @@ -517,6 +526,7 @@ return false; }else{ if($.isNumeric(customerphone) == false){ + $("#terima_ic").prop('disabled', false); Swal.fire({ icon: 'error', title: 'Amaran!', @@ -529,6 +539,7 @@ } if(customerphone_alternate != ''){ if(customerphone_alternate.length < 8 && customerphone_alternate.length > 12){ + $("#terima_ic").prop('disabled', false); Swal.fire({ icon: 'error', title: 'Amaran!', @@ -538,6 +549,7 @@ return false; }else{ if($.isNumeric(customerphone_alternate) == false){ + $("#terima_ic").prop('disabled', false); Swal.fire({ icon: 'error', title: 'Amaran!', @@ -552,6 +564,7 @@ } function verifycustomerpassport(){ + $("#terima_passport").prop('disabled', true); var customername = $('#passport_name').val(); var customeralamat = $('#passport_alamat').val(); var customerposkod = $('#passport_poskod').val(); @@ -561,6 +574,7 @@ var age = $('#passport_age').val(); if(age < 18){ + $("#terima_passport").prop('disabled', false); Swal.fire({ icon: 'error', title: 'Amaran!', @@ -570,6 +584,7 @@ return false; } if(customername == ''){ + $("#terima_passport").prop('disabled', false); Swal.fire({ icon: 'error', title: 'Amaran!', @@ -579,6 +594,7 @@ return false; } if(tarikh_lahir == ''){ + $("#terima_passport").prop('disabled', false); Swal.fire({ icon: 'error', title: 'Amaran!', @@ -588,6 +604,7 @@ return false; } if(customeralamat == ''){ + $("#terima_passport").prop('disabled', false); Swal.fire({ icon: 'error', title: 'Amaran!', @@ -597,6 +614,7 @@ return false; } if(customerposkod == ''){ + $("#terima_passport").prop('disabled', false); Swal.fire({ icon: 'error', title: 'Amaran!', @@ -606,6 +624,7 @@ return false; }else{ if(customerposkod.length != 5){ + $("#terima_passport").prop('disabled', false); Swal.fire({ icon: 'error', title: 'Amaran!', @@ -615,6 +634,7 @@ return false; }else{ if($.isNumeric(customerposkod) == false){ + $("#terima_passport").prop('disabled', false); Swal.fire({ icon: 'error', title: 'Amaran!', @@ -626,6 +646,7 @@ } } if(customerphone == ''){ + $("#terima_passport").prop('disabled', false); Swal.fire({ icon: 'error', title: 'Amaran!', @@ -635,6 +656,7 @@ return false; }else{ if(customerphone.length <= 9 || customerphone.length >= 12){ + $("#terima_passport").prop('disabled', false); Swal.fire({ icon: 'error', title: 'Amaran!', @@ -644,6 +666,7 @@ return false; }else{ if($.isNumeric(customerphone) == false){ + $("#terima_passport").prop('disabled', false); Swal.fire({ icon: 'error', title: 'Amaran!', @@ -656,6 +679,7 @@ } if(customerphone_alternate != ''){ if(customerphone_alternate.length <= 8 && customerphone_alternate.length >= 12){ + $("#terima_passport").prop('disabled', false); Swal.fire({ icon: 'error', title: 'Amaran!', @@ -665,6 +689,7 @@ return false; }else{ if($.isNumeric(customerphone_alternate) == false){ + $("#terima_passport").prop('disabled', false); Swal.fire({ icon: 'error', title: 'Amaran!', diff --git a/resources/views/customers/info.blade.php b/resources/views/customers/info.blade.php index ad42b14..180fde8 100644 --- a/resources/views/customers/info.blade.php +++ b/resources/views/customers/info.blade.php @@ -92,7 +92,7 @@ No Telefon
- +
@@ -248,7 +248,7 @@ No KP
- +
@@ -264,7 +264,7 @@ No Telefon 1
- +
@@ -273,7 +273,7 @@ No Telefon 2
- +
@@ -310,7 +310,7 @@ Alamat
- +
@@ -318,7 +318,7 @@ Poskod
- +
@@ -328,9 +328,12 @@
@php $poskod = Http::get($api_url . '/api/poskod/'. $customer_info['poskod'])->json(); + if(sizeof($poskod) < 1 || sizeof($poskod) > 1){ + $poskod = array('koddaerah'=>'NIL','kodnegeri' => 'NIL'); + } $daerah = Http::get($api_url . '/api/daerah/' . $poskod['koddaerah'])->json(); @endphp - +
@@ -341,7 +344,7 @@ @php $negeri = Http::get($api_url . '/api/negeri/' . $poskod['kodnegeri'])->json(); @endphp - +
@@ -699,7 +702,7 @@ '', '' + gadai_detail['norujukan'] + '', gadai_detail['t_gadai'], - gadai_detail['t_matang1'], + gadai_detail['t_matang'], 'RM '+ formatter.format(gadai_detail['bakihargajualan']), 'RM '+formatter.format(gadai_detail['bakipjm']), (((Number(gadai_detail['pinjaman'])/Number(gadai_detail['nilaimarhun']))*100).toFixed(2)).toLocaleString("en-GB") + '%', diff --git a/resources/views/gadaian/edit.blade.php b/resources/views/gadaian/edit.blade.php index 53c90eb..7f5eed3 100644 --- a/resources/views/gadaian/edit.blade.php +++ b/resources/views/gadaian/edit.blade.php @@ -553,11 +553,6 @@ 'nota' : nota }, success:function(data){ - Swal.fire({ - icon: 'success', - title: 'Berjaya!', - text: 'Ubah Marhun Berjaya' - }); getMarhun(norujukedit); $('#editMarhunModal').modal('hide'); } @@ -647,11 +642,6 @@ 'nilai_marhun' : nilai_marhun }, success:function(data){ - Swal.fire({ - icon: 'success', - title: 'Berjaya!', - text: 'Tambah Marhun Berjaya' - }); $('#nota').val('').trigger("change"); $('#marhun').val(0); $('#karat').val(0); @@ -748,11 +738,6 @@ 'nilai_marhun' : nilai_marhun }, success:function(data){ - Swal.fire({ - icon: 'success', - title: 'Berjaya!', - text: 'Tambah Marhun Berjaya' - }); $('#nota').val('').trigger("change"); $('#marhun').val(0); $('#karat').val(0); diff --git a/resources/views/gadaian/index.blade.php b/resources/views/gadaian/index.blade.php index 19e27b9..9984860 100644 --- a/resources/views/gadaian/index.blade.php +++ b/resources/views/gadaian/index.blade.php @@ -509,11 +509,6 @@ success:function(data){ $("#tambah_marhun").prop('disabled', false); $("#terima_marhun").prop('disabled', false); - Swal.fire({ - icon: 'success', - title: 'Berjaya!', - text: 'Tambah Marhun Berjaya' - }); $('#nota').val('').trigger("change"); $('#marhun').val(0); $('#karat').val(0); @@ -625,11 +620,6 @@ success:function(data){ $("#tambah_marhun").prop('disabled', false); $("#terima_marhun").prop('disabled', false); - Swal.fire({ - icon: 'success', - title: 'Berjaya!', - text: 'Tambah Marhun Berjaya' - }); $('#nota').val('').trigger("change"); $('#marhun').val(0); $('#karat').val(0); @@ -1131,11 +1121,6 @@ 'nota' : nota }, success:function(data){ - Swal.fire({ - icon: 'success', - title: 'Berjaya!', - text: 'Ubah Marhun Berjaya' - }); getMarhun(norujukedit); $('#editMarhunModal').modal('hide'); } diff --git a/resources/views/not_assign.blade.php b/resources/views/not_assign.blade.php index 24016f5..b6be251 100644 --- a/resources/views/not_assign.blade.php +++ b/resources/views/not_assign.blade.php @@ -84,7 +84,7 @@
- Khazanah Belum Menugaskan Jawatan Harian + Kakitangan Belum Disahkan Lagi
diff --git a/resources/views/penebusan/index.blade.php b/resources/views/penebusan/index.blade.php index 71e36e6..7f1d076 100644 --- a/resources/views/penebusan/index.blade.php +++ b/resources/views/penebusan/index.blade.php @@ -246,7 +246,7 @@
- BAYARAN PEMBIAYAAN(RM) + BAYARAN PELANGGAN(RM)
@@ -373,6 +373,7 @@ $('#divhargaemassemasa').hide(); $('#divperludibayartawarruq').hide(); $('#divbayarantawarruq').hide(); + $('#divbayaran').hide(); var array_recno = []; @@ -721,9 +722,9 @@ $('#divhargaemassemasa').hide(); $('#divperludibayartawarruq').hide(); $('#divbayarantawarruq').hide(); + $('#divbayaran').hide(); $('#divtelahdibayar').show(); - $('#divbayaran').show(); $('#divperludibayar').show(); tebusan(); @@ -748,9 +749,9 @@ $('#divbayarantawarruq').hide(); $('#divtelahdibayar').show(); $('#divbayaran').show(); - $('#divperludibayar').show(); + $('#divperludibayar').hide(); - $('#perludibayar').val(formatter.format(jumupah)); + $('#bayaran').val(formatter.format(jumupah)); break; @@ -992,6 +993,7 @@ function bayaransemua() { $("#terima_transaksi").prop('disabled', true); + var jumupah = parseFloat($('#jumlahupah').val().replace(/[^0-9.-]+/g,"")); if($('#sltjenistebus').find(":selected").val() == 'T'){ var adadah = false; @@ -1128,7 +1130,17 @@ let hadbayaransuran = (parseFloat("{{ $gadai['nilaimarhun']}}") * 0.1); var bayar = $('#bayaran').val(); - var bakipinjam = parseFloat("{{ $gadai['bakipjm'] }}") - hadbayaransuran; + var bakipinjam = parseFloat("{{ $gadai['bakipjm'] }}") - hadbayaransuran; + + if(bayar < jumupah){ + $("#terima_transaksi").prop('disabled', false); + Swal.fire( + 'Amaran!', + 'Bayaran tidak boleh kurang dari kos keuntungan semasa', + 'error' + ) + return false; + } if(bayar > bakipinjam){ $("#terima_transaksi").prop('disabled', false); diff --git a/resources/views/print/resitadvansur.blade.php b/resources/views/print/resitadvansur.blade.php index 2167d75..6a5659a 100644 --- a/resources/views/print/resitadvansur.blade.php +++ b/resources/views/print/resitadvansur.blade.php @@ -247,7 +247,7 @@ hr.new5 { #payment { font-family: Arial, Helvetica, sans-serif; border-collapse:collapse; - width: 45%; + width: 60%; font-size:10px; border: 1px solid black; @@ -256,7 +256,7 @@ hr.new5 { #payment td, #payment th { border: 0px solid; padding: 3px; - font-size:9px; + font-size:15px; text-align: left; } diff --git a/resources/views/print/resitansuran.blade.php b/resources/views/print/resitansuran.blade.php index 941a371..b17a935 100644 --- a/resources/views/print/resitansuran.blade.php +++ b/resources/views/print/resitansuran.blade.php @@ -8,8 +8,8 @@ - - - - - - - - - - - -