CSR-1392
set amount due for PIA
This commit is contained in:
parent
23373e8925
commit
f2fc50cd3e
5 changed files with 16 additions and 19 deletions
|
|
@ -129,8 +129,6 @@ export default {
|
|||
|
||||
let vapsCartItemsForSelectedPackage = [];
|
||||
|
||||
console.log(this.cartItems);
|
||||
console.log(packageContentTypes);
|
||||
this.cartItems.forEach((cartItem) => {
|
||||
packageContentTypes.forEach((vapType) => {
|
||||
if (vapType == cartItem.cartItemType) {
|
||||
|
|
@ -153,17 +151,10 @@ export default {
|
|||
return vapsTypeName.Text;
|
||||
},
|
||||
removeItem(cartItemType, category) {
|
||||
console.log(
|
||||
this.lineItems[category].filter(
|
||||
(lineItemsToKeep) => lineItemsToKeep.cartItemType != cartItemType
|
||||
)
|
||||
);
|
||||
this.lineItems[category] = this.lineItems[category].filter(
|
||||
(lineItemsToKeep) => lineItemsToKeep.cartItemType != cartItemType
|
||||
);
|
||||
|
||||
//console.log(`lineItemToDelete: ${lineItemIdToDelete}`)
|
||||
|
||||
this.$emit("update:modelValue", this.lineItems);
|
||||
},
|
||||
},
|
||||
|
|
@ -269,8 +260,6 @@ export default {
|
|||
nonpackageCartItems() {
|
||||
const nonpackageCartItems = [];
|
||||
|
||||
console.log("packageCartItems");
|
||||
|
||||
this.cartItems.forEach((cartItem) => {
|
||||
if (cartItem == this.recycleFeeCartItem || cartItem == this.mobileFeeCartItem) {
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -272,8 +272,18 @@ export default {
|
|||
false
|
||||
);
|
||||
|
||||
// save lineitems as they now have salestax added
|
||||
await this.dispatchStoreAction(
|
||||
storeActions.SAVE_GLASS_PARTS,
|
||||
this.lineItems.glassParts,
|
||||
false
|
||||
);
|
||||
await this.dispatchStoreAction(
|
||||
storeActions.SAVE_SUPPORTING_ITEMS,
|
||||
this.lineItems.supportingItems,
|
||||
false
|
||||
);
|
||||
await this.dispatchStoreAction(storeActions.SAVE_VAPS, this.lineItems.vaps, false);
|
||||
|
||||
await this.dispatchStoreAction(storeActions.SAVE_PROMOS, this.lineItems.promos, false);
|
||||
|
||||
if (this.paymentMethod == paymentMethods.LATER) {
|
||||
|
|
|
|||
|
|
@ -419,12 +419,10 @@ export default {
|
|||
return itemsForPia;
|
||||
},
|
||||
getAmountDue() {
|
||||
return 1600;
|
||||
//return baseMixin.methods.getAmountDue(store.getters.order.lineItems);
|
||||
return baseMixin.methods.getAmountDue(store.getters.order.lineItems);
|
||||
},
|
||||
getDisplayAmountDue() {
|
||||
return "$1600.00";
|
||||
//return baseMixin.methods.getDisplayAmountDue(store.getters.order.lineItems);
|
||||
return baseMixin.methods.getDisplayAmountDue(store.getters.order.lineItems);
|
||||
},
|
||||
isPaypal() {
|
||||
if (this.getPaymentType() == "pp") {
|
||||
|
|
|
|||
|
|
@ -114,7 +114,9 @@ export default {
|
|||
return totalPrice;
|
||||
},
|
||||
getTotalLineItemPrice(lineItem) {
|
||||
return lineItem.kitPrice + lineItem.laborAmount + lineItem.sellingPrice;
|
||||
return (
|
||||
lineItem.kitPrice + lineItem.laborAmount + lineItem.sellingPrice + lineItem.salesTax
|
||||
);
|
||||
},
|
||||
getDisplayAmountDue(lineItems) {
|
||||
return this.getAmountDue(lineItems).toLocaleString("en-US", {
|
||||
|
|
@ -123,7 +125,6 @@ export default {
|
|||
});
|
||||
},
|
||||
getAmountDue(lineItems) {
|
||||
// TODO: verify tax is included in lineitems
|
||||
var amountDue = 0;
|
||||
if (lineItems.glassParts) {
|
||||
amountDue = this.getTotalPriceOfAllLineItemsAndChildParts(lineItems.glassParts);
|
||||
|
|
|
|||
|
|
@ -1291,7 +1291,6 @@ export const actions = {
|
|||
});
|
||||
|
||||
syncLineItemIds(response.data, context.getters.order.lineItems.vaps);
|
||||
console.log(response.data);
|
||||
return response;
|
||||
},
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue