1.added page that shows margin mutu harga emas.

2. change in gadaian page that have static 75% and 80% max pinjam turn to manipulate value of max pinjam based on mutu emas
This commit is contained in:
Hafifie PKB
2026-03-04 09:40:01 +08:00
parent 66b8f7f195
commit 73db8b97d7
7 changed files with 297 additions and 77 deletions
@@ -567,6 +567,7 @@
total_berat = 0;
total_kuantiti = 0;
var marhun_details = '';
var array_mutu = [];
tablemarhun.clear().draw();
$.each(data,function(index,marhun){
$.each(marhun,function(index,marhun_detail){
@@ -576,6 +577,7 @@
jumlah_nilai_marhun += Number(marhun_detail['n_marhun']);
status_tag_permata = marhun_detail['tag_permata'] == 1 ? 'Ada' : '';
total_kuantiti += Number(marhun_detail['bil']);
array_mutu.push([marhun_detail['karat'], marhun_detail['n_marhun']]);
tablemarhun.row.add([
counter,
marhun_detail['recno'],
@@ -659,6 +661,10 @@
$.ajax({
method:'GET',
url: api_url + '/api/maxpinjaman',
data: {
'mutu': array_mutu,
'total_nilai_marhun': total_nilai_marhun,
},
success:function(data){
$.each(data,function(index,pinjaman){