CSR-2186 hide mobile line item when 0
CSR-2186 hide mobile line item when 0
This commit is contained in:
parent
95c6e0c0aa
commit
914edd39a9
1 changed files with 7 additions and 5 deletions
|
|
@ -769,7 +769,12 @@ export default {
|
|||
(lineItem) => lineItem.partType == partTypeStrings.MOBILE_FEE
|
||||
);
|
||||
|
||||
if (mobileFeeLineItem) {
|
||||
var mobileTotal =
|
||||
(mobileFeeLineItem?.kitPrice ?? 0) +
|
||||
(mobileFeeLineItem?.laborAmount ?? 0) +
|
||||
(mobileFeeLineItem?.sellingPrice ?? 0);
|
||||
|
||||
if (mobileFeeLineItem && mobileTotal > 0) {
|
||||
cartItem = {
|
||||
name: this.mobileFeeCartItemName,
|
||||
category: cartItemCategories.SUPPORTING_ITEMS,
|
||||
|
|
@ -785,10 +790,7 @@ export default {
|
|||
};
|
||||
mobileFeeLineItem.cartItemType = cartItem.cartItemType;
|
||||
cartItem.lineItems.push(mobileFeeLineItem);
|
||||
cartItem.subTotal +=
|
||||
(mobileFeeLineItem.kitPrice ?? 0) +
|
||||
(mobileFeeLineItem.laborAmount ?? 0) +
|
||||
(mobileFeeLineItem.sellingPrice ?? 0);
|
||||
cartItem.subTotal += mobileTotal;
|
||||
cartItem.salesTax += mobileFeeLineItem.salesTax ?? 0;
|
||||
}
|
||||
return cartItem;
|
||||
|
|
|
|||
Loading…
Reference in a new issue