@final-commerce/common 2.0.14 → 2.0.15

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.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
  }
@@ -2554,6 +2557,7 @@ export {
2554
2557
  getCurrentISODate,
2555
2558
  getFinancialInvariantViolations,
2556
2559
  getGoodsPortion,
2560
+ getLineSubtotal,
2557
2561
  getMinorUnitMultiplier,
2558
2562
  getMinorUnits,
2559
2563
  getPaymentLegTotal,