@final-commerce/common 2.0.11 → 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.d.mts +6 -2
- package/dist/index.d.ts +6 -2
- package/dist/index.js +11 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10 -0
- package/dist/index.mjs.map +1 -1
- package/dist/pos-types/index.d.mts +2 -1
- package/dist/pos-types/index.d.ts +2 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -231,6 +231,7 @@ var InventorySpecificActionType = /* @__PURE__ */ ((InventorySpecificActionType2
|
|
|
231
231
|
InventorySpecificActionType2["TRANSFER"] = "TRANSFER";
|
|
232
232
|
InventorySpecificActionType2["BULK_RECOUNT"] = "BULK_RECOUNT";
|
|
233
233
|
InventorySpecificActionType2["APPLIED_FROM_WOO"] = "APPLIED_FROM_WOO";
|
|
234
|
+
InventorySpecificActionType2["PO_RECEIVED"] = "PO_RECEIVED";
|
|
234
235
|
return InventorySpecificActionType2;
|
|
235
236
|
})(InventorySpecificActionType || {});
|
|
236
237
|
var ExtensionCategory = /* @__PURE__ */ ((ExtensionCategory2) => {
|
|
@@ -716,6 +717,14 @@ function amountToString(amount) {
|
|
|
716
717
|
return majorValue.toFixed(amount.minorUnits);
|
|
717
718
|
}
|
|
718
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
|
+
|
|
719
728
|
// constants/pricing.constants.ts
|
|
720
729
|
var REGION_MAPPING = {
|
|
721
730
|
// North America
|
|
@@ -2534,6 +2543,7 @@ export {
|
|
|
2534
2543
|
getMinorUnitMultiplier,
|
|
2535
2544
|
getMinorUnits,
|
|
2536
2545
|
getPricingRegionFromCountry,
|
|
2546
|
+
getTotalCollected,
|
|
2537
2547
|
inferStatesFromLegacyStatus,
|
|
2538
2548
|
isConditionOperator,
|
|
2539
2549
|
isFulfillmentState,
|