IO-829 Resolve Parts Order Calculations issues.
This commit is contained in:
@@ -32,7 +32,7 @@ export default function JobBillsTotalComponent({
|
||||
if (p.return) {
|
||||
totalReturns = totalReturns.add(
|
||||
Dinero({
|
||||
amount: Math.round((pol.cost || 0) * 100),
|
||||
amount: Math.round((pol.act_price || 0) * 100),
|
||||
}).multiply(pol.quantity)
|
||||
);
|
||||
}
|
||||
@@ -74,7 +74,7 @@ export default function JobBillsTotalComponent({
|
||||
const discrepWithLbrAdj = discrepancy.add(lbrAdjustments);
|
||||
|
||||
const discrepWithCms = discrepWithLbrAdj.subtract(billCms);
|
||||
const creditsNotReceived = totalReturns.subtract(billCms);
|
||||
const creditsNotReceived = totalReturns.add(billCms); //billCms is tracked as a negative number.
|
||||
return (
|
||||
<Card title={t("jobs.labels.jobtotals")}>
|
||||
<Space wrap size="large">
|
||||
@@ -89,7 +89,7 @@ export default function JobBillsTotalComponent({
|
||||
<Statistic
|
||||
title={t("bills.labels.discrepancy")}
|
||||
valueStyle={{
|
||||
color: discrepancy.getAmount === 0 ? "green" : "red",
|
||||
color: discrepancy.getAmount() === 0 ? "green" : "red",
|
||||
}}
|
||||
value={discrepancy.toFormat()}
|
||||
/>
|
||||
@@ -100,7 +100,7 @@ export default function JobBillsTotalComponent({
|
||||
<Statistic
|
||||
title={t("bills.labels.discrepwithlbradj")}
|
||||
valueStyle={{
|
||||
color: discrepWithLbrAdj.getAmount === 0 ? "green" : "red",
|
||||
color: discrepWithLbrAdj.getAmount() === 0 ? "green" : "red",
|
||||
}}
|
||||
value={discrepWithLbrAdj.toFormat()}
|
||||
/>
|
||||
@@ -111,7 +111,7 @@ export default function JobBillsTotalComponent({
|
||||
<Statistic
|
||||
title={t("bills.labels.discrepwithcms")}
|
||||
valueStyle={{
|
||||
color: discrepWithCms.getAmount === 0 ? "green" : "red",
|
||||
color: discrepWithCms.getAmount() === 0 ? "green" : "red",
|
||||
}}
|
||||
value={discrepWithCms.toFormat()}
|
||||
/>
|
||||
@@ -126,7 +126,7 @@ 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()}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user