@pisell/pisellos 0.0.314 → 0.0.316
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,8 +3287,8 @@ 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(item.rounding_amount || '0')
|
|
3291
|
-
return sum.plus(amt).
|
|
3290
|
+
var rounding = new Decimal(Number(item.rounding_amount) || '0');
|
|
3291
|
+
return sum.plus(amt).sub(rounding);
|
|
3292
3292
|
}, new Decimal(0)).toFixed(2);
|
|
3293
3293
|
}
|
|
3294
3294
|
// 如果当前是定金支付,并且定金额度已经大于等于了订单总计,则 finalDepositAmount 为实际付出去的定金金额
|
|
@@ -3297,8 +3297,8 @@ 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(item.rounding_amount || '0')
|
|
3301
|
-
return sum.plus(amt).
|
|
3300
|
+
var rounding = new Decimal(Number(item.rounding_amount) || '0');
|
|
3301
|
+
return sum.plus(amt).sub(rounding);
|
|
3302
3302
|
}, new Decimal(0)).toFixed(2);
|
|
3303
3303
|
}
|
|
3304
3304
|
this.logInfo('定金金额确定结果', {
|
|
@@ -2035,15 +2035,15 @@ 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(item.rounding_amount || "0")
|
|
2039
|
-
return sum.plus(amt).
|
|
2038
|
+
const rounding = new import_decimal.default(Number(item.rounding_amount) || "0");
|
|
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(item.rounding_amount || "0")
|
|
2046
|
-
return sum.plus(amt).
|
|
2045
|
+
const rounding = new import_decimal.default(Number(item.rounding_amount) || "0");
|
|
2046
|
+
return sum.plus(amt).sub(rounding);
|
|
2047
2047
|
}, new import_decimal.default(0)).toFixed(2);
|
|
2048
2048
|
}
|
|
2049
2049
|
this.logInfo("定金金额确定结果", {
|