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:
@@ -100,8 +100,8 @@ var OpnameJS = {
|
||||
|
||||
tx_print(prt) {
|
||||
if ($('#No_Opname').val()) {
|
||||
var cetak = new Printer('report/nota/opname');
|
||||
cetak.add_param("Nomor_Cetak", $('#No_Opname').val());
|
||||
let cetak = new Printer('report/nota/opname')
|
||||
.addParam("Nomor_Cetak", $('#No_Opname').val());
|
||||
if (prt) cetak.doPrint(); else cetak.doPreview();
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user