rerobe-js-orm 3.6.6 → 3.6.8
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.
|
@@ -429,15 +429,15 @@ class OrderHelpers {
|
|
|
429
429
|
};
|
|
430
430
|
}
|
|
431
431
|
const subtotalPricePresentmentWithSalePrice = lineItems
|
|
432
|
-
.map((i) => { var _a; return Number((_a = i.presentmentTotalPrice) === null || _a === void 0 ? void 0 : _a.amount); })
|
|
432
|
+
.map((i) => { var _a, _b; return Number((_a = i.presentmentTotalPrice) === null || _a === void 0 ? void 0 : _a.amount) + Number(((_b = i.presentmentTaxPrice) === null || _b === void 0 ? void 0 : _b.amount) || 0); })
|
|
433
433
|
.reduce((a, b) => a + b, 0);
|
|
434
434
|
const saleDiscountPresentmentAmount = subtotalOriginalPresentment - subtotalPricePresentmentWithSalePrice;
|
|
435
435
|
const creditDiscountPresentmentAmount = convertAndFixPrice(creditDiscountAmount || 0);
|
|
436
436
|
const additionalDiscountPresentmentAmount = convertAndFixPrice(additionalDiscount || 0);
|
|
437
437
|
const totalShippingPricePresentmentAmount = convertAndFixPrice(shippingPrice || 0);
|
|
438
|
-
const itemsTaxPresentmentAmount = convertAndFixPrice(itemsTax || 0);
|
|
439
|
-
const shippingFeeTaxPresentmentAmount = convertAndFixPrice(shippingFeeTax || 0);
|
|
440
|
-
const totalTaxPresentmentAmount = convertAndFixPrice(totalTax || 0);
|
|
438
|
+
const itemsTaxPresentmentAmount = convertAndFixPrice(itemsTax || 0, 5);
|
|
439
|
+
const shippingFeeTaxPresentmentAmount = convertAndFixPrice(shippingFeeTax || 0, 5);
|
|
440
|
+
const totalTaxPresentmentAmount = convertAndFixPrice(totalTax || 0, 5);
|
|
441
441
|
let subtotalPricePresentmentAmount = subtotalPricePresentmentWithSalePrice -
|
|
442
442
|
Number(creditDiscountPresentmentAmount) -
|
|
443
443
|
Number(additionalDiscountPresentmentAmount);
|
|
@@ -464,7 +464,7 @@ class OrderHelpers {
|
|
|
464
464
|
totalShippingPricePresentment: prepareMoneyObj(totalShippingPricePresentmentAmount),
|
|
465
465
|
totalPricePresentment: prepareMoneyObj(Number(subtotalPricePresentmentAmount) +
|
|
466
466
|
Number(totalShippingPricePresentmentAmount) +
|
|
467
|
-
Number(
|
|
467
|
+
Number(shippingFeeTaxPresentmentAmount)),
|
|
468
468
|
itemsTaxPresentment: prepareMoneyObj(itemsTaxPresentmentAmount),
|
|
469
469
|
shippingFeeTaxPresentment: prepareMoneyObj(shippingFeeTaxPresentmentAmount),
|
|
470
470
|
totalTaxPresentment: prepareMoneyObj(totalTaxPresentmentAmount),
|