Skip to content

Commit

Permalink
FIX EPSON sync calls
Browse files Browse the repository at this point in the history
  • Loading branch information
eLBati committed Oct 11, 2024
1 parent 2db3452 commit 50ec815
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,15 @@ patch(PaymentScreen.prototype, {
await this.fp90.printFiscalReceipt(receipt);

// TODO loading screen
await new Promise(resolve => setTimeout(resolve, 2000));
}
},

async _finalizeValidation() {
const currentOrder = this.state.order;
// TODO funziona?
//this.ui.block();
await this.sendToFP90Printer(currentOrder);
//this.ui.unblock();
await super._finalizeValidation();
},

Expand Down
3 changes: 1 addition & 2 deletions fiscal_epos_print/static/src/js/epson_epos_print.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ export class EpsonEposPrint {
order.fiscal_receipt_date = fiscalReceiptDate.toISOString().slice(0, 10);
order.fiscal_z_rep_number = addInfo.zRepNumber;
order.fiscal_printer_serial = this.pos.config.fiscal_printer_serial;
//this.pos.push_single_order(order);
}

if (this.pos.config.fiscal_cashdrawer) {
Expand Down Expand Up @@ -259,7 +258,7 @@ export class EpsonEposPrint {

xml += `<endFiscalReceipt operator="${fiscalOperator}" /></printerFiscalReceipt>`;

this.fiscalPrinter.send(this.url, xml);
this.fiscalPrinter.send(this.url, xml, 0, "sync");
console.log(xml);
}

Expand Down

0 comments on commit 50ec815

Please sign in to comment.