diff --git a/components/extensions/general/ArcimMigrationWorkspace.tsx b/components/extensions/general/ArcimMigrationWorkspace.tsx index 0f2b964b..9fbc0e51 100644 --- a/components/extensions/general/ArcimMigrationWorkspace.tsx +++ b/components/extensions/general/ArcimMigrationWorkspace.tsx @@ -1967,19 +1967,29 @@ function ResultStep({ } if (results.registrationLinks && results.registrationLinks.scanned > 0) { const links = results.registrationLinks - const unlinked = links.scanned - links.linked - links.alreadyLinked + // An invoice that already carried its link (a rerun over invoices an + // earlier run linked) is done, not failed: it counts towards the + // displayed total and gets its own detail line, so the value and the + // details agree. Without this a rerun read "0 av 2" with no explanation. + const done = links.linked + links.alreadyLinked + const unlinked = links.scanned - done + const details: string[] = [] + if (links.alreadyLinked > 0) { + details.push(t('ext_arcim_registration_links_already_linked', { count: links.alreadyLinked })) + } + if (unlinked > 0) { + details.push(t('ext_arcim_registration_links_detail', { + unlinked, + noRef: links.noRef, + refNotFetched: links.refNotFetched ?? 0, + unresolved: links.unresolved + links.ambiguous, + amountMismatch: links.amountMismatch, + })) + } entityLines.push({ label: t('ext_arcim_registration_links_label'), - value: t('ext_arcim_registration_links_value', { linked: links.linked, scanned: links.scanned }), - detail: unlinked > 0 - ? t('ext_arcim_registration_links_detail', { - unlinked, - noRef: links.noRef, - refNotFetched: links.refNotFetched ?? 0, - unresolved: links.unresolved + links.ambiguous, - amountMismatch: links.amountMismatch, - }) - : undefined, + value: t('ext_arcim_registration_links_value', { linked: done, scanned: links.scanned }), + detail: details.length > 0 ? details.join('. ') : undefined, failed: false, }) } diff --git a/messages/en.json b/messages/en.json index 58c1c064..978d547c 100644 --- a/messages/en.json +++ b/messages/en.json @@ -5598,6 +5598,7 @@ "ext_arcim_registration_links_label": "Voucher links", "ext_arcim_registration_links_value": "{linked} of {scanned} invoices linked to their booking voucher", "ext_arcim_registration_links_detail": "{unlinked} not linked: {noRef} without a voucher number at the provider, {refNotFetched} whose provider details could not be fetched in time, {unresolved} without an unambiguous booking voucher, {amountMismatch} with a differing amount", + "ext_arcim_registration_links_already_linked": "{count, plural, one {# was already linked earlier} other {# were already linked earlier}}", "ext_arcim_credit_notes_label": "Credit notes", "ext_arcim_credit_notes_unlinked_detail": "{count, plural, one {# credit note was imported without a link to the invoice it credits: your old system sends no reference to the original invoice. Its amounts are reversed and the record is complete, but the link to the original invoice is missing.} other {# credit notes were imported without a link to the invoices they credit: your old system sends no reference to the original invoice. Their amounts are reversed and the records are complete, but the link to the original invoice is missing.}}", "ext_arcim_migration_description": "Migrate bookkeeping from Fortnox, Visma, Bokio, Björn Lundén or Briox", diff --git a/messages/sv.json b/messages/sv.json index 4490ed63..5d146220 100644 --- a/messages/sv.json +++ b/messages/sv.json @@ -5598,6 +5598,7 @@ "ext_arcim_registration_links_label": "Verifikatkoppling", "ext_arcim_registration_links_value": "{linked} av {scanned} fakturor kopplade till bokföringsverifikat", "ext_arcim_registration_links_detail": "{unlinked} utan koppling: {noRef} saknar verifikatnummer hos leverantören, {refNotFetched} vars detaljer inte hann hämtas från leverantören, {unresolved} utan entydigt bokföringsverifikat, {amountMismatch} med avvikande belopp", + "ext_arcim_registration_links_already_linked": "{count, plural, one {# var redan länkad sedan tidigare} other {# var redan länkade sedan tidigare}}", "ext_arcim_credit_notes_label": "Kreditfakturor", "ext_arcim_credit_notes_unlinked_detail": "{count, plural, one {# kreditfaktura importerades utan koppling till fakturan den krediterar: ditt gamla system skickar ingen referens till ursprungsfakturan. Beloppen är omvända och posten är komplett, men kopplingen till ursprungsfakturan saknas.} other {# kreditfakturor importerades utan koppling till fakturorna de krediterar: ditt gamla system skickar ingen referens till ursprungsfakturan. Beloppen är omvända och posterna är kompletta, men kopplingen till ursprungsfakturan saknas.}}", "ext_arcim_migration_description": "Migrera bokföring från Fortnox, Visma, Bokio, Björn Lundén eller Briox",