@final-commerce/common 2.0.14 → 2.0.16-beta.1
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/dist/index.d.mts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +7 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -733,6 +733,9 @@ function getCashAmountDue(amount, cashRounding) {
|
|
|
733
733
|
function getSettlementTotal(payments, tipTotal) {
|
|
734
734
|
return toMinorUnits2(payments?.cardTotal) + toMinorUnits2(payments?.cashTotal) + toMinorUnits2(payments?.customTotal) + toMinorUnits2(tipTotal);
|
|
735
735
|
}
|
|
736
|
+
function getLineSubtotal(price, quantity) {
|
|
737
|
+
return toMinorUnits2(price) * toMinorUnits2(quantity);
|
|
738
|
+
}
|
|
736
739
|
function getGoodsPortion(total, totalTax) {
|
|
737
740
|
return toMinorUnits2(total) - toMinorUnits2(totalTax);
|
|
738
741
|
}
|
|
@@ -986,7 +989,8 @@ var REPORT_NEGATE_PATHS = /* @__PURE__ */ new Set([
|
|
|
986
989
|
"taxBreakdown.refunds.total.tax",
|
|
987
990
|
// Refunds breakdown — reductions and naturally-signed entries
|
|
988
991
|
"refundsBreakdown.discountsReversed",
|
|
989
|
-
|
|
992
|
+
// 2026 AUG10, cashRoundingRefund is showing as natural sign
|
|
993
|
+
// 'refundsBreakdown.cashRoundingRefund',
|
|
990
994
|
// Fees breakdown — refunded magnitudes are money flowing back out
|
|
991
995
|
"feesBreakdown.productFee.refundedProductFees",
|
|
992
996
|
"feesBreakdown.cartFee.refundedCartFees",
|
|
@@ -2554,6 +2558,7 @@ export {
|
|
|
2554
2558
|
getCurrentISODate,
|
|
2555
2559
|
getFinancialInvariantViolations,
|
|
2556
2560
|
getGoodsPortion,
|
|
2561
|
+
getLineSubtotal,
|
|
2557
2562
|
getMinorUnitMultiplier,
|
|
2558
2563
|
getMinorUnits,
|
|
2559
2564
|
getPaymentLegTotal,
|