- Updated Printer and PrinterPos instantiation to use method chaining with addParam instead of add_param. - Refactored print functions in various modules including opname.js, pos.js, tukar.js, ppobtx.js, prabayar.js, and multiple report scripts. - Enhanced code clarity and maintainability by standardizing parameter addition for print jobs.
68 lines
2.6 KiB
JavaScript
68 lines
2.6 KiB
JavaScript
/*******************************************************************
|
|
|
|
PHP Class : /Controller/Report/Gel/HariandetailController
|
|
Description : Laporan Jurnal Detail
|
|
Created By : Siau Pheng ([email protected]).
|
|
Created Date : June 5th, 2009.
|
|
Last Modified : October 24th, 2026.
|
|
|
|
(c) 3FONIA Software; WWW.3FONIA.COM.
|
|
|
|
*******************************************************************/
|
|
|
|
var RepoGelHDetailJS = {
|
|
PHP: '',
|
|
KODE: '',
|
|
|
|
index() {
|
|
$('#butCetak').click(() => this.proses_print(true));
|
|
$('#butPreview').click(() => this.proses_print());
|
|
$('#butBrowJurnal').click(() => this.jurnal_brow());
|
|
$('#Kode_Jurnal').keyup((e) => {
|
|
if ((e.which || e.keyCode) == 13) {
|
|
if (($("#Kode_Jurnal")) && ($("#Kode_Jurnal").val() !== '')) this.proses_print();
|
|
}
|
|
});
|
|
FoniaJS.setFocus('#Kode_Jurnal');
|
|
},
|
|
|
|
proses_print(prt) {
|
|
let cetak = new Printer(this.PHP + '/print')
|
|
.addParam("Kode_Jurnal");
|
|
if (prt) cetak.doPrint(); else cetak.doPreview();
|
|
},
|
|
|
|
jurnal_brow() {
|
|
var _isi = new String('<div class="row mb-1"><div class="col"><div class="input-group"><input class="form-control" id="Cari_Jurnal" placeholder="Kunci Pencarian" type="text"><button class="btn btn-info shadow-none" type="button" id="butSearch">Cari</button><button class="btn btn-secondary shadow-none" type="button" id="butAll">Semua</button></div></div></div><div id="divBrowJurnal"> </div>');
|
|
this.winBTX = FoniaJS.showWindow('BTX', 'Daftar Transaksi', _isi, 'xl', '', () => {
|
|
$('#winBTX')
|
|
.find('#Cari_Jurnal').keydown((e) => {
|
|
var key = e.keyCode || e.which || 0;
|
|
if (key==13 && e.target.value!='') this.data_query('brow-jurnal');
|
|
}).end()
|
|
.find('#butSearch').click(() => this.data_query('brow-jurnal')).end()
|
|
.find('#butAll').click(() => {
|
|
$('#winBTX').find('#Cari_Jurnal').val('');
|
|
this.data_query('brow-jurnal');
|
|
});
|
|
this.data_query('brow-jurnal');
|
|
});
|
|
},
|
|
|
|
jurnal_select(acell) {
|
|
FoniaJS.closeWindow(this.winBTX);
|
|
$('#Kode_Jurnal').val(acell[0]);
|
|
},
|
|
|
|
data_query(tipe, mode) {
|
|
if (tipe=="brow-jurnal"){
|
|
new Request_JSF({
|
|
url: this.PHP + '/brow_jurnal',
|
|
sendParam: ['Cari_Jurnal'],
|
|
onSuccess: () => FoniaJS.setFocus('#Cari_Jurnal')
|
|
}).send();
|
|
}
|
|
}
|
|
|
|
};
|