Bug: The VIES VAT lookup mis-maps the billing address when the address block has more than two lines (e.g. a leading c/o line). The street name lands in the postcode field and the real postcode+city line is dropped, so Ingrid rejects the order (On Hold). Seen on order #13478 (postcode rendered as SANDHAMNSVÄGEN).
Root cause: Vies::resolveVatNumber() parsed by fixed position (line 0 = street, line 1 = postcode+city). PR #589 only fixed the within-line space split, not the line-count assumption.
Fix: PR #592 - parse by content: the last non-empty line is the postcode+city pair, the preceding lines join into the street. Regression test added for the multi-line c/o case (all 8 Vies tests green).
Follow-up (open): existing vat_numbers rows are persisted with the bad parse and returned before any re-parse, and affected orders' billing addresses also need a data fix. Clearing Redis does not help - the durable wrong data is in the vat_numbers DB table.
VIES address mapping mislabels postcode/city on multi-line addresses (c/o line)
Assigned to
Tags
-
Jonathan Gustafsson moved item to board Awaiting Review
1 month ago -
Jonathan Gustafsson moved item to board Backlog
1 month ago -
Jonathan Gustafsson moved item to project Bugs
1 month ago -
Jonathan Gustafsson created the item
1 month ago