diff --git a/apps/storefront/src/pages/shoppingListDetails/ShoppingListDetails.tsx b/apps/storefront/src/pages/shoppingListDetails/ShoppingListDetails.tsx index a123570e..01cdf5e5 100644 --- a/apps/storefront/src/pages/shoppingListDetails/ShoppingListDetails.tsx +++ b/apps/storefront/src/pages/shoppingListDetails/ShoppingListDetails.tsx @@ -23,6 +23,7 @@ import { updateB2BShoppingList, updateBcShoppingList, } from '@/shared/service/b2b' +import { store } from '@/store' import { calculateProductListPrice, getDefaultCurrencyInfo, @@ -91,6 +92,10 @@ function ShoppingListDetails({ setOpenPage }: ShoppingListDetailsProps) { const [isMobile] = useMobile() const { dispatch } = useContext(ShoppingListDetailsContext) + const { + global: { enteredInclusive: enteredInclusiveTax }, + } = store.getState() + const theme = useTheme() const primaryColor = theme.palette.primary.main @@ -308,10 +313,11 @@ function ShoppingListDetails({ setOpenPage }: ShoppingListDetailsProps) { checkedArr.forEach((item: ListItemProps) => { const { - node: { quantity, basePrice, baseAllPrice = 0 }, + node: { quantity, basePrice, taxPrice }, } = item - const price = +baseAllPrice || +basePrice + const price = enteredInclusiveTax ? +basePrice : +basePrice + +taxPrice + total += price * +quantity })