fix(payments): creditor address on every payment (Validex round 3) (#1509)

Rule 237 fires on the BGNR-to-BGNR path too, so the round-2 reading of
rule 020 was wrong: it only relaxes the Ctry element, not the address.
Cdtr now always carries PstlAdr (TwnNm from the payee_city snapshot when
known, Ctry SE), and the preview warns when the supplier register lacks
a city, since rules 237 + 222 together make a town effectively mandatory
at Swedbank.

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:54:07 +02:00
committed by GitHub
co-authored by Jakob Wennberg Claude Fable 5
parent 4655f3da48
commit e45218bcc6
8 changed files with 42 additions and 29 deletions
@@ -29,7 +29,7 @@ interface PreviewLine {
payment_date: string
payee: { type: string; label: string }
reference: { type: 'ocr' | 'invoice_number'; value: string }
warnings: Array<'unattested' | 'already_batched' | 'ocr_invalid'>
warnings: Array<'unattested' | 'already_batched' | 'ocr_invalid' | 'payee_city_missing'>
active_batch_id: string | null
}