@metron-labs/quote-react 0.1.75 → 0.1.77
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/util/pricing.js
CHANGED
|
@@ -183,7 +183,9 @@ const coverageFromDescription = (item, requestedUnit, sellUnit) => {
|
|
|
183
183
|
return Number.isFinite(coverage) && coverage > 0 ? coverage : null;
|
|
184
184
|
};
|
|
185
185
|
export const needsQuantityConfirmation = (item, pricing) => pricing.costingMode === "review" &&
|
|
186
|
-
!(
|
|
186
|
+
!(["llm_basket_line", "rule_based_pallet_quantity"].includes(item.conversionConfidence ?? "") &&
|
|
187
|
+
item.sellUnitsOverride != null &&
|
|
188
|
+
!item.conversionNotes?.trim());
|
|
187
189
|
export function getCartSubtotal(items, options) {
|
|
188
190
|
const totals = items.map((item) => getPricingBreakdown(item, options).lineTotal);
|
|
189
191
|
return totals.some((total) => total == null) ? null : totals.reduce((sum, total) => sum + (total ?? 0), 0);
|