SSR-1503 Fix unverified flow taxing invalid items
This commit is contained in:
parent
b0bc8c8219
commit
1caed930f5
1 changed files with 7 additions and 11 deletions
|
|
@ -1821,18 +1821,14 @@ export const useMainStore = defineStore({
|
||||||
},
|
},
|
||||||
|
|
||||||
async setPriceAndSalesTaxForOrderLineItems() {
|
async setPriceAndSalesTaxForOrderLineItems() {
|
||||||
const lineItemsToPrice = [
|
let lineItemsToTax;
|
||||||
...(this.order.lineItems.supportingItems ?? []),
|
if (this.isVerified && !this.isDeductible) {
|
||||||
...(this.order.lineItems.glassParts ?? []),
|
|
||||||
...(this.order.lineItems.otherParts ?? []),
|
|
||||||
...(this.order.lineItems.vaps ?? []),
|
|
||||||
...(this.order.lineItems.feeItems ?? [])
|
|
||||||
];
|
|
||||||
|
|
||||||
let lineItemsToTax = [];
|
|
||||||
if (!this.isVerified || !this.isDeductible) {
|
|
||||||
lineItemsToTax = [
|
lineItemsToTax = [
|
||||||
...lineItemsToPrice
|
...(this.order.lineItems.supportingItems ?? []),
|
||||||
|
...(this.order.lineItems.glassParts ?? []),
|
||||||
|
...(this.order.lineItems.otherParts ?? []),
|
||||||
|
...(this.order.lineItems.vaps ?? []),
|
||||||
|
...(this.order.lineItems.feeItems ?? [])
|
||||||
];
|
];
|
||||||
} else {
|
} else {
|
||||||
lineItemsToTax = [
|
lineItemsToTax = [
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue