- 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.
54 lines
1.6 KiB
JavaScript
54 lines
1.6 KiB
JavaScript
/*******************************************************************
|
|
|
|
PHP Class : /Controller/Report/Member/PointController
|
|
Description : Laporan Point Member
|
|
Created By : Siau Pheng ([email protected]).
|
|
Created Date : May 9th, 2017.
|
|
Last Modified : October 17th, 2026.
|
|
|
|
(c) 3FONIA Software; WWW.3FONIA.COM.
|
|
|
|
*******************************************************************/
|
|
|
|
var RepoMemberPointJS = {
|
|
PHP: '',
|
|
KODE: '',
|
|
|
|
index() {
|
|
$('#butCetak').click(() => this.proses_print(true));
|
|
$('#butPreview').click(() => this.proses_print());
|
|
$('#butExcel').click(() => this.proses_dload());
|
|
},
|
|
|
|
proses_print(prt) {
|
|
if ($('#Point_TipeID').val() == 0){
|
|
FoniaJS.showInfo("Silakan pilih Tipe Point !");
|
|
return;
|
|
}
|
|
let cetak = new Printer(this.PHP + '/print')
|
|
.addParam("CabID")
|
|
.addParam("Point_TipeID")
|
|
.addParam("Grup_MemberID")
|
|
.addParam("Urut")
|
|
.addParam("Tgl_From")
|
|
.addParam("Tgl_To");
|
|
if (prt) cetak.doPrint(); else cetak.doPreview();
|
|
},
|
|
|
|
proses_dload() {
|
|
if ($('#Point_TipeID').val() == 0){
|
|
FoniaJS.showInfo("Silakan pilih Tipe Point !");
|
|
return;
|
|
}
|
|
var dload = new Download(this.PHP + '/excel');
|
|
dload.addParam("CabID");
|
|
dload.addParam("Point_TipeID");
|
|
dload.addParam("Grup_MemberID");
|
|
dload.addParam("Urut");
|
|
dload.addParam("Tgl_From");
|
|
dload.addParam("Tgl_To");
|
|
dload.download();
|
|
}
|
|
|
|
};
|