Refactor printing logic across multiple scripts to use method chaining for improved readability and consistency

- 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.
This commit is contained in:
2026-11-02 14:03:32 +07:00
parent 5d246e039e
commit dcd13bb9df
52 changed files with 277 additions and 278 deletions
+4 -4
View File
@@ -43,10 +43,10 @@ var MemberJS = {
},
print_member(prt) {
var cetak = new Printer(this.PHP + '/print_member');
cetak.add_param("Grup_MemberID");
cetak.add_param("Aktif");
cetak.add_param("Tgl_Cetak");
let cetak = new Printer(this.PHP + '/print_member')
.addParam("Grup_MemberID")
.addParam("Aktif")
.addParam("Tgl_Cetak");
if (prt) cetak.doPrint(); else cetak.doPreview();
FoniaJS.closeWindow(this.winDPrint);
},