Added statistics and finished calculations for job costing. BOD-192

This commit is contained in:
Patrick Fic
2020-07-21 14:56:36 -07:00
parent 068e1e8057
commit 0ef4d77275
9 changed files with 358 additions and 157 deletions

View File

@@ -0,0 +1,39 @@
import { Statistic } from "antd";
import React from "react";
import { useTranslation } from "react-i18next";
export default function JobCostingStatistics({ job, summaryData }) {
const { t } = useTranslation();
return (
<div>
<div className="imex-flex-row imex-flex-row__flex-space-around">
<Statistic
value={summaryData.totalLaborSales.toFormat()}
title={t("jobs.labels.sale_labor")}
/>
<Statistic
value={summaryData.totalPartsSales.toFormat()}
title={t("jobs.labels.sale_parts")}
/>
<Statistic
value={summaryData.totalSales.toFormat()}
title={t("jobs.labels.total_sales")}
/>
<Statistic
value={summaryData.totalCost.toFormat()}
title={t("jobs.labels.total_cost")}
/>
<Statistic
value={summaryData.gpdollars.toFormat()}
title={t("jobs.labels.gpdollars")}
/>
<Statistic
value={summaryData.gppercentFormatted}
suffix="%"
title={t("jobs.labels.gppercent")}
/>
</div>
</div>
);
}