Co-authored-by: renee-png <262607627+renee-png@users.noreply.github.com>
This commit is contained in:
gpt-engineer-app[bot]
2026-04-19 21:28:49 +00:00
co-authored by renee-png
parent 30adb4119c
commit c501a49c08
+2 -2
View File
@@ -573,8 +573,8 @@ const IMPORTERS: ImporterConfig[] = [
transform: (r, ctx) => {
r.client_id = (r._clientext && ctx.clientByExt.get(String(r._clientext))) || (r._clientname && ctx.clientByName.get(String(r._clientname).toLowerCase())) || null;
r.case_id = (r._caseext && ctx.caseByExt.get(String(r._caseext))) || (r._casenum && ctx.caseByNumber.get(String(r._casenum))) || null;
delete r._clientext; delete r._clientname; delete r._caseext; delete r._casenum;
if (!r.client_id) return null;
// Keep hints — async pre-insert step will auto-create an archived client
// (and archived case) when no match is found.
const s = String(r.status ?? "").toLowerCase();
r.status = ["draft", "sent", "paid", "overdue", "void"].includes(s) ? s : "draft";
return r;