fix: reset all accounts to default layout; fix slot 0 top-field clipping

- One-time migration (layout_reset_v1) deletes all layout_fields for every
  account and re-seeds with the default layout, ensuring .mdb-imported accounts
  get the same clean check style as wizard-created ones.
- Remove the -0.25" slot 0 y-offset that was pushing Company Name and Check
  Number above the top of the page on the first check.
- Consolidate layout field seed logic into database.js (seedLayoutFields),
  removing the duplicate in app.js.
This commit is contained in:
2026-03-31 17:27:55 -06:00
parent 064c14fa12
commit 8a944d1d20
3 changed files with 36 additions and 80 deletions
+1 -1
View File
@@ -138,7 +138,7 @@ function generateCheckPdf(account, checks, fields) {
for (let slot = 0; slot < 3; slot++) {
const check = checks[page * 3 + slot] || null;
const slotOriginY = slot * SLOT_HEIGHT_IN + (slot === 0 ? -0.25 : 0);
const slotOriginY = slot * SLOT_HEIGHT_IN;
// Helper: convert inches (relative to slot) to PDF points (absolute page)
const pt = (xIn, yIn) => ({