diff --git a/client/src/components/documents-local-upload/documents-local-upload.component.jsx b/client/src/components/documents-local-upload/documents-local-upload.component.jsx index 630b1a368..9d4e6ed2f 100644 --- a/client/src/components/documents-local-upload/documents-local-upload.component.jsx +++ b/client/src/components/documents-local-upload/documents-local-upload.component.jsx @@ -23,6 +23,7 @@ export function DocumentsLocalUploadComponent({ vendorid, invoice_number, callbackAfterUpload, + allowAllTypes, }) { const [fileList, setFileList] = useState([]); @@ -52,7 +53,9 @@ export function DocumentsLocalUploadComponent({ }, }) } - accept="audio/*, video/*, image/*, .pdf, .doc, .docx, .xls, .xlsx" + {...(!allowAllTypes && { + accept: "audio/*, video/*, image/*, .pdf, .doc, .docx, .xls, .xlsx", + })} > {children || ( <> diff --git a/client/src/components/jobs-documents-local-gallery/jobs-documents-local-gallery.container.jsx b/client/src/components/jobs-documents-local-gallery/jobs-documents-local-gallery.container.jsx index 5b8722d3d..6cb87367f 100644 --- a/client/src/components/jobs-documents-local-gallery/jobs-documents-local-gallery.container.jsx +++ b/client/src/components/jobs-documents-local-gallery/jobs-documents-local-gallery.container.jsx @@ -69,7 +69,10 @@ export function JobsDocumentsLocalGallery({ ) { acc.images.push(val); } else { - acc.other.push(val); + acc.other.push({ + ...val, + tags: [{ value: val.filename, title: val.filename }], + }); } return acc; }, @@ -104,6 +107,7 @@ export function JobsDocumentsLocalGallery({ job={job} invoice_number={invoice_number} vendorid={vendorid} + allowAllTypes /> diff --git a/server/accounting/qbo/qbo-receivables.js b/server/accounting/qbo/qbo-receivables.js index e8d66c136..00827363c 100644 --- a/server/accounting/qbo/qbo-receivables.js +++ b/server/accounting/qbo/qbo-receivables.js @@ -238,6 +238,12 @@ exports.QueryInsuranceCo = QueryInsuranceCo; async function InsertInsuranceCo(oauthClient, qbo_realmId, req, job, bodyshop) { const insCo = bodyshop.md_ins_cos.find((i) => i.name === job.ins_co_nm); + if (!insCo) { + throw new Error( + `Insurance Company '${job.ins_co_nm}' not found in shop configuration. Please make sure it exists or change the insurance company name on the job to one that exists.` + ); + return; + } const Customer = { DisplayName: job.ins_co_nm.trim(), BillWithParent: true,