-
+ />
- {!!getFieldsValue(["invoicelines"]).invoicelines[index] &&
- !getFieldsValue(["invoicelines"]).invoicelines[index]
- .joblineid ? (
-
-
-
- ) : null}
+
+
+
- calculateTotals()} />
+ {
+ calculateTotals();
+ }}
+ />
-
{
remove(field.name);
@@ -220,25 +167,6 @@ export default function InvoiceEnterModalLinesComponent({
);
}}
-
-
- {t("invoicelines.labels.entered")}
- {amounts.enteredTotal || 0}
-
-
-
- {amounts.invoiceTotal - amounts.enteredTotal === 0 ? (
- {t("invoicelines.labels.reconciled")}
- ) : (
-
- {t("invoicelines.labels.unreconciled")}:
-
- {amounts.invoiceTotal - amounts.enteredTotal}
-
-
- )}
-
-
);
}
diff --git a/client/src/components/invoice-line-search-select/invoice-line-search-select.component.jsx b/client/src/components/invoice-line-search-select/invoice-line-search-select.component.jsx
new file mode 100644
index 000000000..f726115e7
--- /dev/null
+++ b/client/src/components/invoice-line-search-select/invoice-line-search-select.component.jsx
@@ -0,0 +1,66 @@
+import { Select, Row, Col, Tag } from "antd";
+import React, { useEffect, useState } from "react";
+import { useTranslation } from "react-i18next";
+import CurrencyFormatter from "../../utils/CurrencyFormatter";
+
+//To be used as a form element only.
+const { Option } = Select;
+const InvoiceLineSearchSelect = ({
+ value,
+ onChange,
+ options,
+ onBlur,
+ onSelect,
+}) => {
+ const [option, setOption] = useState(value);
+ const { t } = useTranslation();
+
+ useEffect(() => {
+ if (onChange) {
+ onChange(option);
+ }
+ }, [option, onChange]);
+
+ return (
+
+ );
+};
+export default InvoiceLineSearchSelect;
diff --git a/client/src/graphql/invoices.queries.js b/client/src/graphql/invoices.queries.js
index 73a643e0f..0c3a4c97c 100644
--- a/client/src/graphql/invoices.queries.js
+++ b/client/src/graphql/invoices.queries.js
@@ -100,6 +100,7 @@ export const QUERY_INVOICE_BY_PK = gql`
actual_price
actual_cost
cost_center
+ joblineid
}
}
}
diff --git a/client/src/translations/en_us/common.json b/client/src/translations/en_us/common.json
index 42895c7fa..8e3958fb9 100644
--- a/client/src/translations/en_us/common.json
+++ b/client/src/translations/en_us/common.json
@@ -333,7 +333,8 @@
"actual": "Actual",
"actual_cost": "Actual Cost",
"cost_center": "Cost Center",
- "line_desc": "Line Description",
+ "jobline": "Job Line",
+ "line_desc": "Invoice Line Description",
"retail": "Retail"
},
"labels": {
diff --git a/client/src/translations/es/common.json b/client/src/translations/es/common.json
index a7e83e405..8ab9f1c6f 100644
--- a/client/src/translations/es/common.json
+++ b/client/src/translations/es/common.json
@@ -333,6 +333,7 @@
"actual": "",
"actual_cost": "",
"cost_center": "",
+ "jobline": "",
"line_desc": "",
"retail": ""
},
diff --git a/client/src/translations/fr/common.json b/client/src/translations/fr/common.json
index 2419d027e..993cf3b86 100644
--- a/client/src/translations/fr/common.json
+++ b/client/src/translations/fr/common.json
@@ -333,6 +333,7 @@
"actual": "",
"actual_cost": "",
"cost_center": "",
+ "jobline": "",
"line_desc": "",
"retail": ""
},