Merge branch 'hotfix/tunai-add-timestamp' of bitbucket.org:arrahn-pkb/kaunter into hotfix/tunai-add-timestamp

This commit is contained in:
Hafifie PKB
2024-12-31 10:17:30 +08:00
6 changed files with 247 additions and 42 deletions
+20 -1
View File
@@ -157,7 +157,9 @@
<nav class="mb-3">
<!-- button -->
<div class="mr-2 form-group d-flex justify-content-end">
<a class="btn btn-primary button-spacing" id="daftar_gadai">Daftar Pembiayaan</a>
@if(!in_array(Auth::user()->cawangan, config('redeemoption.cawangan_block', [])))
<a class="btn btn-primary button-spacing" id="daftar_gadai">Daftar Pembiayaan</a>
@endif
</div>
<div class="nav nav-tabs" id="nav-tab" role="tablist">
@php
@@ -598,6 +600,13 @@
var pinjaman = $(data).data("pinjaman");
var hargajualan = $(data).data("hargajualan");
let array_tempblock = ['011237240808-0003','011237240719-0015','011237240806-0011','011237240828-0001',
'011237240904-0007','011237240904-0008','011237240904-0009','011237240719-0023','011237240719-0024',
'011237240719-0025','011237240618-0026','011237240719-0027','011237240719-0028','011237240618-0020',
'011237240719-0030','011237240618-0029','011237240731-0026','011237240715-0027','011237240912-0009',
];
Swal.fire({
title: 'Memuatkan...',
allowEscapeKey : false,
@@ -607,6 +616,16 @@
}
});
if (array_tempblock.includes(norujukan)) {
Swal.close();
Swal.fire({
icon: 'error',
title: 'Amaran',
text: 'Surat Pembiayaan Mengalami Masalah Sila Hubungi IT'
});
return false;
}
if(hargajualan == pinjaman){
Swal.fire({
icon: 'error',
+31 -12
View File
@@ -812,20 +812,39 @@
var nokp = $('#noic').val();
if(id_type=='nokp'){
if($.isNumeric(nokp) == false){
Swal.fire({
icon: 'error',
title: 'Amaran!',
text: 'Sila Masukkan Nombor Sahaja Pada No KP Pelanggan'
});
event.preventDefault();
return false;
// Swal.fire({
// icon: 'error',
// title: 'Amaran!',
// text: 'Sila Masukkan Nombor Sahaja Pada No KP Pelanggan'
// });
// event.preventDefault();
// return false;
if(nokp.substr(-1) != '*'){
Swal.fire({
icon: 'error',
title: 'Amaran!',
text: 'Sila Masukkan Nombor Sahaja Pada No KP Pelanggan'
});
event.preventDefault();
return false;
}
}
if(nokp.length != 12){
Swal.fire({
icon: 'error',
title: 'Amaran!',
text: 'Sila Periksa No KP Pelanggan'
});
// Swal.fire({
// icon: 'error',
// title: 'Amaran!',
// text: 'Sila Periksa No KP Pelanggan'
// });
if(nokp.substr(-1) != '*')
{
Swal.fire({
icon: 'error',
title: 'Amaran!',
text: 'Sila Periksa No KP Pelanggan'
});
event.preventDefault();
return false;
}
event.preventDefault();
return false;
}
+9 -1
View File
@@ -91,16 +91,24 @@
<select class="form-control" id="sltjenistebus">
<option value="T">T = Penyelesaian Pembiayaan</option>
@if($gadai['tagbaru'] == 1)
<option value="A" {{ $gadai['tempoh'] >= 12 ? 'disabled' : '' }}>A = Ansuran Pembiayaan</option>
@if(!in_array(Auth::user()->cawangan, config('redeemoption.cawangan_block', [])))
<option value="A" {{ $gadai['tempoh'] >= 12 ? 'disabled' : '' }}>A = Ansuran Pembiayaan</option>
@endif
@if(config('redeemoption.enable_separuh') == 1)
@if(!in_array(Auth::user()->cawangan, config('redeemoption.cawangan_block', [])))
<option value="S">S = Sebahagian</option>
@endif
@endif
@if(config('redeemoption.enable_tambahpinjam') == 1)
@if(!in_array(Auth::user()->cawangan, config('redeemoption.cawangan_block', [])))
<option value="P">P = Tambah Pembiayaan</option>
@endif
@endif
@endif
@if(config('redeemoption.enable_pembiayaansemula') == 1)
@if(!in_array(Auth::user()->cawangan, config('redeemoption.cawangan_block', [])))
<option value="AT">PS = Pembiayaan Semula</option>
@endif
@endif
<option value="" disabled hidden>Pilih Jenis Penyelesaian Pembiayaan</option>
</select>
@@ -452,24 +452,22 @@ hr.new5 {
<table id="payment">
<tr>
<td style="width:10px">Pembiayaan</td>
<td style="width:10px">B. Pembiayaan + Keuntungan</td>
<td style="width:5px"> </td>
<td style="width:10px">: RM {{ number_format($gadai['pinjaman'],2) }} </td>
@php $temp_loan = $gadai['bakipjm'] + $transaction_keuntungan['bayaran_keuntungan']; @endphp
<td style="width:10px">: RM {{ number_format($temp_loan,2) }} </td>
</tr>
<tr>
<td style="width:10px">(-) Bayaran Pembiayaan</td>
<td style="width:10px">(-) Bayaran Pelanggan</td>
<td style="width:5px"> </td>
<td style="width:10px">: RM {{ number_format($transaction_keuntungan['bayaran_pembiayaan'],2) }}</td>
@php $temp_totalpay = $transaction_keuntungan['bayaran_pembiayaan'] + $transaction_keuntungan['bayaran_keuntungan']; @endphp
<td style="width:10px">: RM {{ number_format($temp_totalpay,2) }} </td>
</tr>
<tr>
<td style="width:10px">Keuntungan</td>
<td style="width:10px;">Jumlah Bayaran</td>
<td style="width:5px"> </td>
<td style="width:10px">: RM {{ number_format($transaction_keuntungan['bayaran_keuntungan'],2) }} </td>
</tr>
<tr>
<td style="width:10px">Pembiayaan Baru</td>
<td style="width:5px"> </td>
<td style="width:10px">: RM {{ number_format($gadai['bakipjm']-$transaction_keuntungan['bayaran_pembiayaan'],2) }} </td>
@php $total = $temp_loan - $temp_totalpay; @endphp
<td style="width:10px;">: RM {{ number_format($total,2) }}</td>
</tr>
<tr>
<td></td>
@@ -481,9 +479,9 @@ hr.new5 {
<td></td>
</tr>
<tr>
<td style="width:10px; font-size:17px"><b>Jumlah Bayaran</b></td>
<td style="width:10px; font-size:17px"><b>Pembiayaan Baru</b></td>
<td style="width:5px"> </td>
<td style="width:10px; font-size: 17px">: <b>RM {{ number_format($transaction_keuntungan['bayaran_pembiayaan']+$transaction_keuntungan['bayaran_keuntungan'],2) }}</b></td>
<td style="width:10px; font-size: 17px">: <b>RM {{ number_format($gadai['bakipjm'] - $transaction_keuntungan['bayaran_pembiayaan'],2) }}</b></td>
</tr>
</table>
<table id="payment" style="border: none; margin-top:20px; width:55%">
@@ -599,24 +597,22 @@ hr.new5 {
<table id="payment">
<tr>
<td style="width:10px">Pembiayaan</td>
<td style="width:10px">B. Pembiayaan + Keuntungan</td>
<td style="width:5px"> </td>
<td style="width:10px">: RM {{ number_format($gadai['pinjaman'],2) }} </td>
@php $temp_loan = $gadai['bakipjm'] + $transaction_keuntungan['bayaran_keuntungan']; @endphp
<td style="width:10px">: RM {{ number_format($temp_loan,2) }} </td>
</tr>
<tr>
<td style="width:10px">(-) Bayaran Pembiayaan</td>
<td style="width:10px">(-) Bayaran Pelanggan</td>
<td style="width:5px"> </td>
<td style="width:10px">: RM {{ number_format($transaction_keuntungan['bayaran_pembiayaan'],2) }}</td>
@php $temp_totalpay = $transaction_keuntungan['bayaran_pembiayaan'] + $transaction_keuntungan['bayaran_keuntungan']; @endphp
<td style="width:10px">: RM {{ number_format($temp_totalpay,2) }} </td>
</tr>
<tr>
<td style="width:10px">Keuntungan</td>
<td style="width:10px;">Jumlah Bayaran</td>
<td style="width:5px"> </td>
<td style="width:10px">: RM {{ number_format($transaction_keuntungan['bayaran_keuntungan'],2) }} </td>
</tr>
<tr>
<td style="width:10px">Pembiayaan Baru</td>
<td style="width:5px"> </td>
<td style="width:10px">: RM {{ number_format($gadai['bakipjm']-$transaction_keuntungan['bayaran_pembiayaan'],2) }} </td>
@php $total = $temp_loan - $temp_totalpay; @endphp
<td style="width:10px;">: RM {{ number_format($total,2) }}</td>
</tr>
<tr>
<td></td>
@@ -628,9 +624,9 @@ hr.new5 {
<td></td>
</tr>
<tr>
<td style="width:10px; font-size:17px"><b>Jumlah Bayaran</b></td>
<td style="width:10px; font-size:17px"><b>Pembiayaan Baru</b></td>
<td style="width:5px"> </td>
<td style="width:10px; font-size: 17px">: <b>RM {{ number_format($transaction_keuntungan['bayaran_pembiayaan']+$transaction_keuntungan['bayaran_keuntungan'],2) }}</b></td>
<td style="width:10px; font-size: 17px">: <b>RM {{ number_format($gadai['bakipjm'] - $transaction_keuntungan['bayaran_pembiayaan'],2) }}</b></td>
</tr>
</table>
<table id="payment" style="border: none; margin-top:20px; width:55%">