@pisell/pisellos 0.0.298 → 0.0.299
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.
|
@@ -496,6 +496,7 @@ export var CheckoutImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
496
496
|
item.deposit = deposit;
|
|
497
497
|
if (deposit !== null && deposit !== void 0 && deposit.total && Number(deposit.total) > 0) {
|
|
498
498
|
summaryDeposit.protocols = summaryDeposit.protocols.concat(deposit.protocols);
|
|
499
|
+
summaryDeposit.total = new Decimal(summaryDeposit.total).plus(deposit.total).toNumber();
|
|
499
500
|
summaryDeposit.hasDeposit = true;
|
|
500
501
|
}
|
|
501
502
|
});
|
|
@@ -295,6 +295,7 @@ var CheckoutImpl = class extends import_BaseModule.BaseModule {
|
|
|
295
295
|
summaryDeposit.protocols = summaryDeposit.protocols.concat(
|
|
296
296
|
deposit.protocols
|
|
297
297
|
);
|
|
298
|
+
summaryDeposit.total = new import_decimal.default(summaryDeposit.total).plus(deposit.total).toNumber();
|
|
298
299
|
summaryDeposit.hasDeposit = true;
|
|
299
300
|
}
|
|
300
301
|
});
|
|
@@ -1783,7 +1784,9 @@ var CheckoutImpl = class extends import_BaseModule.BaseModule {
|
|
|
1783
1784
|
return "0.00";
|
|
1784
1785
|
}
|
|
1785
1786
|
let totalAmount = new import_decimal.default(this.store.currentOrder.total_amount || "0");
|
|
1786
|
-
const currentOrder = await this.payment.getPaymentOrderByUuidAsync(
|
|
1787
|
+
const currentOrder = await this.payment.getPaymentOrderByUuidAsync(
|
|
1788
|
+
this.store.currentOrder.uuid
|
|
1789
|
+
);
|
|
1787
1790
|
if ((currentOrder == null ? void 0 : currentOrder.is_deposit) && (currentOrder == null ? void 0 : currentOrder.deposit_amount) && Number(currentOrder == null ? void 0 : currentOrder.deposit_amount) > 0) {
|
|
1788
1791
|
totalAmount = new import_decimal.default(currentOrder == null ? void 0 : currentOrder.deposit_amount);
|
|
1789
1792
|
}
|
|
@@ -1829,8 +1832,12 @@ var CheckoutImpl = class extends import_BaseModule.BaseModule {
|
|
|
1829
1832
|
var _a, _b, _c, _d;
|
|
1830
1833
|
try {
|
|
1831
1834
|
if (((_a = this.store.currentOrder) == null ? void 0 : _a.is_deposit) === 1) {
|
|
1832
|
-
const paymentItems = await this.payment.getPaymentItemsAsync(
|
|
1833
|
-
|
|
1835
|
+
const paymentItems = await this.payment.getPaymentItemsAsync(
|
|
1836
|
+
(_b = this.store.currentOrder) == null ? void 0 : _b.uuid
|
|
1837
|
+
);
|
|
1838
|
+
const depositPaidAmount = paymentItems.filter(
|
|
1839
|
+
(item) => item.order_payment_type === "deposit" && item.status !== "voided"
|
|
1840
|
+
).reduce((sum, item) => {
|
|
1834
1841
|
if (item.voucher_id && !item.isSynced) {
|
|
1835
1842
|
return sum;
|
|
1836
1843
|
}
|
|
@@ -2048,13 +2055,15 @@ var CheckoutImpl = class extends import_BaseModule.BaseModule {
|
|
|
2048
2055
|
deposit: void 0
|
|
2049
2056
|
};
|
|
2050
2057
|
}),
|
|
2051
|
-
relation_products: (_f = this.store.localOrderData.relation_products) == null ? void 0 : _f.map(
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
+
relation_products: (_f = this.store.localOrderData.relation_products) == null ? void 0 : _f.map(
|
|
2059
|
+
(item) => {
|
|
2060
|
+
return {
|
|
2061
|
+
...item,
|
|
2062
|
+
custom_deposit_data: void 0,
|
|
2063
|
+
deposit: void 0
|
|
2064
|
+
};
|
|
2065
|
+
}
|
|
2066
|
+
)
|
|
2058
2067
|
};
|
|
2059
2068
|
if (isUpdateOperation) {
|
|
2060
2069
|
if ((0, import_utils.isVirtualOrderId)(currentOrderId)) {
|