Merge remote-tracking branch 'origin/develop' into feature/skiener/CSR-1520
This commit is contained in:
commit
abd09c48a8
2 changed files with 12 additions and 11 deletions
|
|
@ -326,11 +326,11 @@ export default {
|
||||||
return itemsForPia;
|
return itemsForPia;
|
||||||
},
|
},
|
||||||
getAmountDue() {
|
getAmountDue() {
|
||||||
return 350.0;
|
return 2;
|
||||||
//return baseMixin.methods.getAmountDue(store.getters.order.lineItems);
|
//return baseMixin.methods.getAmountDue(store.getters.order.lineItems);
|
||||||
},
|
},
|
||||||
getDisplayAmountDue() {
|
getDisplayAmountDue() {
|
||||||
return "$350.00";
|
return "$2.00";
|
||||||
//return baseMixin.methods.getDisplayAmountDue(store.getters.order.lineItems);
|
//return baseMixin.methods.getDisplayAmountDue(store.getters.order.lineItems);
|
||||||
},
|
},
|
||||||
isPaypal() {
|
isPaypal() {
|
||||||
|
|
|
||||||
|
|
@ -124,16 +124,17 @@ export default {
|
||||||
},
|
},
|
||||||
getAmountDue(lineItems) {
|
getAmountDue(lineItems) {
|
||||||
// TODO: verify tax is included in lineitems
|
// TODO: verify tax is included in lineitems
|
||||||
// Price everything in lineitems except the server data string
|
|
||||||
var amountDue = 0;
|
var amountDue = 0;
|
||||||
const itemsClone = { ...lineItems };
|
if (lineItems.glassParts) {
|
||||||
delete itemsClone.serverData;
|
amountDue = this.getTotalPriceOfAllLineItemsAndChildParts(lineItems.glassParts);
|
||||||
for (var propertyName in itemsClone) {
|
}
|
||||||
if (itemsClone[propertyName]) {
|
if (lineItems.supportingItems) {
|
||||||
amountDue += this.getTotalPriceOfAllLineItemsAndChildParts(
|
amountDue += this.getTotalPriceOfAllLineItemsAndChildParts(
|
||||||
itemsClone[propertyName]
|
lineItems.supportingItems
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
if (lineItems.supportingItems.vaps) {
|
||||||
|
amountDue += this.getTotalPriceOfAllLineItemsAndChildParts(lineItems.vaps);
|
||||||
}
|
}
|
||||||
return amountDue;
|
return amountDue;
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue