shareneus 1.5.77 → 1.5.78
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.
|
@@ -468,15 +468,17 @@ function resolveTotals(invoiceData, totalTax, printConfigData = {}) {
|
|
|
468
468
|
}
|
|
469
469
|
}
|
|
470
470
|
const resolvedFinalTotal = finalTotalRaw ? finalTotal : totalBeforeRound + roundOff;
|
|
471
|
-
const discountLines = showDetailedDisc
|
|
471
|
+
const discountLines = (showDetailedDisc
|
|
472
472
|
? [
|
|
473
|
-
{ label: 'Items Discount',
|
|
474
|
-
{ label: 'Services Discount',
|
|
475
|
-
{ label: 'Overall Discount',
|
|
473
|
+
{ label: 'Items Discount', amount: itemsDiscount },
|
|
474
|
+
{ label: 'Services Discount', amount: servicesDiscount },
|
|
475
|
+
{ label: 'Overall Discount', amount: overallDiscount }
|
|
476
476
|
]
|
|
477
477
|
: [
|
|
478
|
-
{ label: 'Discount',
|
|
479
|
-
]
|
|
478
|
+
{ label: 'Discount', amount: discount }
|
|
479
|
+
])
|
|
480
|
+
.filter((line) => Math.abs(parseNumber(line === null || line === void 0 ? void 0 : line.amount)) > 0)
|
|
481
|
+
.map((line) => ({ label: line.label, value: formatAmountFixed2(line.amount) }));
|
|
480
482
|
const lines = [
|
|
481
483
|
{ label: 'SubTotal', value: formatAmountFixed2(subtotal) },
|
|
482
484
|
...discountLines,
|