feat(manifest): add externalNumber reference to quote/order/delivery

- Add `external_number NVARCHAR(100)` column to the `manifest` table.
- Thread `externalNumber` through manifestDoc and delivery SQL (list,
  header, create, update).
- Include `externalNumber` in shapeSummary and quote/order/delivery
  create/update/list/getById handlers (optional, clearable on update).
- Update README type definitions and regenerate API/schema docs.
This commit is contained in:
seb
2026-08-08 09:13:20 +02:00
parent f302cda39e
commit 29099b2a16
23 changed files with 210 additions and 143 deletions

View File

@@ -537,6 +537,7 @@ BEGIN
[number] NVARCHAR(100) NOT NULL,
[type] NVARCHAR(100) NOT NULL,
entity_id INT NULL,
external_number NVARCHAR(100) NULL,
[date] DATETIME2 NOT NULL CONSTRAINT DF_manifest_date DEFAULT SYSUTCDATETIME(),
CONSTRAINT FK_manifest_company FOREIGN KEY (company_id) REFERENCES company(id) ON DELETE NO ACTION,
CONSTRAINT FK_manifest_entity FOREIGN KEY (entity_id) REFERENCES entity(id) ON DELETE SET NULL