diff --git a/client/src/components/bill-form/bill-form.component.jsx b/client/src/components/bill-form/bill-form.component.jsx
index 7d7eb793a..a9eb07443 100644
--- a/client/src/components/bill-form/bill-form.component.jsx
+++ b/client/src/components/bill-form/bill-form.component.jsx
@@ -98,7 +98,7 @@ export function BillFormComponent({
}
}
- if (vendorId === bodyshop.inhousevendorid) {
+ if (vendorId === bodyshop.inhousevendorid && !billEdit) {
loadInventory();
}
}, [
diff --git a/client/src/components/bill-form/bill-form.container.jsx b/client/src/components/bill-form/bill-form.container.jsx
index 836a24be4..358bb7f38 100644
--- a/client/src/components/bill-form/bill-form.container.jsx
+++ b/client/src/components/bill-form/bill-form.container.jsx
@@ -68,11 +68,11 @@ export function BillFormContainer({
returnData={returnData}
/>
)}
- {!billEdit && Simple_Inventory.treatment === "on" && (
+ {Simple_Inventory.treatment === "on" && (
)}
diff --git a/client/src/components/billline-add-inventory/billline-add-inventory.component.jsx b/client/src/components/billline-add-inventory/billline-add-inventory.component.jsx
index f25ee2c61..5b099eadf 100644
--- a/client/src/components/billline-add-inventory/billline-add-inventory.component.jsx
+++ b/client/src/components/billline-add-inventory/billline-add-inventory.component.jsx
@@ -94,7 +94,11 @@ export function BilllineAddInventory({ bodyshop, billline, disabled, jobid }) {
return (
-
diff --git a/client/src/components/header/header.component.jsx b/client/src/components/header/header.component.jsx
index 63af81751..85aa0c200 100644
--- a/client/src/components/header/header.component.jsx
+++ b/client/src/components/header/header.component.jsx
@@ -1,3 +1,4 @@
+import { useTreatments } from "@splitsoftware/splitio-react";
import Icon, {
BankFilled,
BarChartOutlined,
@@ -83,6 +84,12 @@ function Header({
setReportCenterContext,
recentItems,
}) {
+ const { Simple_Inventory } = useTreatments(
+ ["Simple_Inventory"],
+ {},
+ bodyshop && bodyshop.imexshopid
+ );
+
const { t } = useTranslation();
return (
@@ -199,13 +206,19 @@ function Header({
>
{t("menus.header.enterbills")}
-
- }
- >
- {t("menus.header.inventory")}
-
+ {Simple_Inventory.treatment === "on" && (
+ <>
+
+ }
+ >
+
+ {t("menus.header.inventory")}
+
+
+ >
+ )}
}>
{t("menus.header.allpayments")}
diff --git a/client/src/components/inventory-list/inventory-list.component.jsx b/client/src/components/inventory-list/inventory-list.component.jsx
index 7ddb6595f..58210eb94 100644
--- a/client/src/components/inventory-list/inventory-list.component.jsx
+++ b/client/src/components/inventory-list/inventory-list.component.jsx
@@ -1,16 +1,13 @@
import { SyncOutlined } from "@ant-design/icons";
import { Button, Card, Input, Space, Table, Typography } from "antd";
-import _ from "lodash";
import queryString from "query-string";
import React from "react";
import { useTranslation } from "react-i18next";
import { connect } from "react-redux";
-import { Link, useHistory, useLocation } from "react-router-dom";
+import { useHistory, useLocation } from "react-router-dom";
import { createStructuredSelector } from "reselect";
import { selectBodyshop } from "../../redux/user/user.selectors";
import CurrencyFormatter from "../../utils/CurrencyFormatter";
-import StartChatButton from "../chat-open-button/chat-open-button.component";
-import OwnerNameDisplay from "../owner-name-display/owner-name-display.component";
const mapStateToProps = createStructuredSelector({
//currentUser: selectCurrentUser
bodyshop: selectBodyshop,
@@ -21,7 +18,7 @@ const mapDispatchToProps = (dispatch) => ({
export function JobsList({ bodyshop, refetch, loading, jobs, total }) {
const search = queryString.parse(useLocation().search);
- const { page, sortcolumn, sortorder, invfilters } = search;
+ const { page, sortcolumn, sortorder } = search;
const history = useHistory();
const { t } = useTranslation();
diff --git a/client/src/graphql/bills.queries.js b/client/src/graphql/bills.queries.js
index dd6e95715..f042fd7ae 100644
--- a/client/src/graphql/bills.queries.js
+++ b/client/src/graphql/bills.queries.js
@@ -152,6 +152,10 @@ export const QUERY_BILL_BY_PK = gql`
state_tax_rate
federal_tax_rate
isinhouse
+ inventories {
+ id
+ line_desc
+ }
vendor {
id
name
@@ -165,6 +169,9 @@ export const QUERY_BILL_BY_PK = gql`
cost_center
quantity
joblineid
+ inventories {
+ id
+ }
jobline {
oem_partno
part_type