Files
bodyshop/client/src/components/job-lines-bill-reference/job-lines-bill-reference.component.jsx
2021-04-12 15:32:34 -07:00

17 lines
546 B
JavaScript

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 style={{ color: subletRequired && "tomato" }}>
{subletRequired && <WarningFilled />}
{`${(billLine.actual_price * billLine.quantity).toFixed(2)} (${
billLine.bill.vendor.name
})`}
</div>
);
}