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
+3 -3
View File
@@ -118,9 +118,9 @@ var MemberTukarJS = {
tx_print() {
if ($('#No_TX').val()) {
var cetak = new PrinterPos('report/nota/tukarpoint_pos');
cetak.add_param("Nomor_Cetak", $('#No_TX').val());
cetak.exec();
new PrinterPos('report/nota/tukarpoint_pos')
.addParam("Nomor_Cetak", $('#No_TX').val())
.exec();
return;
}
FoniaJS.showError("Silakan masukkan Nomor Transaksi !");