@pisell/pisellos 0.0.316 → 0.0.318
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.
|
@@ -3287,7 +3287,7 @@ export var CheckoutImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
3287
3287
|
return item.status !== 'voided' && item.order_payment_type === 'deposit';
|
|
3288
3288
|
}).reduce(function (sum, item) {
|
|
3289
3289
|
var amt = new Decimal(item.amount || '0');
|
|
3290
|
-
var rounding = new Decimal(
|
|
3290
|
+
var rounding = new Decimal(item.rounding_amount || '0');
|
|
3291
3291
|
return sum.plus(amt).sub(rounding);
|
|
3292
3292
|
}, new Decimal(0)).toFixed(2);
|
|
3293
3293
|
}
|
|
@@ -3297,7 +3297,7 @@ export var CheckoutImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
3297
3297
|
return item.status !== 'voided' && item.order_payment_type === 'deposit';
|
|
3298
3298
|
}).reduce(function (sum, item) {
|
|
3299
3299
|
var amt = new Decimal(item.amount || '0');
|
|
3300
|
-
var rounding = new Decimal(
|
|
3300
|
+
var rounding = new Decimal(item.rounding_amount || '0');
|
|
3301
3301
|
return sum.plus(amt).sub(rounding);
|
|
3302
3302
|
}, new Decimal(0)).toFixed(2);
|
|
3303
3303
|
}
|
|
@@ -2035,14 +2035,14 @@ var CheckoutImpl = class extends import_BaseModule.BaseModule {
|
|
|
2035
2035
|
if (this.store.currentOrder.is_deposit === 0 && processedPaymentItems.some((item) => item.order_payment_type === "deposit")) {
|
|
2036
2036
|
finalDepositAmount = processedPaymentItems.filter((item) => item.status !== "voided" && item.order_payment_type === "deposit").reduce((sum, item) => {
|
|
2037
2037
|
const amt = new import_decimal.default(item.amount || "0");
|
|
2038
|
-
const rounding = new import_decimal.default(
|
|
2038
|
+
const rounding = new import_decimal.default(item.rounding_amount || "0");
|
|
2039
2039
|
return sum.plus(amt).sub(rounding);
|
|
2040
2040
|
}, new import_decimal.default(0)).toFixed(2);
|
|
2041
2041
|
}
|
|
2042
2042
|
if (this.store.currentOrder.is_deposit === 1 && new import_decimal.default(finalDepositAmount).gte(new import_decimal.default(this.store.currentOrder.total_amount))) {
|
|
2043
2043
|
finalDepositAmount = processedPaymentItems.filter((item) => item.status !== "voided" && item.order_payment_type === "deposit").reduce((sum, item) => {
|
|
2044
2044
|
const amt = new import_decimal.default(item.amount || "0");
|
|
2045
|
-
const rounding = new import_decimal.default(
|
|
2045
|
+
const rounding = new import_decimal.default(item.rounding_amount || "0");
|
|
2046
2046
|
return sum.plus(amt).sub(rounding);
|
|
2047
2047
|
}, new import_decimal.default(0)).toFixed(2);
|
|
2048
2048
|
}
|