@pisell/pisellos 0.0.296 → 0.0.297
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.
|
@@ -483,9 +483,13 @@ export var CheckoutImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
483
483
|
hasDeposit: false
|
|
484
484
|
};
|
|
485
485
|
bookings === null || bookings === void 0 || bookings.forEach(function (item) {
|
|
486
|
+
var total = item.product.calculated_selling_price;
|
|
487
|
+
item.product.discount_list.forEach(function (discount) {
|
|
488
|
+
summaryDeposit.total = new Decimal(summaryDeposit.total).minus(discount.amount || 0).toNumber();
|
|
489
|
+
});
|
|
486
490
|
var deposit = getProductDeposit({
|
|
487
491
|
cartItem: {
|
|
488
|
-
total:
|
|
492
|
+
total: total
|
|
489
493
|
},
|
|
490
494
|
product: item.product,
|
|
491
495
|
bundle: item.bundle,
|
|
@@ -494,11 +498,6 @@ export var CheckoutImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
494
498
|
});
|
|
495
499
|
item.deposit = deposit;
|
|
496
500
|
if (deposit !== null && deposit !== void 0 && deposit.total && Number(deposit.total) > 0) {
|
|
497
|
-
// 需要减去商品券折扣卡抵扣的金额
|
|
498
|
-
summaryDeposit.total = new Decimal(summaryDeposit.total).plus(deposit.total).toNumber();
|
|
499
|
-
item.product.discount_list.forEach(function (discount) {
|
|
500
|
-
summaryDeposit.total = new Decimal(summaryDeposit.total).minus(discount.amount || 0).toNumber();
|
|
501
|
-
});
|
|
502
501
|
summaryDeposit.protocols = summaryDeposit.protocols.concat(deposit.protocols);
|
|
503
502
|
summaryDeposit.hasDeposit = true;
|
|
504
503
|
}
|
|
@@ -280,9 +280,13 @@ var CheckoutImpl = class extends import_BaseModule.BaseModule {
|
|
|
280
280
|
hasDeposit: false
|
|
281
281
|
};
|
|
282
282
|
bookings == null ? void 0 : bookings.forEach((item) => {
|
|
283
|
+
const total = item.product.calculated_selling_price;
|
|
284
|
+
item.product.discount_list.forEach((discount) => {
|
|
285
|
+
summaryDeposit.total = new import_decimal.default(summaryDeposit.total).minus(discount.amount || 0).toNumber();
|
|
286
|
+
});
|
|
283
287
|
const deposit = (0, import_utils2.getProductDeposit)({
|
|
284
288
|
cartItem: {
|
|
285
|
-
total
|
|
289
|
+
total
|
|
286
290
|
},
|
|
287
291
|
product: item.product,
|
|
288
292
|
bundle: item.bundle,
|
|
@@ -291,10 +295,6 @@ var CheckoutImpl = class extends import_BaseModule.BaseModule {
|
|
|
291
295
|
});
|
|
292
296
|
item.deposit = deposit;
|
|
293
297
|
if ((deposit == null ? void 0 : deposit.total) && Number(deposit.total) > 0) {
|
|
294
|
-
summaryDeposit.total = new import_decimal.default(summaryDeposit.total).plus(deposit.total).toNumber();
|
|
295
|
-
item.product.discount_list.forEach((discount) => {
|
|
296
|
-
summaryDeposit.total = new import_decimal.default(summaryDeposit.total).minus(discount.amount || 0).toNumber();
|
|
297
|
-
});
|
|
298
298
|
summaryDeposit.protocols = summaryDeposit.protocols.concat(
|
|
299
299
|
deposit.protocols
|
|
300
300
|
);
|