Files
bodyshop/client/src/components/jobs-close-totals/jobs-close-totals.component.jsx

61 lines
2.2 KiB
JavaScript

import { Descriptions, Statistic } from "antd";
import React from "react";
import { useTranslation } from "react-i18next";
import Dinero from "dinero.js";
export default function JobsCloseTotals({ jobTotals }) {
const { t } = useTranslation();
return (
<div>
------Should be removed-----
<Descriptions
bordered
size="small"
//column={1}
title={t("jobs.labels.totals")}
>
<Descriptions.Item label={t("jobs.labels.partstotal")}>
<Statistic
value={Dinero(jobTotals.parts.parts.total).toFormat()}
suffix={`(${Dinero(
jobTotals.parts.parts.subtotal
).toFormat()} ± ${Dinero(
jobTotals.parts.parts.adjustments
).toFormat()})`}
/>
</Descriptions.Item>
<Descriptions.Item label={t("jobs.labels.subletstotal")}>
<Statistic
value={Dinero(jobTotals.parts.sublets.total).toFormat()}
suffix={`(${Dinero(
jobTotals.parts.sublets.subtotal
).toFormat()} ± ${Dinero(
jobTotals.parts.sublets.adjustments
).toFormat()})`}
/>
</Descriptions.Item>
<Descriptions.Item label={t("jobs.labels.subtotal")}>
<Statistic value={Dinero(jobTotals.totals.subtotal).toFormat()} />
</Descriptions.Item>
<Descriptions.Item label={t("jobs.labels.federal_tax_amt")}>
<Statistic value={Dinero(jobTotals.totals.federal_tax).toFormat()} />
</Descriptions.Item>
<Descriptions.Item label={t("jobs.labels.state_tax_amt")}>
<Statistic value={Dinero(jobTotals.totals.state_tax).toFormat()} />
</Descriptions.Item>
<Descriptions.Item label={t("jobs.labels.local_tax_amt")}>
<Statistic value={Dinero(jobTotals.totals.local_tax).toFormat()} />
</Descriptions.Item>
</Descriptions>
<Statistic
title={t("jobs.labels.total_repairs")}
value={Dinero(jobTotals.totals.total_repairs).toFormat()}
/>
<Statistic
title={t("jobs.labels.net_repairs")}
value={Dinero(jobTotals.totals.net_repairs).toFormat()}
/>
</div>
);
}