@final-commerce/common 2.0.12 → 2.0.13

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
@@ -717,6 +717,14 @@ function amountToString(amount) {
717
717
  return majorValue.toFixed(amount.minorUnits);
718
718
  }
719
719
 
720
+ // utils/order-totals.util.ts
721
+ function toMinorUnits2(value) {
722
+ return Number(value) || 0;
723
+ }
724
+ function getTotalCollected(amountPaid, tipTotal) {
725
+ return toMinorUnits2(amountPaid) + toMinorUnits2(tipTotal);
726
+ }
727
+
720
728
  // constants/pricing.constants.ts
721
729
  var REGION_MAPPING = {
722
730
  // North America
@@ -2535,6 +2543,7 @@ export {
2535
2543
  getMinorUnitMultiplier,
2536
2544
  getMinorUnits,
2537
2545
  getPricingRegionFromCountry,
2546
+ getTotalCollected,
2538
2547
  inferStatesFromLegacyStatus,
2539
2548
  isConditionOperator,
2540
2549
  isFulfillmentState,