diff --git a/app/Http/Controllers/GadaianController.php b/app/Http/Controllers/GadaianController.php
index 8c47864..54d3e0a 100644
--- a/app/Http/Controllers/GadaianController.php
+++ b/app/Http/Controllers/GadaianController.php
@@ -570,7 +570,7 @@ class GadaianController extends Controller
if($history == $gadai[0][0]['historygadaian'])
$history = 0;
else{
- array_push($arrayhist,["pinjaman" => ((isset($tebus[0])) ? $tebus[0]['pinjaman'] : 0),"norujukan" => $history,"jenistebus" => ((isset($tebus[0])) ? $tebus[0]['jenistebus'] : 0),"jbg" => ((isset($tebus[0])) ? $tebus[0]['jbg'] : 0),"t_tebus" => ((isset($tebus[0])) ? $tebus[0]['t_tebus'] : 0)]);
+ array_push($arrayhist,["hargajualan" => ((isset($gadai[0][0]['hargajualan'])) ? $gadai[0][0]['hargajualan'] : ''), "pinjaman" => ((isset($tebus[0])) ? $tebus[0]['pinjaman'] : 0),"norujukan" => $history,"jenistebus" => ((isset($tebus[0])) ? $tebus[0]['jenistebus'] : 0),"jbg" => ((isset($tebus[0])) ? $tebus[0]['jbg'] : 0),"t_tebus" => ((isset($tebus[0])) ? $tebus[0]['t_tebus'] : 0)]);
$history = $gadai[0][0]['historygadaian'];
}
}
@@ -585,7 +585,7 @@ class GadaianController extends Controller
])->json();
- array_push($arrayhist,["pinjaman" => ((isset($tebus[0])) ? $tebus[0]['pinjaman'] : 0),"norujukan" => $norujukan,"jenistebus" => ((isset($tebus[0])) ? $tebus[0]['jenistebus'] : 0),"jbg" => ((isset($tebus[0])) ? $tebus[0]['jbg'] : 0),"t_tebus" => ((isset($tebus[0])) ? $tebus[0]['t_tebus'] : 0)]);
+ array_push($arrayhist,["hargajualan" => ((isset($gadai[0][0]['hargajualan'])) ? $gadai[0][0]['hargajualan'] : ''),"pinjaman" => ((isset($tebus[0])) ? $tebus[0]['pinjaman'] : 0),"norujukan" => $norujukan,"jenistebus" => ((isset($tebus[0])) ? $tebus[0]['jenistebus'] : 0),"jbg" => ((isset($tebus[0])) ? $tebus[0]['jbg'] : 0),"t_tebus" => ((isset($tebus[0])) ? $tebus[0]['t_tebus'] : 0)]);
break;
}
}
diff --git a/resources/views/customers/info.blade.php b/resources/views/customers/info.blade.php
index d8615a5..ae4d958 100644
--- a/resources/views/customers/info.blade.php
+++ b/resources/views/customers/info.blade.php
@@ -713,8 +713,6 @@
var counter = 1;
historytebusbayaran.clear().draw();
- console.table(data);
-
$.each(data,function(index,tebusaz){
switch(tebusaz['jenistebus']) {
@@ -723,8 +721,17 @@
urlroute = urlroute.replace(':id', tebusaz['norujukan']);
break;
case 'T':
- var urlroute = '{{ route("resit.tebus", ":id") }}';
- urlroute = urlroute.replace(':id', tebusaz['norujukan']);
+
+ if(tebusaz['hargajualan'] === '')
+ {
+ var urlroute = '{{ route("resit.belumtebus", ":id") }}';
+ urlroute = urlroute.replace(':id', tebusaz['norujukan']);
+
+ }else{
+ var urlroute = '{{ route("resit.tebus", ":id") }}';
+ urlroute = urlroute.replace(':id', tebusaz['norujukan']);
+ }
+
break;
case 'A':
var urlroute = '{{ route("resit.belumansurans", ":id") }}';
@@ -750,7 +757,7 @@
}
- function ubahfunc(e){
+ async function ubahfunc(e){
let ubahid = $('input[name="belum"]:checked').val();
let harini = new Date();harini.setHours(0, 0, 0, 0);
@@ -792,11 +799,34 @@
}
if($("input[name='options']:checked").val() == 'sudah_tebus'){
- Swal.fire({
- icon: 'error',
- title: 'Amaran',
- text: 'Ubah Gadai Tidak Dibenarkan'
+ const { value: amaun } = await Swal.fire({
+ title: 'Kad Pengenalan Wakil',
+ input: 'text',
+ inputPlaceholder: 'Kad Pengenalan',
+ confirmButtonText: 'Terima',
+ showCancelButton:true,
+ cancelButtonText:'Batal',
+ allowOutsideClick: true,
+ inputValidator: (value) => {
+ if (!value) {
+ return 'Isikan tempat kosong diatas!'
+ }
+
+ if(value <= 0){
+ return 'Masukkan No Kad Pengenalan yang betul!';
+ }
+
+ if(isNaN(value))
+ {
+ return 'Kad Pengenalan hendaklah dalam bentuk nombor!'
+ }
+ }
});
+
+ if(amaun)
+ {
+
+ }
return false;
}
diff --git a/resources/views/print/resitansuran.blade.php b/resources/views/print/resitansuran.blade.php
index f542897..6eb9721 100644
--- a/resources/views/print/resitansuran.blade.php
+++ b/resources/views/print/resitansuran.blade.php
@@ -409,7 +409,7 @@ hr.new5 {
-| No K/P | : {{ $customers_info['kpbaru'] }} | | | | Tempoh Simpan | : {{ $gadai['tempoh'] }} |
+No K/P | : {{ $customers_info['kpbaru'] }} | | | | Tempoh Simpan | : {{ $gadai['tempoh'] }} |
@@ -422,6 +422,7 @@ hr.new5 {
+ A
@@ -435,7 +436,7 @@ hr.new5 {
| (-) Bayaran Pelanggan | | : RM {{ number_format($transaction['duit_masuk'],2) }} |
-| Baki Harga Jualan | | : RM {{ number_format($transaction['bakiharga'],2) }} |
+Baki Harga Jualan | | : RM {{ number_format($transaction['bakiharga'],2) }} |
@@ -465,7 +466,7 @@ hr.new5 {
|
Cagaran Diterima |
|
- Ar-Rahn |
+ Ar-Rahn {{ Auth::user()->name }} |
@@ -502,7 +503,7 @@ hr.new5 {
-| No K/P | : {{ $customers_info['kpbaru'] }} | | | | Tempoh Simpan | : {{ $gadai['tempoh'] }} |
+No K/P | : {{ $customers_info['kpbaru'] }} | | | | Tempoh Simpan | : {{ $gadai['tempoh'] }} |
@@ -515,6 +516,8 @@ hr.new5 {
+A
+
@@ -528,7 +531,7 @@ hr.new5 {
| (-) Bayaran Pelanggan | | : RM {{ number_format($transaction['duit_masuk'],2) }} |
-| Baki Harga Jualan | | : RM {{ number_format($transaction['bakiharga'],2) }} |
+Baki Harga Jualan | | : RM {{ number_format($transaction['bakiharga'],2) }} |
@@ -558,7 +561,7 @@ hr.new5 {
|
Cagaran Diterima |
|
- Ar-Rahn |
+ Ar-Rahn {{ Auth::user()->name }} |
diff --git a/resources/views/print/resitansuransebelum.blade.php b/resources/views/print/resitansuransebelum.blade.php
index e6c8ef9..df55994 100644
--- a/resources/views/print/resitansuransebelum.blade.php
+++ b/resources/views/print/resitansuransebelum.blade.php
@@ -422,6 +422,7 @@ hr.new5 {
+ A
@@ -515,6 +516,7 @@ hr.new5 {
+A
diff --git a/resources/views/print/resittambahpinjam.blade.php b/resources/views/print/resittambahpinjam.blade.php
index 7aec9d4..7cf82f9 100644
--- a/resources/views/print/resittambahpinjam.blade.php
+++ b/resources/views/print/resittambahpinjam.blade.php
@@ -409,7 +409,7 @@ hr.new5 {
-| No K/P | : {{ $customers_info['kpbaru'] }} | | | | : Tempoh Simpan | {{ $gadai['tempoh'] }} |
+No K/P | : {{ $customers_info['kpbaru'] }} | | | | : Tempoh Simpan | {{ $gadai['tempoh'] }} |
@@ -422,6 +422,7 @@ hr.new5 {
+ P
@@ -438,7 +439,7 @@ hr.new5 {
| Pembiayaan Baru | | : RM {{ number_format($gadai['bakipjm'] + $penebusan['addpinjaman'],2) }} |
- | Bayaran Keuntungan | | : RM {{ number_format($penebusan['bakiupah'],2) }} |
+ Bayaran Keuntungan | | : RM {{ number_format($penebusan['bakiupah'],2) }} |
@@ -468,7 +469,7 @@ hr.new5 {
|
Cagaran Diterima |
|
- Ar-Rahn |
+ Ar-Rahn {{ Auth::user()->name }} |
@@ -505,7 +506,7 @@ hr.new5 {
-| No K/P | : {{ $customers_info['kpbaru'] }} | | | | : Tempoh Simpan | {{ $gadai['tempoh'] }} |
+No K/P | : {{ $customers_info['kpbaru'] }} | | | | : Tempoh Simpan | {{ $gadai['tempoh'] }} |
| Nama Wakil | : @php if(sizeof($wakil) != 0){ echo $wakil['nama'];} else echo ''; @endphp | | | | | |
@@ -517,6 +518,8 @@ hr.new5 {
+P
+
@@ -533,7 +536,7 @@ hr.new5 {
| Pembiayaan Baru | | : RM {{ number_format($gadai['bakipjm'] + $penebusan['addpinjaman'],2) }} |
- | Bayaran Keuntungan | | : RM {{ number_format($penebusan['bakiupah'],2) }} |
+ Bayaran Keuntungan | | : RM {{ number_format($penebusan['bakiupah'],2) }} |
@@ -563,7 +566,7 @@ hr.new5 {
|
Cagaran Diterima |
|
- Ar-Rahn |
+ Ar-Rahn {{ Auth::user()->name }} |
diff --git a/resources/views/print/resittebus.blade.php b/resources/views/print/resittebus.blade.php
index 5a9a819..c7d96e2 100644
--- a/resources/views/print/resittebus.blade.php
+++ b/resources/views/print/resittebus.blade.php
@@ -410,7 +410,7 @@ hr.new5 {
-| No K/P | : {{ $customers_info['kpbaru'] }} | | | | Tempoh Simpan | : {{ $gadai['tempoh'] }} |
+No K/P | : {{ $customers_info['kpbaru'] }} | | | | Tempoh Simpan | : {{ $gadai['tempoh'] }} |
@@ -423,6 +423,7 @@ hr.new5 {
+ T
@@ -442,7 +443,7 @@ hr.new5 {
| (-) Rebate | | : RM {{ number_format($penebusan['rebate'],2) }} |
- | Tebus Keseluruhan | | : RM {{ number_format(($gadai['bakihargajualan'] - $penebusan['rebate']),2) }} |
+ Tebus Keseluruhan | | : RM {{ number_format(($gadai['bakihargajualan'] - $penebusan['rebate']),2) }} |
@@ -472,7 +473,7 @@ hr.new5 {
|
Cagaran Diterima |
|
- Ar-Rahn |
+ Ar-Rahn {{ Auth::user()->name }} |
@@ -509,7 +510,7 @@ hr.new5 {
-| No K/P | : {{ $customers_info['kpbaru'] }} | | | | Tempoh Simpan | : {{ $gadai['tempoh'] }} |
+No K/P | : {{ $customers_info['kpbaru'] }} | | | | Tempoh Simpan | : {{ $gadai['tempoh'] }} |
| |
@@ -525,6 +526,7 @@ hr.new5 {
+T
@@ -544,7 +546,7 @@ hr.new5 {
| (-) Rebate | | : RM {{ number_format($penebusan['rebate'],2) }} |
- | Tebus Keseluruhan | | : RM {{ number_format(($gadai['bakihargajualan'] - $penebusan['rebate']),2) }} |
+ Tebus Keseluruhan | | : RM {{ number_format(($gadai['bakihargajualan'] - $penebusan['rebate']),2) }} |
@@ -573,7 +575,7 @@ hr.new5 {
|
Cagaran Diterima |
|
- Ar-Rahn |
+ Ar-Rahn {{ Auth::user()->name }} |
diff --git a/resources/views/print/resittebussebelum.blade.php b/resources/views/print/resittebussebelum.blade.php
index 550d3c1..ea36b4a 100644
--- a/resources/views/print/resittebussebelum.blade.php
+++ b/resources/views/print/resittebussebelum.blade.php
@@ -368,6 +368,8 @@ hr.new5 {
color: black;
padding:4px;
}
+
+
@@ -400,6 +402,8 @@ hr.new5 {
+
+
@@ -410,7 +414,7 @@ hr.new5 {
-| No K/P | : {{ $customers_info['kpbaru'] }} | | | | Tempoh Simpan | : {{ $gadai['jbg'] }} |
+No K/P | : {{ $customers_info['kpbaru'] }} | | | | Tempoh Simpan | : {{ $gadai['jbg'] }} |
@@ -423,6 +427,7 @@ hr.new5 {
+T
@@ -436,7 +441,7 @@ hr.new5 {
| Jumlah Upah | | : RM {{ number_format($penebusan['bakiupah'],2) }} |
- | Tebus Keseluruhan | | : RM {{ number_format(($gadai['pinjaman'] + $penebusan['bakiupah']),2) }} |
+ Tebus Keseluruhan | | : RM {{ number_format(($gadai['pinjaman'] + $penebusan['bakiupah']),2) }} |
@@ -466,9 +471,7 @@ hr.new5 {
|
Cagaran Diterima |
|
- Ar-Rahn |
-
-
+ Ar-Rahn {{ Auth::user()->name }} |
@@ -503,7 +506,7 @@ hr.new5 {
-| No K/P | : {{ $customers_info['kpbaru'] }} | | | | Tempoh Simpan | : {{ $gadai['jbg'] }} |
+No K/P | : {{ $customers_info['kpbaru'] }} | | | | Tempoh Simpan | : {{ $gadai['jbg'] }} |
| |
@@ -519,6 +522,8 @@ hr.new5 {
+T
+
@@ -532,7 +537,7 @@ hr.new5 {
| Jumlah Upah | | : RM {{ number_format($penebusan['bakiupah'],2) }} |
- | Tebus Keseluruhan | | : RM {{ number_format(($gadai['pinjaman'] + $penebusan['bakiupah']),2) }} |
+ Tebus Keseluruhan | | : RM {{ number_format(($gadai['pinjaman'] + $penebusan['bakiupah']),2) }} |
@@ -561,8 +566,7 @@ hr.new5 {
|
Cagaran Diterima |
|
- Ar-Rahn |
-
+ Ar-Rahn {{ Auth::user()->name }} |
diff --git a/resources/views/print/resittebusseparuh.blade.php b/resources/views/print/resittebusseparuh.blade.php
index 30659e8..107a71e 100644
--- a/resources/views/print/resittebusseparuh.blade.php
+++ b/resources/views/print/resittebusseparuh.blade.php
@@ -410,7 +410,7 @@ hr.new5 {
-| No K/P | : {{ $customers_info['kpbaru'] }} | | | | Tempoh Simpan | : {{ $gadai['tempoh'] }} |
+No K/P | : {{ $customers_info['kpbaru'] }} | | | | Tempoh Simpan | : {{ $gadai['tempoh'] }} |
@@ -423,6 +423,8 @@ hr.new5 {
+S
+
@@ -444,7 +446,7 @@ hr.new5 {
| Jumlah Bayaran | | : RM {{ number_format($penebusan['bakipjm'],2) }} |
- | Pembiayaan Baru | | : RM {{ number_format(($gadai['bakihargajualan'] - $penebusan['rebate']-$penebusan['bakipjm']),2) }} |
+ Pembiayaan Baru | | : RM {{ number_format(($gadai['bakihargajualan'] - $penebusan['rebate']-$penebusan['bakipjm']),2) }} |
@@ -474,7 +476,7 @@ hr.new5 {
|
Cagaran Diterima |
|
- Ar-Rahn |
+ Ar-Rahn {{ Auth::user()->name }} |
@@ -511,7 +513,7 @@ hr.new5 {
-| No K/P | : {{ $customers_info['kpbaru'] }} | | | | Tempoh Simpan | : {{ $gadai['tempoh'] }} |
+No K/P | : {{ $customers_info['kpbaru'] }} | | | | Tempoh Simpan | : {{ $gadai['tempoh'] }} |
| |
@@ -527,6 +529,8 @@ hr.new5 {
+S
+
@@ -548,7 +552,7 @@ hr.new5 {
| Jumlah Bayaran | | : RM {{ number_format($penebusan['bakipjm'],2) }} |
- | Pembiayaan Baru | | : RM {{ number_format(($gadai['bakihargajualan'] - $penebusan['rebate']-$penebusan['bakipjm']),2) }} |
+ Pembiayaan Baru | | : RM {{ number_format(($gadai['bakihargajualan'] - $penebusan['rebate']-$penebusan['bakipjm']),2) }} |
@@ -578,7 +582,7 @@ hr.new5 {
|
Cagaran Diterima |
|
- Ar-Rahn |
+ Ar-Rahn {{ Auth::user()->name }} |
diff --git a/resources/views/print/resittebusseparuhbelum.blade.php b/resources/views/print/resittebusseparuhbelum.blade.php
index 9a1a141..91adab4 100644
--- a/resources/views/print/resittebusseparuhbelum.blade.php
+++ b/resources/views/print/resittebusseparuhbelum.blade.php
@@ -423,6 +423,8 @@ hr.new5 {
+ S
+
@@ -519,6 +521,8 @@ hr.new5 {
+S
+