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:
@@ -44,10 +44,10 @@ var PPOBProdukJS = {
|
||||
},
|
||||
|
||||
print_produk(prt) {
|
||||
var cetak = new Printer(this.PHP + '/print_produk');
|
||||
cetak.add_param("KateID");
|
||||
cetak.add_param("OpeID");
|
||||
cetak.add_param("Tgl_Cetak");
|
||||
let cetak = new Printer(this.PHP + '/print_produk')
|
||||
.addParam("KateID")
|
||||
.addParam("OpeID")
|
||||
.addParam("Tgl_Cetak");
|
||||
if (prt) cetak.doPrint(); else cetak.doPreview();
|
||||
FoniaJS.closeWindow(this.winDPrint);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user