u
This commit is contained in:
@@ -4,7 +4,8 @@ import Box from '@mui/material/Box';
|
||||
import ButtonBase from '@mui/material/ButtonBase';
|
||||
import Typography from '@mui/material/Typography';
|
||||
import { TILE_SIZE, Tile, tileBaseSx } from 'dashgui/tiles';
|
||||
import { formatPrice } from '../../utils/price';
|
||||
import { formatPrice, getArticleGross } from '../../utils/price';
|
||||
import companyAutomat from '../../automats/companyAutomat';
|
||||
import { articleSku } from '../article/articleRoute';
|
||||
import {
|
||||
getThumbHashDataUrl,
|
||||
@@ -289,6 +290,7 @@ export class ArticleTile extends Tile {
|
||||
if (!article) return null;
|
||||
const sku = articleSku(article);
|
||||
const brand = article.brand;
|
||||
const grossPrice = getArticleGross(article, companyAutomat.state.current?.taxrate);
|
||||
return (
|
||||
<>
|
||||
{brand?.name ? (
|
||||
@@ -310,9 +312,9 @@ export class ArticleTile extends Tile {
|
||||
{sku}
|
||||
</Typography>
|
||||
) : null}
|
||||
{article.net != null && (
|
||||
{grossPrice != null && (
|
||||
<Typography variant="caption" fontWeight={600}>
|
||||
{formatPrice(article.net)}
|
||||
{formatPrice(grossPrice)}
|
||||
</Typography>
|
||||
)}
|
||||
</>
|
||||
@@ -353,6 +355,7 @@ export class ArticleTile extends Tile {
|
||||
const hasPhoto = this.hasPhoto();
|
||||
const { article, label, sx, disabled } = this.props;
|
||||
const sku = articleSku(article);
|
||||
const grossPrice = getArticleGross(article, companyAutomat.state.current?.taxrate);
|
||||
|
||||
return (
|
||||
<ButtonBase
|
||||
@@ -451,7 +454,7 @@ export class ArticleTile extends Tile {
|
||||
{sku}
|
||||
</Typography>
|
||||
) : null}
|
||||
{article.net != null && (
|
||||
{grossPrice != null && (
|
||||
<Typography
|
||||
variant="caption"
|
||||
fontWeight={600}
|
||||
@@ -461,7 +464,7 @@ export class ArticleTile extends Tile {
|
||||
textShadow: TEXT_GLOW_DARK,
|
||||
}}
|
||||
>
|
||||
{formatPrice(article.net)}
|
||||
{formatPrice(grossPrice)}
|
||||
</Typography>
|
||||
)}
|
||||
</Box>
|
||||
|
||||
Reference in New Issue
Block a user