From 021098fa2a7c78604fc521f7b836dd6e7d47f96e Mon Sep 17 00:00:00 2001 From: Patrick Fic <> Date: Thu, 27 Jan 2022 08:46:19 -0800 Subject: [PATCH] IO-1674 Improve bill posting line display & order by price descending. --- .../components/bill-form/bill-form.lines.component.jsx | 2 +- .../bill-line-search-select.component.jsx | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/client/src/components/bill-form/bill-form.lines.component.jsx b/client/src/components/bill-form/bill-form.lines.component.jsx index dd49b4677..4aa19ac31 100644 --- a/client/src/components/bill-form/bill-form.lines.component.jsx +++ b/client/src/components/bill-form/bill-form.lines.component.jsx @@ -44,7 +44,7 @@ export function BillEnterModalLinesComponent({ title: t("billlines.fields.jobline"), dataIndex: "joblineid", editable: true, - + width: "20rem", formItemProps: (field) => { return { key: `${field.index}joblinename`, diff --git a/client/src/components/bill-line-search-select/bill-line-search-select.component.jsx b/client/src/components/bill-line-search-select/bill-line-search-select.component.jsx index 38ca6c8b5..a0d19f408 100644 --- a/client/src/components/bill-line-search-select/bill-line-search-select.component.jsx +++ b/client/src/components/bill-line-search-select/bill-line-search-select.component.jsx @@ -15,6 +15,7 @@ const BillLineSearchSelect = ( disabled={disabled} ref={ref} showSearch + dropdownMatchSelectWidth={false} // optionFilterProp="line_desc" filterOption={(inputValue, option) => { return ( @@ -52,9 +53,14 @@ const BillLineSearchSelect = ( ...(item.removed ? { textDecoration: "line-through" } : {}), }} > - {`${item.removed ? `(REMOVED) ` : ""}${item.line_desc}${ + {`${item.removed ? `(REMOVED) ` : ""}${item.line_desc}${ item.oem_partno ? ` - ${item.oem_partno}` : "" - }${item.act_price ? ` - $${item.act_price}` : ``}`} + }`} + + {item.act_price + ? `$${item.act_price && item.act_price.toFixed(2)}` + : ``} + )) : null}