From 0b448e043cf89084505e85f142723f91a5b86f07 Mon Sep 17 00:00:00 2001
From: Patrick Fic <>
Date: Mon, 25 Jul 2022 12:37:56 -0700
Subject: [PATCH] IO-1990 Add alt_partno to bill posting screen.
---
.../bill-line-search-select.component.jsx | 13 ++++++++++---
client/src/graphql/jobs-lines.queries.js | 2 ++
2 files changed, 12 insertions(+), 3 deletions(-)
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 96eec6cdc..552c2ad47 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
@@ -27,6 +27,10 @@ const BillLineSearchSelect = (
option.oem_partno
.toLowerCase()
.includes(inputValue.toLowerCase())) ||
+ (option.alt_partno &&
+ option.alt_partno
+ .toLowerCase()
+ .includes(inputValue.toLowerCase())) ||
(option.act_price &&
option.act_price.toString().startsWith(inputValue.toString()))
);
@@ -48,14 +52,17 @@ const BillLineSearchSelect = (
line_desc={item.line_desc}
part_qty={item.part_qty}
oem_partno={item.oem_partno}
+ alt_partno={item.alt_partno}
act_price={item.act_price}
style={{
...(item.removed ? { textDecoration: "line-through" } : {}),
}}
>
- {`${item.removed ? `(REMOVED) ` : ""}${item.line_desc}${
- item.oem_partno ? ` - ${item.oem_partno}` : ""
- }`}
+
+ {`${item.removed ? `(REMOVED) ` : ""}${item.line_desc}${
+ item.oem_partno ? ` - ${item.oem_partno}` : ""
+ }${item.alt_partno ? ` (${item.alt_partno})` : ""}`.trim()}
+
{item.act_price
? `$${item.act_price && item.act_price.toFixed(2)}`
diff --git a/client/src/graphql/jobs-lines.queries.js b/client/src/graphql/jobs-lines.queries.js
index dfcf3b1c8..48fdd8c3b 100644
--- a/client/src/graphql/jobs-lines.queries.js
+++ b/client/src/graphql/jobs-lines.queries.js
@@ -197,6 +197,7 @@ export const GET_JOB_LINES_TO_ENTER_BILL = gql`
line_desc
part_type
oem_partno
+ alt_partno
db_price
act_price
part_qty
@@ -206,6 +207,7 @@ export const GET_JOB_LINES_TO_ENTER_BILL = gql`
lbr_op
lbr_amt
op_code_desc
+ alt_partno
}
jobs_by_pk(id: $id) {
id