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