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",
|
DONATION: "DONATION",
|
||||||
// Fees
|
// Fees
|
||||||
RECYCLE_FEE: "RECYCLE FEE",
|
RECYCLE_FEE: "RECYCLE FEE",
|
||||||
|
PRICING_BY_DAY_UPCHARGE: "PREMAPPT GEN",
|
||||||
};
|
};
|
||||||
|
|
||||||
export { partNumberStrings };
|
export { partNumberStrings };
|
||||||
|
|
|
||||||
|
|
@ -250,9 +250,15 @@ export default {
|
||||||
isRecalibrationOnOrder && shouldHideRecalibration
|
isRecalibrationOnOrder && shouldHideRecalibration
|
||||||
? getItemsWithoutRecalParts(lineItems.glassParts)
|
? getItemsWithoutRecalParts(lineItems.glassParts)
|
||||||
: (lineItems.glassParts ?? []);
|
: (lineItems.glassParts ?? []);
|
||||||
|
const supportingItemsFromStore = lineItems?.supportingItems;
|
||||||
const supportingItemsWithoutFees = baseMixin.methods.filterOutCertainPartTypesOrNumbers(
|
const supportingItemsWithoutFees = baseMixin.methods.filterOutCertainPartTypesOrNumbers(
|
||||||
lineItems.supportingItems,
|
lineItems.supportingItems,
|
||||||
{ partNumbersToRemove: [partNumberStrings.RECYCLE_FEE] }
|
{
|
||||||
|
partNumbersToRemove: [
|
||||||
|
partNumberStrings.RECYCLE_FEE,
|
||||||
|
partNumberStrings.PRICING_BY_DAY_UPCHARGE,
|
||||||
|
],
|
||||||
|
}
|
||||||
);
|
);
|
||||||
const lineItemsToBePriced = {
|
const lineItemsToBePriced = {
|
||||||
glassParts: glassParts,
|
glassParts: glassParts,
|
||||||
|
|
@ -266,8 +272,8 @@ export default {
|
||||||
|
|
||||||
// Check to see if includePricingByDayUpcharge should already be set (based on order lineItems)
|
// Check to see if includePricingByDayUpcharge should already be set (based on order lineItems)
|
||||||
let includePricingByDayUpcharge = false;
|
let includePricingByDayUpcharge = false;
|
||||||
if (supportingItemsWithoutFees) {
|
if (supportingItemsFromStore) {
|
||||||
const pricingByDayUpchargeFeeIndex = supportingItemsWithoutFees.findIndex(
|
const pricingByDayUpchargeFeeIndex = supportingItemsFromStore?.findIndex(
|
||||||
(item) => item.partType == PRICING_BY_DAY_PART_TYPE
|
(item) => item.partType == PRICING_BY_DAY_PART_TYPE
|
||||||
);
|
);
|
||||||
if (pricingByDayUpchargeFeeIndex > -1) {
|
if (pricingByDayUpchargeFeeIndex > -1) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue