|
@@ -70,8 +70,12 @@ export function VariantPriceDetail({
|
|
|
}, [taxRatesData, activeChannel, taxCategoryId]);
|
|
}, [taxRatesData, activeChannel, taxCategoryId]);
|
|
|
|
|
|
|
|
useEffect(() => {
|
|
useEffect(() => {
|
|
|
- setGrossPrice(Math.round((price ?? 0) * ((100 + taxRate) / 100)));
|
|
|
|
|
- }, [price, taxRate]);
|
|
|
|
|
|
|
+ if (priceIncludesTax) {
|
|
|
|
|
+ setGrossPrice(price ?? 0);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ setGrossPrice(Math.round((price ?? 0) * ((100 + taxRate) / 100)));
|
|
|
|
|
+ }
|
|
|
|
|
+ }, [price, taxRate, priceIncludesTax]);
|
|
|
|
|
|
|
|
return (
|
|
return (
|
|
|
<div className="space-y-1">
|
|
<div className="space-y-1">
|