Refactor AJAX requests from Request.JSONF to Request_JSF across multiple scripts for consistency and improved functionality.
This commit is contained in:
@@ -237,7 +237,7 @@ var JualJS = {
|
||||
|
||||
detail_hapus: function(acell){
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Hapus item <strong>"'+acell[5]+'"</strong> ?', () => {
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['mode','mode_detail=delete','No_Jual','ID='+acell[0]],
|
||||
onSuccess: () => $('#Nama_Produk').focus()
|
||||
@@ -250,7 +250,7 @@ var JualJS = {
|
||||
FoniaJS.showInfo('Nilai Diskon diluar batas !');
|
||||
return false;
|
||||
}
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['mode','mode_detail','No_Jual','ID','InvID','SatuanID','VarianID','Qty','Harga_Beli','Harga_Jual','Disk_Rupiah','Disk_Persen'],
|
||||
onSuccess: () => {
|
||||
@@ -324,28 +324,28 @@ var JualJS = {
|
||||
}
|
||||
}).send();
|
||||
} else if (tipe=="tabel-detail"){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['mode','No_Jual']
|
||||
}).send();
|
||||
} else if (tipe=="brow-tx"){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/brow_tx',
|
||||
sendParam: ['Cari_TX'],
|
||||
onSuccess: () => FoniaJS.setFocus('#Cari_TX')
|
||||
}).send();
|
||||
} else if (tipe=="brow-pending"){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/brow_pending',
|
||||
}).send();
|
||||
} else if (tipe=="brow-member"){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/brow_member',
|
||||
sendParam: ['Cari_Member'],
|
||||
onSuccess: () => FoniaJS.setFocus('#Cari_Member')
|
||||
}).send();
|
||||
} else if (tipe=="brow-produk"){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/brow_produk',
|
||||
sendParam: ['Cari_Produk','Grup_MemberID'],
|
||||
onSuccess: () => FoniaJS.setFocus('#Cari_Produk')
|
||||
@@ -371,7 +371,7 @@ var JualJS = {
|
||||
// P : Satuan : Varian : Harga_Pokok : Harga_Jual : Stok
|
||||
//todo: jika stok kosong tidak simpan !!
|
||||
//if (parseInt(adata[5])>0 || _qty<0){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: JualJS.PHP + '/table_detail',
|
||||
sendParam: ['mode','mode_detail=insert','No_Jual','InvID='+item.value,'SatuanID='+adata[1],'VarianID='+adata[2],'Qty='+_qty,'Harga_Beli='+adata[3],'Harga_Jual='+adata[4]],
|
||||
onSuccess: () => $('#POS_Qty').val('1.00')
|
||||
@@ -386,7 +386,7 @@ var JualJS = {
|
||||
},
|
||||
|
||||
update_Piutang: function(){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/update_piutang',
|
||||
sendParam: ['MemberID'],
|
||||
onSuccess: () => FoniaJS.setFocus('#Nama_Produk')
|
||||
|
||||
Reference in New Issue
Block a user