rerobe-js-orm 3.7.4 → 3.7.5
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.
|
@@ -356,10 +356,7 @@ class OrderHelpers {
|
|
|
356
356
|
.map((item) => {
|
|
357
357
|
// Determine if the product is on sale and set the price accordingly
|
|
358
358
|
const price = item.product.isOnSale && item.product.clearanceTimestamp ? item.product.salePrice : item.product.price;
|
|
359
|
-
|
|
360
|
-
if (item.discountedPrice !== undefined) {
|
|
361
|
-
basePrice = Number(item.discountedPrice); // Discounted price includes quantity
|
|
362
|
-
}
|
|
359
|
+
const basePrice = Number(price || 0) * Number(item.quantity);
|
|
363
360
|
if (item.isTaxable && item.taxRate) {
|
|
364
361
|
const taxAmount = basePrice * Number(item.taxRate); // Calculate the tax based on the base price
|
|
365
362
|
return basePrice + taxAmount; // Return the total including tax
|