Files
cmasa/app/Scripts/ppob/ppobtx.js
T
siaupheng aaaf0a9215 Refactor member and product scripts to use concise method definitions
- Updated all function declarations to use ES6 shorthand method syntax in member.js, member_grup.js, point_barang.js, point_skema.js, point_tipe.js, kategori.js, operator.js, produk.js, produk_grup.js, rekpos.js, satuan.js, supplier.js, and varian.js.
2026-11-01 14:57:54 +07:00

98 lines
2.9 KiB
JavaScript

/*******************************************************************
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() {
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(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(no_tx) {
new Request_JSF({
url: this.PHP + '/table_tx',
sendParam: ['mode_detail=delete','No_TX='+no_tx,'Tgl_From','Tgl_To','Cari_TX']
}).send();
},
proses_reproc(no_tx) {
new Request_JSF({
url: this.PHP + '/table_tx',
sendParam: ['mode_detail=reproc','No_TX='+no_tx,'Tgl_From','Tgl_To','Cari_TX']
}).send();
},
nota_print(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Yakin ingin cetak ulang Nota "'+acell[0]+'" ?', () => {
this.proses_print(0, acell[0]);
}, 'info');
},
nota_delete(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus Nota "'+acell[0]+'" ?', () => {
FoniaJS.showAuth(() => this.proses_delete(acell[0]), this, 'DELETE '+acell[0]);
}, 'danger');
},
nota_reproc(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Yakin proses ulang "'+acell[0]+'" ?', () => this.proses_reproc(acell[0]), 'warning');
},
nota_detail(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() {
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(tipe) {
if (tipe=="tabel-detail"){
new Request_JSF({
url: this.PHP + '/table_tx',
sendParam: ['Tgl_From','Tgl_To','Cari_TX']
}).send();
}
}
};