diff --git a/app/Http/Controllers/KhazanahController.php b/app/Http/Controllers/KhazanahController.php
index af83b2a..a1e10f2 100644
--- a/app/Http/Controllers/KhazanahController.php
+++ b/app/Http/Controllers/KhazanahController.php
@@ -231,8 +231,7 @@ class KhazanahController extends Controller
$totalkeluar = $tebus_detail['addpinjaman'] + $keluar;
$totalmasuk = $tebus_detail['bakiupah'] + $masuk;
-
- $bakiakhir = $bakiawal-$totalkeluar+$totalmasuk+$pendahuluan-$serahan;
+ // $bakiakhir = $bakiawal-$totalkeluar+$totalmasuk+$pendahuluan-$serahan;
$updateTunai=Http::put( config('api.url').'/api/updateTunaiGT/'.$auth_user['cawangan'], [
@@ -245,7 +244,7 @@ class KhazanahController extends Controller
}else{
$totalmasuk = $tebus_detail['bakipjm'] + $masuk;
- $bakiakhir = $bakiawal-$keluar+$totalmasuk+$pendahuluan-$serahan;
+ // $bakiakhir = $bakiawal-$keluar+$totalmasuk+$pendahuluan-$serahan;
$updateTunai=Http::put( config('api.url').'/api/updateTunaiGT/'.$auth_user['cawangan'], [
'kodlaluan' => $tebus_detail['teller'],
diff --git a/resources/views/customers/info.blade.php b/resources/views/customers/info.blade.php
index 3eea947..d527bd1 100644
--- a/resources/views/customers/info.blade.php
+++ b/resources/views/customers/info.blade.php
@@ -493,7 +493,7 @@
urlroute = urlroute.replace(':id', gadai_detail["norujukan"]);
tablelelong.row.add([
counter,
- '' + gadai_detail['norujukan'] + '',
+ '' + gadai_detail['norujukan'] + '',
gadai_detail['t_lelong'],
gadai_detail['trkhtuntut'],
'RM '+ formatter.format(gadai_detail['pinjaman']),
@@ -508,6 +508,30 @@
});
});
}
+
+ function checktuntutbaki(e)
+ {
+ let tarikhtuntut = $(e).data('tarikhtuntut');
+ let norujukan = $(e).data('norujukan');
+
+ var urlroute = '{{ route("lelongan", ":id") }}';
+ urlroute = urlroute.replace(':id', norujukan);
+
+ if (tarikhtuntut == null)
+ {
+ window.location.href = urlroute;
+ }else{
+ Swal.fire({
+ icon: 'error',
+ title: 'Amaran',
+ text: 'Lelongan telah dibayar!'
+ });
+ }
+
+ return false;
+ }
+
+
$(document).ready( function () {
$('#myTable').parents('div.dataTables_wrapper').first().hide();
diff --git a/resources/views/khazanah/dashboard.blade.php b/resources/views/khazanah/dashboard.blade.php
index 5052511..2999622 100644
--- a/resources/views/khazanah/dashboard.blade.php
+++ b/resources/views/khazanah/dashboard.blade.php
@@ -181,7 +181,7 @@
-
RM {{ number_format($komuditicheck['unit_komuditi'],2) }}
+
RM {{ ($komuditicheck) ? number_format($komuditicheck['unit_komuditi'],2) : '0.00' }}
Baki Komuditi
diff --git a/resources/views/khazanah/laporan/penebusan.blade.php b/resources/views/khazanah/laporan/penebusan.blade.php
index 2c2d150..b60533b 100644
--- a/resources/views/khazanah/laporan/penebusan.blade.php
+++ b/resources/views/khazanah/laporan/penebusan.blade.php
@@ -40,7 +40,7 @@
No K/P |
No Rujukan |
Pembiayaan (RM) |
-
Upah (RM) |
+
Keuntungan (RM) |
Bayaran (RM) |
@@ -115,8 +115,8 @@
gadai[0][0]['nokp'],
tebus['norujukan'],
tebus['pinjaman'],
- tebus['upahasal'],
- ''
+ tebus['bakiupah'],
+ tebus['bakipjm']
]).draw();
}
});
diff --git a/resources/views/penebusan/index.blade.php b/resources/views/penebusan/index.blade.php
index ac56e34..58f3bc3 100644
--- a/resources/views/penebusan/index.blade.php
+++ b/resources/views/penebusan/index.blade.php
@@ -1306,9 +1306,19 @@
buttonsStyling: false
});
+ let text = '';
+ if((parseFloat($('#basic-addon2').text()) > 75 && parseFloat($('#basic-addon2').text()) <= 80))
+ {
+ text = 'Tetapan margin melebihi 75% untuk Operasi!';
+ }else if(pinjamanbaru >= 10000)
+ {
+ text = 'Pembiayaan melebihi RM 10,000!';
+ }
+
+
swalWithBootstrapButtons.fire({
title: 'Dapatkan Pengesahan Operasi',
- text: "Tetapan margin melebihi 75% untuk Operasi!",
+ text: text,
icon: 'info',
showCancelButton: true,
confirmButtonText: 'Hantar',
@@ -1318,7 +1328,15 @@
if (result.isConfirmed) {
let nm = $('#nilai_marhun_total').text();let ber = $('#berat_marhun_total').text();let marg = $('#basic-addon2').text();
- let komen = "Pembiayaan Melebihi Margin 75%|" + nm + "|" + ber + "|" + marg + "| Tambah Pinjaman";
+ let komen = '';
+ if((parseFloat($('#basic-addon2').text()) > 75 && parseFloat($('#basic-addon2').text()) <= 80))
+ {
+ komen = "Pembiayaan Melebihi Margin 75%|" + nm + "|" + ber + "|" + marg + "| Tambah Pinjaman";
+ }else if(pinjamanbaru >= 10000)
+ {
+ komen = "Pembiayaan Melebihi RM 10,000|" + nm + "|" + ber + "|" + marg + "| Tambah Pinjaman";
+ }
+
let jumpinjam = $('#pinjamanbaru').val();
let teller = "{{ Auth::user()->name }}";
diff --git a/resources/views/print/laporan_ringkasanharian.blade.php b/resources/views/print/laporan_ringkasanharian.blade.php
index cf30452..4069c25 100644
--- a/resources/views/print/laporan_ringkasanharian.blade.php
+++ b/resources/views/print/laporan_ringkasanharian.blade.php
@@ -217,14 +217,14 @@
BIL
N. MARHUN
PEMBIAYAAN
- UPAH SIMPAN
+ KEUNTUNGAN
|
{{ $marhun['tebus'][0]['bilangan'] }}
{{ number_format($marhun['tebus'][0]['jumlahmarhun'],2) }}
{{ number_format($marhun['tebus'][0]['jumlahpinjaman'],2) }}
{{ number_format($marhun['tebus'][0]['upahsimpan'],2) }}
|
-
UPAH SIMPAN
+ | KEUNTUNGAN
CAJ LELONG
|
{{ number_format($keseluruhanupahsimpan,2) }}
@@ -237,7 +237,7 @@
| BIL
N. MARHUN
PEMBIAYAAN
- UPAH SIMPAN
+ KEUNTUNGAN
|
{{ $marhun['advansur'][0]['bilangan'] }}
{{ number_format($marhun['advansur'][0]['jumlahmarhun'],2) }}
@@ -252,7 +252,7 @@
| BIL
N. MARHUN
PEMBIAYAAN
- UPAH SIMPAN
+ KEUNTUNGAN
CAJ LELONG
LEBIHAN LELONG
RUGI LELONG
diff --git a/resources/views/print/laporan_ringkasanterkumpul.blade.php b/resources/views/print/laporan_ringkasanterkumpul.blade.php
index 70b9281..c2f46ea 100644
--- a/resources/views/print/laporan_ringkasanterkumpul.blade.php
+++ b/resources/views/print/laporan_ringkasanterkumpul.blade.php
@@ -217,14 +217,14 @@
| BIL
N. MARHUN
PEMBIAYAAN
- UPAH SIMPAN
+ KEUNTUNGAN
|
{{ $marhun['tebus'][0]['bilangan'] }}
{{ number_format($marhun['tebus'][0]['jumlahmarhun'],2) }}
{{ number_format($marhun['tebus'][0]['jumlahpinjaman'],2) }}
{{ number_format($marhun['tebus'][0]['upahsimpan'],2) }}
|
-
UPAH SIMPAN
+ | KEUNTUNGAN
CAJ LELONG
|
{{ number_format($keseluruhanupahsimpan,2) }}
@@ -237,7 +237,7 @@
| BIL
N. MARHUN
PEMBIAYAAN
- UPAH SIMPAN
+ KEUNTUNGAN
|
{{ $marhun['advansur'][0]['bilangan'] }}
{{ number_format($marhun['advansur'][0]['jumlahmarhun'],2) }}
@@ -252,7 +252,7 @@
| BIL
N. MARHUN
PEMBIAYAAN
- UPAH SIMPAN
+ KEUNTUNGAN
CAJ LELONG
LEBIHAN LELONG
RUGI LELONG
|