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
+5 -6
View File
@@ -35,16 +35,15 @@ var POSJS = {
},
proses_oc() {
var cetak = new PrinterPos('report/nota/open_cash');
cetak.exec();
new PrinterPos('report/nota/open_cash').exec();
$('#Nama_Produk').focus();
},
proses_print(oc) {
var cetak = new PrinterPos('report/nota/pos');
cetak.add_param("Nomor_Cetak", $('#No_Cetak').val());
cetak.add_param("Open_Cash", oc);
cetak.exec();
new PrinterPos('report/nota/pos')
.addParam("Nomor_Cetak", $('#No_Cetak').val())
.addParam("Open_Cash", oc)
.exec();
},
proses_cancel() {