Add bill ref to job lines table. IO-582

This commit is contained in:
Patrick Fic
2021-01-20 09:56:59 -08:00
parent 4228d1f13d
commit e82e1215ea
7 changed files with 134 additions and 25 deletions

View File

@@ -0,0 +1,25 @@
import { Spin } from "antd";
import React from "react";
export default function JobLinesBillRefernece({
jobline,
loading,
billLinesObject,
}) {
if (loading)
return (
<div>
<Spin size="small" className="loading-spinner" />
</div>
);
if (!billLinesObject) return null;
const billLine = billLinesObject[jobline.id];
if (!billLine) return null;
return (
<div>{`${(billLine.actual_price * billLine.quantity).toFixed(2)} (${
billLine.bill.vendor.name
})`}</div>
);
}