IO-885 Add parts price discrepancy indicator
This commit is contained in:
@@ -1,13 +1,16 @@
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
|
import { WarningFilled } from "@ant-design/icons";
|
||||||
export default function JobLinesBillRefernece({ jobline }) {
|
export default function JobLinesBillRefernece({ jobline }) {
|
||||||
const billLine = jobline.billlines && jobline.billlines[0];
|
const billLine = jobline.billlines && jobline.billlines[0];
|
||||||
|
|
||||||
if (!billLine) return null;
|
if (!billLine) return null;
|
||||||
|
const subletRequired = billLine.actual_price !== jobline.act_price;
|
||||||
return (
|
return (
|
||||||
<div>{`${(billLine.actual_price * billLine.quantity).toFixed(2)} (${
|
<div style={{ color: subletRequired && "tomato" }}>
|
||||||
billLine.bill.vendor.name
|
{subletRequired && <WarningFilled />}
|
||||||
})`}</div>
|
{`${(billLine.actual_price * billLine.quantity).toFixed(2)} (${
|
||||||
|
billLine.bill.vendor.name
|
||||||
|
})`}
|
||||||
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user