foodbot-cart-calculations 1.0.30 → 1.0.31
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.
|
@@ -37,7 +37,7 @@ function getPointsDiscount(cartObject, points, userDetails) {
|
|
|
37
37
|
} else {
|
|
38
38
|
let pointsAmount = 0;
|
|
39
39
|
let count = 0;
|
|
40
|
-
let storeAmount = points.store_value;
|
|
40
|
+
let storeAmount = points.store_value ?? (points.original_store_value ?? 0);
|
|
41
41
|
let indexes = [];
|
|
42
42
|
|
|
43
43
|
if (points.redeem_categories && points.redeem_categories != '') {
|
|
@@ -76,7 +76,9 @@ function calculateTax2(cart, texSettings, taxType) {
|
|
|
76
76
|
if (itemIndex == cart.item_details.length - 1) {
|
|
77
77
|
cart.cart_total_with_tax = parseFloat(cart.cartTotal) + parseFloat(cart.tax_amount);
|
|
78
78
|
cart.cart_total_with_tax = parseFloat(cart.cart_total_with_tax).toFixed(2);
|
|
79
|
-
|
|
79
|
+
setTimeout(() => {
|
|
80
|
+
resolve(cart);
|
|
81
|
+
}, 100);
|
|
80
82
|
}
|
|
81
83
|
|
|
82
84
|
});
|
package/package.json
CHANGED