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:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user