Files
cmasa/app/Scripts/report/gel/harian_detail.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

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) {
var cetak = new Printer(this.PHP + '/print');
cetak.add_param("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">&nbsp;</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();
}
}
};