Files
accounted/extensions/general/arcim-migration/lib
Jonas Hagberg 4f96ce920a fix(arcim-migration): dedup customers/suppliers by name when org-number is absent (#788)
The register import skips already-imported customers and suppliers by
org-number only. Records without an org-number (private-person customers,
suppliers like PostNord/IKANO) can never match, so every re-sync re-creates
them — and their invoices — producing 2x, 3x, 4x duplicate rows.

The nameToCustomerId / nameToSupplierId maps were already built and populated
but never consulted for dedup. Use them as a fallback: match on org-number
when present, otherwise on name. This mirrors the sales-invoice customer-stub
path, which already keys on `org ?? name`. When an org-number is present we
still match on it alone, avoiding false-positive name collisions across
distinct legal entities.

Signed-off-by: Jonas Hagberg <jonas@lindan.se>
2026-06-29 22:13:59 +02:00
..
2026-06-12 16:35:30 +02:00
2026-06-12 16:35:30 +02:00