@posx/core 5.5.365 → 5.5.367

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/index.js CHANGED
@@ -4010,7 +4010,7 @@ var InvoiceOperationService = class extends LineOperationService {
4010
4010
  if (targetSectionItem.status != SectionItemStatus.CLOSED) throw new SystemError("target table is occupied");
4011
4011
  if (invoice.lines == null || invoice.lines.length <= 0) throw new SystemError("source table has nothing to switch");
4012
4012
  targetSectionItem.invoice_uid = invoice.uid;
4013
- targetSectionItem.status = SectionItemStatus.OPENED;
4013
+ targetSectionItem.status = sourceSectionItem.status;
4014
4014
  sourceSectionItem.invoice_uid = "";
4015
4015
  sourceSectionItem.status = SectionItemStatus.CLOSED;
4016
4016
  invoice.table_uid = targetSectionItem.uid;
@@ -4215,7 +4215,8 @@ var InvoiceOperationService = class extends LineOperationService {
4215
4215
  if (!response.results || response.results.length <= 0) throw new SystemError("The invoice does not have a receipt");
4216
4216
  printJob = response.results[0];
4217
4217
  }
4218
- const printer = await this.printerService.getDefaultReceiptPrinter();
4218
+ let printer = await this.printerService.getOne(printJob.printer_uid);
4219
+ if (!printer) printer = await this.printerService.getDefaultReceiptPrinter();
4219
4220
  if (!printer) throw new SystemError("Receipt printer not found");
4220
4221
  printJob = this.printJobService.replacePrinter(printJob, printer);
4221
4222
  printJob.uid = ModelPrefix.PrintJob + nanoid();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@posx/core",
3
- "version": "5.5.365",
3
+ "version": "5.5.367",
4
4
  "description": "POSX core libraries",
5
5
  "main": "./build/index.js",
6
6
  "author": "Steven Lee",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@posx/core",
3
- "version": "5.5.365",
3
+ "version": "5.5.367",
4
4
  "description": "POSX core libraries",
5
5
  "type": "module",
6
6
  "main": "./build/index.js",