Added invoice totals + high level reconciliation on PLI jobs tab. BOD-26

This commit is contained in:
Patrick Fic
2020-05-13 16:34:03 -07:00
parent 23a6900906
commit 0473421c6c
15 changed files with 253 additions and 124 deletions

View File

@@ -31,7 +31,7 @@ export function LaborAllocationsTable({ joblines, timetickets, bodyshop }) {
</Typography.Title>
<Row>
<Col span={12}>
<Col span={6}>
<strong>{t("timetickets.fields.cost_center")}</strong>
</Col>
<Col span={6}>
@@ -40,12 +40,23 @@ export function LaborAllocationsTable({ joblines, timetickets, bodyshop }) {
<Col span={6}>
<strong>{t("jobs.labels.hrs_claimed")}</strong>
</Col>
<Col span={6}>
<strong>{t("jobs.labels.difference")}</strong>
</Col>
</Row>
{totals.map((t, idx) => (
<Row key={idx}>
<Col span={12}>{t.cost_center}</Col>
<Col span={6}>{t.total}</Col>
<Col span={6}>{t.claimed}</Col>
<Col span={6}>{t.cost_center}</Col>
<Col span={6}>{t.total.toFixed(2)}</Col>
<Col span={6}>{t.claimed.toFixed(2)}</Col>
<Col span={6}>
<strong
style={{
color: Math.round(t.total - t.claimed) > 0 ? "green" : "red",
}}>
{(t.total - t.claimed).toFixed(2)}
</strong>
</Col>
</Row>
))}
</div>