add total field
This commit is contained in:
parent
d17ce53427
commit
383725b641
@ -14,6 +14,7 @@ const columns: GridColDef[] = [
|
||||
{ field: 'type', headerName: 'Единица', width: 100 },
|
||||
{ field: 'pricePerUnit', headerName: 'Цена за ед.', width: 100 },
|
||||
{ field: 'isCustomPrice', headerName: 'Кастомная цена', width: 130 },
|
||||
{ field: 'total', headerName: 'Сумма', width: 130 },
|
||||
];
|
||||
|
||||
interface Props {
|
||||
@ -32,6 +33,7 @@ export default function TariffsDG({ handleSelectionChange }: Props) {
|
||||
type: tariff.privilege.type === "count" ? "день" : "шт.",
|
||||
pricePerUnit: tariff.customPricePerUnit ?? tariff.privilege.pricePerUnit,
|
||||
isCustomPrice: tariff.customPricePerUnit === undefined ? "Нет" : "Да",
|
||||
total: tariff.amount * (tariff.customPricePerUnit ?? tariff.privilege.pricePerUnit),
|
||||
}));
|
||||
|
||||
return (
|
||||
|
Loading…
Reference in New Issue
Block a user