fix(payments): creditor address per Swedbank TwnNm rule (Validex round 2) (#1508)

A present PstlAdr must carry TwnNm from November 2026 (PFH_222), so
BGNR-to-BGNR payments now carry no creditor address at all (rule 020
requires none there), IBAN-debited payments carry the supplier's town
(snapshotted as payee_city) plus Ctry SE, and the debtor address comes
from company settings, clearing the info-level rule 236 as well.

Co-authored-by: Jakob Wennberg <311770904+jakobwennberg-oss@users.noreply.github.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Jakob Wennberg
2026-08-10 21:19:44 +02:00
committed by GitHub
co-authored by Jakob Wennberg Claude Fable 5
parent fea5dfd1f9
commit 4655f3da48
7 changed files with 99 additions and 15 deletions
@@ -0,0 +1,12 @@
-- Swedbank MIG rule PFH_222 (Validex round 2, 2026-08-10): when a creditor
-- postal address is present, TwnNm is mandatory from November 2026. IBAN-
-- debited payments require the address (rule 237), so items snapshot the
-- supplier's city at creation, same immutability rules as the other payee
-- fields. Nullable: suppliers without a city keep working (BGNR-debited
-- payments carry no creditor address at all).
--
-- pg-test: covered-by tests/pg/supplier-payment-batches.pg.test.ts
ALTER TABLE public.supplier_payment_batch_items
ADD COLUMN payee_city text;
NOTIFY pgrst, 'reload schema';