|
|
@@ -10,40 +10,39 @@ export interface OrderTableTotalsProps {
|
|
|
|
|
|
export function OrderTableTotals({ order, columnCount }: Readonly<OrderTableTotalsProps>) {
|
|
|
const currencyCode = order.currencyCode;
|
|
|
-
|
|
|
return (
|
|
|
<>
|
|
|
{order.surcharges?.length > 0
|
|
|
? order.surcharges.map((surcharge, index) => (
|
|
|
- <TableRow key={`${surcharge.description}-${index}`}>
|
|
|
- <TableCell colSpan={columnCount - 1} className="h-12">
|
|
|
- <Trans>Surcharge</Trans>: {surcharge.description}
|
|
|
- </TableCell>
|
|
|
- <TableCell colSpan={1} className="h-12">
|
|
|
- <MoneyGrossNet
|
|
|
- priceWithTax={surcharge.priceWithTax}
|
|
|
- price={surcharge.price}
|
|
|
- currencyCode={currencyCode}
|
|
|
- />
|
|
|
- </TableCell>
|
|
|
- </TableRow>
|
|
|
- ))
|
|
|
+ <TableRow key={`${surcharge.description}-${index}`}>
|
|
|
+ <TableCell colSpan={columnCount - 1} className="h-12">
|
|
|
+ <Trans>Surcharge</Trans>: {surcharge.description}
|
|
|
+ </TableCell>
|
|
|
+ <TableCell colSpan={1} className="h-12">
|
|
|
+ <MoneyGrossNet
|
|
|
+ priceWithTax={surcharge.priceWithTax}
|
|
|
+ price={surcharge.price}
|
|
|
+ currencyCode={currencyCode}
|
|
|
+ />
|
|
|
+ </TableCell>
|
|
|
+ </TableRow>
|
|
|
+ ))
|
|
|
: null}
|
|
|
{order.discounts?.length > 0
|
|
|
? order.discounts.map((discount, index) => (
|
|
|
- <TableRow key={`${discount.description}-${index}`}>
|
|
|
- <TableCell colSpan={columnCount - 1} className="h-12">
|
|
|
- <Trans>Discount</Trans>: {discount.description}
|
|
|
- </TableCell>
|
|
|
- <TableCell colSpan={1} className="h-12">
|
|
|
- <MoneyGrossNet
|
|
|
- priceWithTax={discount.amountWithTax}
|
|
|
- price={discount.amount}
|
|
|
- currencyCode={currencyCode}
|
|
|
- />
|
|
|
- </TableCell>
|
|
|
- </TableRow>
|
|
|
- ))
|
|
|
+ <TableRow key={`${discount.description}-${index}`}>
|
|
|
+ <TableCell colSpan={columnCount - 1} className="h-12">
|
|
|
+ <Trans>Discount</Trans>: {discount.description}
|
|
|
+ </TableCell>
|
|
|
+ <TableCell colSpan={1} className="h-12">
|
|
|
+ <MoneyGrossNet
|
|
|
+ priceWithTax={discount.amountWithTax}
|
|
|
+ price={discount.amount}
|
|
|
+ currencyCode={currencyCode}
|
|
|
+ />
|
|
|
+ </TableCell>
|
|
|
+ </TableRow>
|
|
|
+ ))
|
|
|
: null}
|
|
|
<TableRow>
|
|
|
<TableCell colSpan={columnCount - 1} className="h-12">
|