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 -5
View File
@@ -35,11 +35,11 @@ var PrabayarJS = {
},
proses_print(oc, no_cetak) {
var cetak = new PrinterPos('apps/php/repo/nota.php');
cetak.add_param("data", "ppob-pos");
cetak.add_param("Nomor_Cetak", no_cetak);
cetak.add_param("Open_Cash", oc);
cetak.exec();
new PrinterPos('apps/php/repo/nota.php')
.addParam("data", "ppob-pos")
.addParam("Nomor_Cetak", no_cetak)
.addParam("Open_Cash", oc)
.exec();
},
proses_delete() {