/******************************************************************* PHP Class : /Controller/Ppob/PpobtxController Description : Transaksi PPOB Created By : Siau Pheng (siaupheng@3fonia.com). 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) { new PrinterPos('report/nota/ppob') .addParam("Nomor_Cetak", no_cetak) .addParam("Open_Cash", oc) .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('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(); } } };