Changes
Co-authored-by: renee-png <262607627+renee-png@users.noreply.github.com>
This commit is contained in:
co-authored by
renee-png
parent
6463081ba7
commit
333bcf633a
@@ -969,9 +969,13 @@ function ImportPage() {
|
||||
}
|
||||
}
|
||||
|
||||
// Mark as already invoiced via placeholder voided invoice (per client)
|
||||
if (clientId && !row.invoice_id) {
|
||||
const invId = await ensurePreInvoicedInvoice(clientId, caseId);
|
||||
// Link to a real invoice ONLY when the source row provided an
|
||||
// invoice number. Otherwise leave invoice_id null so the user can
|
||||
// bill these items normally later.
|
||||
const invNumber = row._invoice ? String(row._invoice).trim() : "";
|
||||
delete row._invoice;
|
||||
if (invNumber && clientId && !row.invoice_id) {
|
||||
const invId = await ensureNamedInvoice(clientId, caseId, invNumber);
|
||||
if (invId) row.invoice_id = invId;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user