@@ -116,7 +116,7 @@ export function updateProductPrices ({ product, rate, sourcePriceInclTax = false
116
116
// out of the dates period
117
117
assignPrice ( { product, target : 'special_price' , price : 0 , tax : 0 , deprecatedPriceFieldsSupport} )
118
118
} else {
119
- assignPrice ( { product, target : 'price' , price : product . special_price , deprecatedPriceFieldsSupport} )
119
+ assignPrice ( { product, target : 'price' , ... specialPriceWithTax , deprecatedPriceFieldsSupport} )
120
120
}
121
121
} else {
122
122
// the same price as original; it's not a promotion
@@ -170,15 +170,15 @@ export function calculateProductTax ({ product, taxClasses, taxCountry = 'PL', t
170
170
if ( taxClass ) {
171
171
for ( let rate of taxClass . rates ) { // TODO: add check for zip code ranges (!)
172
172
if ( rate . tax_country_id === taxCountry && ( rate . region_name === taxRegion || rate . tax_region_id === 0 || ! rate . region_name ) ) {
173
- updateProductPrices ( { product, rate, sourcePriceInclTax, deprecatedPriceFieldsSupport } )
173
+ updateProductPrices ( { product, rate, sourcePriceInclTax, deprecatedPriceFieldsSupport, finalPriceInclTax } )
174
174
rateFound = true
175
175
break
176
176
}
177
177
}
178
178
}
179
179
}
180
180
if ( ! rateFound ) {
181
- updateProductPrices ( { product, rate : { rate : 0 } , sourcePriceInclTax, deprecatedPriceFieldsSupport } )
181
+ updateProductPrices ( { product, rate : { rate : 0 } , sourcePriceInclTax, deprecatedPriceFieldsSupport, finalPriceInclTax } )
182
182
183
183
product . price_incl_tax = product . price
184
184
product . price_tax = 0
0 commit comments