Refactor AJAX requests from Request.JSONF to Request_JSF across multiple scripts for consistency and improved functionality.
This commit is contained in:
@@ -207,7 +207,7 @@ var POSJS = {
|
||||
},
|
||||
|
||||
detail_hapus: function(acell){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['mode_detail=delete','No_Jual','ID='+acell[0]],
|
||||
onSuccess: () => {
|
||||
@@ -225,7 +225,7 @@ var POSJS = {
|
||||
FoniaJS.showInfo('Nilai Diskon diluar batas !');
|
||||
return false;
|
||||
}
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['mode_detail','No_Jual','ID','InvID','SatuanID','VarianID','Qty','Harga_Beli','Harga_Jual','Disk_Rupiah','Disk_Persen'],
|
||||
onSuccess: () => {
|
||||
@@ -392,28 +392,28 @@ var POSJS = {
|
||||
}
|
||||
}).send();
|
||||
} else if (tipe=='detail'){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['No_Jual']
|
||||
}).send();
|
||||
} else if (tipe=='brow-nota'){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/brow_nota',
|
||||
sendParam: ['Cari_Nota'],
|
||||
onSuccess: () => FoniaJS.setFocus('#Cari_Nota')
|
||||
}).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')
|
||||
@@ -455,7 +455,7 @@ var POSJS = {
|
||||
// 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: POSJS.PHP + '/table_detail',
|
||||
sendParam: ['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: () => {
|
||||
|
||||
Reference in New Issue
Block a user