@posx/core 5.5.325 → 5.5.327
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 +2 -4
- package/package.json +1 -1
- package/package.publish.json +1 -1
package/build/index.js
CHANGED
|
@@ -810,9 +810,7 @@ var EscPosPrinter = class {
|
|
|
810
810
|
});
|
|
811
811
|
}
|
|
812
812
|
async interpret(template) {
|
|
813
|
-
const
|
|
814
|
-
if (template.codepage) encoder.codepage(template.codepage);
|
|
815
|
-
const printing = encoder.initialize();
|
|
813
|
+
const printing = new EscPosEncoder().initialize();
|
|
816
814
|
for (const printItem of template.items) {
|
|
817
815
|
if (!printItem) throw new Error("Item is undefined or null");
|
|
818
816
|
switch (printItem.style) {
|
|
@@ -2968,7 +2966,7 @@ var InvoiceBaseService = class extends AppRemoteService {
|
|
|
2968
2966
|
let ratio = 1;
|
|
2969
2967
|
if (!invoice.lines || !invoice.lines.some((x) => x.item.is_tax_exempt)) return ratio;
|
|
2970
2968
|
if (invoice.grand_total === 0 || invoice.subtotal === 0) return ratio;
|
|
2971
|
-
ratio = 1 -
|
|
2969
|
+
ratio = 1 - invoice.lines.filter((x) => x.item.is_tax_exempt).reduce((sum, line) => sum + line.subtotal, 0) / invoice.subtotal;
|
|
2972
2970
|
return ratio;
|
|
2973
2971
|
}
|
|
2974
2972
|
/**
|
package/package.json
CHANGED