fix(sjalvfaktura): name the arrival date so it is not read as payment date (#2272)

Root cause: the self-billing form labelled invoices.received_date as
"Mottaget datum" / "Received date". Read cold, "mottaget" attaches to
whatever the reader has in mind (payment received, goods received), and
two people in the Discord thread guessed wrong. The field only records
the day the counterparty's document arrived; the payment date is set
separately when the invoice is marked as paid.

Fix: rename the label to "Ankomstdatum" / "Date received" (with the
matching validation message and the next-step hint in the editor
footer), and add a helper line under the field saying the payment date
is set when the invoice is marked paid. Same text-xs muted helper
pattern the form already uses for other hints. The keys live in the
self_billing and invoice_editor namespaces and are used only by
InvoiceEditor.tsx; nothing is shared with the supplier-invoice form.
No DB columns, API fields or types change.

Fixes #2264


Claude-Session: https://claude.ai/code/session_015qgLgdt4mLmha1ZLFMwq1u

Co-authored-by: Jakob Wennberg <311770904+jakobwennberg-oss@users.noreply.github.com>
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
Jakob Wennberg
2026-09-04 17:13:52 +02:00
committed by GitHub
parent 743e3ae7cc
commit f96a445d88
3 changed files with 9 additions and 6 deletions
+1
View File
@@ -2239,6 +2239,7 @@ export default function InvoiceEditor(props: InvoiceEditorProps = { mode: 'creat
aria-required="true"
className="tabular-nums"
/>
<p className="text-xs text-muted-foreground">{ts('received_date_help')}</p>
{errors.received_date && (
<p className="text-sm text-destructive">{errors.received_date.message}</p>
)}
+4 -3
View File
@@ -3696,7 +3696,7 @@
"next_step_personnummer": "enter the personal number for the deduction",
"next_step_housing": "enter the property designation",
"next_step_external_number": "enter the customer's invoice number",
"next_step_received_date": "set the received date",
"next_step_received_date": "set the date received",
"ready_create": "Ready to review: everything else has sensible defaults.",
"ready_edit": "Ready to save.",
"ready_self_billed": "Ready to register.",
@@ -6440,13 +6440,14 @@
"agreement_ref_label": "Agreement reference",
"agreement_ref_placeholder": "Self-billing agreement",
"invoice_date_label": "Invoice date",
"received_date_label": "Received date",
"received_date_label": "Date received",
"received_date_help": "The day the self-billing invoice arrived. The payment date is set when the invoice is marked as paid.",
"register": "Register self-billing invoice",
"created_title": "Self-billing invoice registered",
"created_description": "Self-billing invoice {number} has been booked as a sale",
"create_failed_title": "Could not register the self-billing invoice",
"validation_external_number_required": "Invoice number is required",
"validation_received_date_required": "Received date is required"
"validation_received_date_required": "Date received is required"
},
"invoices": {
"rot_rut_payout_action": "ROT/RUT file",
+4 -3
View File
@@ -3696,7 +3696,7 @@
"next_step_personnummer": "ange personnummer för skattereduktionen",
"next_step_housing": "ange fastighetsbeteckning",
"next_step_external_number": "ange kundens fakturanummer",
"next_step_received_date": "ange mottagningsdatum",
"next_step_received_date": "ange ankomstdatum",
"ready_create": "Klar att granska: allt annat har smarta förval.",
"ready_edit": "Klart att spara.",
"ready_self_billed": "Klar att registrera.",
@@ -6440,13 +6440,14 @@
"agreement_ref_label": "Avtalsreferens",
"agreement_ref_placeholder": "Självfaktureringsavtal",
"invoice_date_label": "Fakturadatum",
"received_date_label": "Mottaget datum",
"received_date_label": "Ankomstdatum",
"received_date_help": "Dagen självfakturan kom in. Betaldatum sätts när fakturan markeras som betald.",
"register": "Registrera självfaktura",
"created_title": "Självfaktura registrerad",
"created_description": "Självfaktura {number} har bokförts som försäljning",
"create_failed_title": "Kunde inte registrera självfakturan",
"validation_external_number_required": "Fakturanummer krävs",
"validation_received_date_required": "Mottaget datum krävs"
"validation_received_date_required": "Ankomstdatum krävs"
},
"invoices": {
"rot_rut_payout_action": "ROT/RUT-fil",