fix: seed layout fields at startup for accounts with none; add Company Name3/4 mapping

Accounts created before the layout seeder was deployed had no layout_fields
rows, so PDFs rendered blank (MICR only). The startup migration in database.js
now seeds default layout fields for any account with zero rows, idempotently
via INSERT OR IGNORE. Also adds Company Name3/Company Name4 cases to
resolveFieldValue so company3/company4 render correctly.
This commit is contained in:
2026-03-31 17:01:06 -06:00
parent 368e41037f
commit 9897841666
2 changed files with 70 additions and 0 deletions
+4
View File
@@ -288,6 +288,10 @@ function resolveFieldValue(fieldName, check, account) {
return account.company1;
case 'Company Name2':
return account.company2;
case 'Company Name3':
return account.company3;
case 'Company Name4':
return account.company4;
case 'Bank Information':
return [account.bank_name, account.bank_info1, account.bank_info2, account.bank_info3]
.filter(Boolean).join('\n');