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) => ( @@ -66,46 +66,46 @@ export function BillEnterModalLinesComponent({ } > {() => { - return ( - { - 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; - } - ), - }); - }} - /> - ); + return props.children; }} ), + formInput: (record, index) => ( + { + 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 ( - - - - - { - // - // - // - } - - - - - - - {isReturn && ( +
+ + + + + + + + + + { + // + // + // + } + + + + - )} - - + {isReturn && ( + + + + )} + +
- +
))}
diff --git a/client/src/graphql/jobs-lines.queries.js b/client/src/graphql/jobs-lines.queries.js index 6759c82fb..cc4b59c04 100644 --- a/client/src/graphql/jobs-lines.queries.js +++ b/client/src/graphql/jobs-lines.queries.js @@ -181,7 +181,10 @@ export const UPDATE_JOB_LINE = gql` export const GET_JOB_LINES_TO_ENTER_BILL = gql` query GET_JOB_LINES_TO_ENTER_BILL($id: uuid!) { - joblines(where: { jobid: { _eq: $id } }, order_by: { act_price: desc }) { + joblines( + where: { jobid: { _eq: $id } } + order_by: { act_price: desc_nulls_last } + ) { removed id line_desc diff --git a/server/accounting/qbxml/qbxml-payments.js b/server/accounting/qbxml/qbxml-payments.js index ceb07ae99..7820f9a7e 100644 --- a/server/accounting/qbxml/qbxml-payments.js +++ b/server/accounting/qbxml/qbxml-payments.js @@ -136,7 +136,9 @@ const generatePayment = (payment, isThreeTier, twoTierPref) => { PaymentMethodRef: { FullName: payment.type, }, - Memo: `RO ${payment.job.ro_number || ""} ${ + Memo: `RO ${payment.job.ro_number || ""} OWNER ${ + payment.job.ownr_fn || "" + } ${payment.job.ownr_ln || ""} ${payment.job.ownr_co_nm || ""} ${ payment.stripeid || "" } ${payment.payer ? ` PAID BY ${payment.payer}` : ""}`, IsAutoApply: true,