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 4aa19ac31..dd8866d63 100644
--- a/client/src/components/bill-form/bill-form.lines.component.jsx
+++ b/client/src/components/bill-form/bill-form.lines.component.jsx
@@ -58,7 +58,7 @@ export function BillEnterModalLinesComponent({
],
};
},
- formInput: (record, index) => (
+ wrapper: (props) => (
{
+ setFieldsValue({
+ billlines: getFieldsValue(["billlines"]).billlines.map(
+ (item, idx) => {
+ if (idx === index) {
+ return {
+ ...item,
+ line_desc: opt.line_desc,
+ quantity: opt.part_qty || 1,
+ actual_price: opt.cost,
+ cost_center: opt.part_type
+ ? bodyshop.pbs_serialnumber || bodyshop.cdk_dealerid
+ ? opt.part_type !== "PAE"
+ ? opt.part_type
+ : null
+ : responsibilityCenters.defaults &&
+ (responsibilityCenters.defaults.costs[
+ opt.part_type
+ ] ||
+ null)
+ : null,
+ };
+ }
+ return item;
+ }
+ ),
+ });
+ }}
+ />
+ ),
},
{
title: t("billlines.fields.line_desc"),
@@ -537,6 +537,7 @@ const EditableCell = ({
formInput,
formItemProps,
additional,
+ wrapper,
...restProps
}) => {
if (additional)
@@ -554,7 +555,20 @@ const EditableCell = ({
);
-
+ if (wrapper)
+ return (
+
+
+
+ {(formInput && formInput(record, record.name)) || children}
+
+ |
+
+ );
return (
{
const { t } = useTranslation();
- console.log(allowRemoved);
+
return (
|