first commit
This commit is contained in:
@@ -0,0 +1,97 @@
|
||||
/*******************************************************************
|
||||
|
||||
PHP Class : /Controller/Ppob/PpobtxController
|
||||
Description : Transaksi PPOB
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : October 6th, 2017.
|
||||
Last Modified : September 16th, 2026.
|
||||
|
||||
(c) 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
*******************************************************************/
|
||||
|
||||
var PPOBTXJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(){
|
||||
this.data_query('tabel-detail');
|
||||
$('#Cari_TX').keydown((e) => {
|
||||
var key = e.keyCode || e.which || 0;
|
||||
if (key==13 && e.target.value!='') this.data_query('tabel-detail');
|
||||
});
|
||||
$('#butSearch').click(() => this.data_query('tabel-detail'));
|
||||
$('#butAll').click(() => {
|
||||
$('#Cari_TX').val('');
|
||||
this.data_query('tabel-detail');
|
||||
});
|
||||
FoniaJS.setFocus('#Cari_TX');
|
||||
},
|
||||
|
||||
proses_print: function(oc, no_cetak){
|
||||
var cetak = new PrinterPos('report/nota/ppob');
|
||||
cetak.add_param("Nomor_Cetak", no_cetak);
|
||||
cetak.add_param("Open_Cash", oc);
|
||||
cetak.exec();
|
||||
},
|
||||
|
||||
proses_delete: function(no_tx){
|
||||
new Request.JSONF({
|
||||
url: this.PHP + '/table_tx',
|
||||
sendParam: ['mode_detail=delete','No_TX='+no_tx,'Tgl_From','Tgl_To','Cari_TX']
|
||||
}).send();
|
||||
},
|
||||
|
||||
proses_reproc: function(no_tx){
|
||||
new Request.JSONF({
|
||||
url: this.PHP + '/table_tx',
|
||||
sendParam: ['mode_detail=reproc','No_TX='+no_tx,'Tgl_From','Tgl_To','Cari_TX']
|
||||
}).send();
|
||||
},
|
||||
|
||||
nota_print: function(acell){
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin ingin cetak ulang Nota "'+acell[0]+'" ?', () => {
|
||||
this.proses_print(0, acell[0]);
|
||||
}, 'info');
|
||||
},
|
||||
|
||||
nota_delete: function(acell){
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus Nota "'+acell[0]+'" ?', () => {
|
||||
FoniaJS.showAuth(() => this.proses_delete(acell[0]), this, 'DELETE '+acell[0]);
|
||||
}, 'danger');
|
||||
},
|
||||
|
||||
nota_reproc: function(acell){
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin proses ulang "'+acell[0]+'" ?', () => this.proses_reproc(acell[0]), 'warning');
|
||||
},
|
||||
|
||||
nota_detail: function(acell){
|
||||
new Request({
|
||||
url: this.PHP + '/form_tx',
|
||||
sendParam: ['No_TX='+acell[0]],
|
||||
onSuccess: (adata) => {
|
||||
this.winInfo = FoniaJS.showWindow('Info', 'Informasi Transaksi', adata.html, 'md');
|
||||
}
|
||||
}).send();
|
||||
},
|
||||
|
||||
saldo_ppob: function(){
|
||||
new Request({
|
||||
url: this.PHP + '/form_saldo',
|
||||
onSuccess: (adata) => {
|
||||
var _obtn = $('button:contains("Saldo")');
|
||||
if (_obtn) _obtn.html('<i class="bi-coin me-2"></i>Saldo Rp. '+adata.Saldo);
|
||||
}
|
||||
}).send();
|
||||
},
|
||||
|
||||
data_query: function(tipe){
|
||||
if (tipe=="tabel-detail"){
|
||||
new Request.JSONF({
|
||||
url: this.PHP + '/table_tx',
|
||||
sendParam: ['Tgl_From','Tgl_To','Cari_TX']
|
||||
}).send();
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
Reference in New Issue
Block a user