IO-1089 IO-1083

This commit is contained in:
Patrick Fic
2021-05-12 14:24:32 -07:00
parent 8dafdba4f8
commit 967cc2932a
2 changed files with 8 additions and 4 deletions

View File

@@ -51,7 +51,9 @@ const VendorSearchSelect = (
<div className="imex-flex-row"> <div className="imex-flex-row">
<div style={{ flex: 1 }}>{o.name}</div> <div style={{ flex: 1 }}>{o.name}</div>
<HeartOutlined /> <HeartOutlined />
<Tag color="green">{`${o.discount * 100}%`}</Tag> {o.discount && o.discount !== 0 ? (
<Tag color="green">{`${o.discount * 100}%`}</Tag>
) : null}
</div> </div>
</Option> </Option>
)) ))
@@ -62,9 +64,9 @@ const VendorSearchSelect = (
<div className="imex-flex-row" style={{ width: "100%" }}> <div className="imex-flex-row" style={{ width: "100%" }}>
<div style={{ flex: 1 }}>{o.name}</div> <div style={{ flex: 1 }}>{o.name}</div>
{o.discount && ( {o.discount && o.discount !== 0 ? (
<Tag color="green">{`${o.discount * 100}%`}</Tag> <Tag color="green">{`${o.discount * 100}%`}</Tag>
)} ) : null}
</div> </div>
</Option> </Option>
)) ))

View File

@@ -103,7 +103,9 @@ const generateBillLine = (billLine, responsibilityCenters, jobClass) => {
}, },
Amount: Dinero({ Amount: Dinero({
amount: Math.round(billLine.actual_cost * 100), amount: Math.round(billLine.actual_cost * 100),
}).toFormat(DineroQbFormat), })
.multiply(billLine.quantity || 1)
.toFormat(DineroQbFormat),
...(jobClass ? { ClassRef: { FullName: jobClass } } : {}), ...(jobClass ? { ClassRef: { FullName: jobClass } } : {}),
SalesTaxCodeRef: { SalesTaxCodeRef: {
FullName: findTaxCode(billLine, responsibilityCenters.sales_tax_codes), FullName: findTaxCode(billLine, responsibilityCenters.sales_tax_codes),