CASH-414 for CASH-152: Fix to ensure upcharge is excluded from base price
This commit is contained in:
parent
bc100ac4f9
commit
e7a8013ca4
2 changed files with 10 additions and 3 deletions
|
|
@ -5,6 +5,7 @@ const partNumberStrings = {
|
|||
DONATION: "DONATION",
|
||||
// Fees
|
||||
RECYCLE_FEE: "RECYCLE FEE",
|
||||
PRICING_BY_DAY_UPCHARGE: "PREMAPPT GEN",
|
||||
};
|
||||
|
||||
export { partNumberStrings };
|
||||
|
|
|
|||
|
|
@ -250,9 +250,15 @@ export default {
|
|||
isRecalibrationOnOrder && shouldHideRecalibration
|
||||
? getItemsWithoutRecalParts(lineItems.glassParts)
|
||||
: (lineItems.glassParts ?? []);
|
||||
const supportingItemsFromStore = lineItems?.supportingItems;
|
||||
const supportingItemsWithoutFees = baseMixin.methods.filterOutCertainPartTypesOrNumbers(
|
||||
lineItems.supportingItems,
|
||||
{ partNumbersToRemove: [partNumberStrings.RECYCLE_FEE] }
|
||||
{
|
||||
partNumbersToRemove: [
|
||||
partNumberStrings.RECYCLE_FEE,
|
||||
partNumberStrings.PRICING_BY_DAY_UPCHARGE,
|
||||
],
|
||||
}
|
||||
);
|
||||
const lineItemsToBePriced = {
|
||||
glassParts: glassParts,
|
||||
|
|
@ -266,8 +272,8 @@ export default {
|
|||
|
||||
// Check to see if includePricingByDayUpcharge should already be set (based on order lineItems)
|
||||
let includePricingByDayUpcharge = false;
|
||||
if (supportingItemsWithoutFees) {
|
||||
const pricingByDayUpchargeFeeIndex = supportingItemsWithoutFees.findIndex(
|
||||
if (supportingItemsFromStore) {
|
||||
const pricingByDayUpchargeFeeIndex = supportingItemsFromStore?.findIndex(
|
||||
(item) => item.partType == PRICING_BY_DAY_PART_TYPE
|
||||
);
|
||||
if (pricingByDayUpchargeFeeIndex > -1) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue