# BONE FLOW #024 — Global voucher serial, v1.0.266

Status: DEVELOPMENT / NOT COMPLETED. Edge, Windows Installer, and user SQLite have NOT been verified.

**Number model**: visible four digits global across all dates: 0001, 0002, ..., 9999, 0001. The persisted field uses the actual voucher date YYYYMMDD plus serial NNNN. The original immutable `voucherId` is preserved. If 9999 cycles into a previously used serial on the same date, skip it; if a date has 9999 distinct serials, block new saves.

**Existing data repair**: the read-only voucher list previews chronological numbering (voucher date then voucherId; taskId breaks ties). The user can click `保存済み伝票を連番に修正` once the Calendar/SQLite state is clean. It previews changes, downloads an external SQLite backup, requires explicit acknowledgement that the backup is secured, then modifies ONLY the `voucher.number` field and serial bookkeeping metadata, and compares full SQLite readback. No master, line, amount, payrollDetails, task or voucherId is altered. It refuses unresolved/dirty/overlapping save states. It does not edit user data simply upon viewing the list.

**Fresh documents**: global sequence is taken from the SQLite metadata (`voucherSerialLast`), else from existing voucher count before first repair. The last serial is updated ONLY after a verified explicit new voucher save. Edited existing vouchers do not reset the counter. A chronological renumber of previously saved documents is an explicit user action; no automatic startup migration.

**Limitations**: The user must secure and verify the exported backup in Downloads. No access to the actual Windows IndexedDB database from this Linux build. Browser/installer and recovery must be confirmed in Windows Edge. #029/#048/#054 Frozen sources are unmodified. The preceding persistence-stall investigation remains unresolved.
