Update credit memo totals [ci ignore]

This commit is contained in:
Patrick Fic
2021-05-04 19:23:41 -07:00
parent 5da7b38978
commit 78d3085a09

View File

@@ -74,7 +74,8 @@ export default function JobBillsTotalComponent({
const discrepWithLbrAdj = discrepancy.add(lbrAdjustments);
const discrepWithCms = discrepWithLbrAdj.add(billCms);
const creditsNotReceived = totalReturns.add(billCms); //billCms is tracked as a negative number.
const creditsNotReceived = totalReturns.subtract(billCms); //billCms is tracked as a negative number.
return (
<Row gutter={16}>
<Col span={18}>
@@ -225,9 +226,13 @@ export default function JobBillsTotalComponent({
<Statistic
title={t("bills.labels.creditsnotreceived")}
valueStyle={{
color: creditsNotReceived.getAmount() === 0 ? "green" : "red",
color: creditsNotReceived.getAmount() <= 0 ? "green" : "red",
}}
value={creditsNotReceived.toFormat()}
value={
creditsNotReceived.getAmount() >= 0
? creditsNotReceived.toFormat()
: Dinero().toFormat()
}
/>
</Tooltip>
</Space>