Fix/bank sync bas (#1284)

* fix(year-end): stop revaluing FX items that were not on the balance sheet

The year-end close ran currency revaluation as an unconditional step before
the irreversible close, and the revaluation queried LIVE open invoices with
no date scoping. An invoice issued after balansdagen, settled before it, or
never booked at all was therefore revalued into the year being closed,
writing down a 1510/2440 that stood at zero. Because the entry lands inside
the same run that closes the period, the only remedy left was a rattelse in
the following year.

The population is now measured as of balansdagen, reusing the reconstruction
the reskontra reports already use (fetchPaymentsAsOf / outstandingAsOf): the
invoice_date ceiling is unconditional (post-dated invoices make the bug
reachable for a current period too) and the widening to 'paid' applies only
to a historical date, where a since-settled invoice was still open then.

Rows that carry no balance-sheet exposure are skipped per row rather than per
company: an unbooked registration is not on 1510/2440. Deliberately NOT keyed
on accounting_method, since BFL 5 kap 2 § 3 st requires kontantmetoden
companies to book their outstanding fordringar/skulder at balansdagen, and
those converted rows are genuine exposure that ARL 4 kap. 13 § must value.

The readiness warning stays ungated on purpose: an unbooked FX row is exactly
what deserves a warning, because /book still posts it into the year about to
close and lockPeriod/closePeriod then removes that remedy for good.

The wizard preview now lists the per-invoice revaluation rows it will post
instead of three aggregate numbers, so the user approves line-level content
before the close.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* fix(bookkeeping): reach accounts outside BAS 2026 from a verifikat rattelse

A user could not move a verifikat line to konto 8022: the picker reported no
such account and offered no way forward. 8022 was dropped from BAS 2026 (it
is in BAS 2018), so it is a legitimate company-specific underkonto rather
than a catalog gap. Verified against the official bas.se kontoplan that our
BAS reference already matches BAS 2026, so 8022 is deliberately NOT added to
it: seeding a retired account would push it onto every company.

StrikeLinesDialog and CorrectionEntryDialog were the only account pickers in
the app that never passed onCreateAccount, so their combobox rendered a dead
empty state. Both now open AddAccountDialog prefilled, then refetch the chart
and select the new account on the initiating line, leaving the half-finished
rattelse intact.

AccountCombobox closed its dropdown on the fourth digit of any committed
number, which hid the empty state before it was ever painted and made the
create affordance unreachable for exactly the numbers that need it. It now
closes only when the number matches something, so focus still advances to the
belopp field for real accounts.

No change to posting rules: correct_entry_lines_inline validates chart
membership, not BAS membership, and account creation already required the
same write role.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* fix(vacation): adjust vacation accrual calculations for mid-year hires and update related logic

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Mattsson
2026-07-29 13:28:51 +02:00
committed by GitHub
co-authored by Claude Opus 5
parent 108f348c84
commit 3bbf2a051b
19 changed files with 1063 additions and 109 deletions
+3 -2
View File
@@ -1604,7 +1604,8 @@
"format_bg_lb": "Bankgirot LB file",
"format_pain001": "ISO 20022 pain.001 (XML)",
"format_description_bg_lb": "Legacy Bankgirot format. Being retired by the banks during 2026 — use pain.001 if your bank supports it.",
"format_description_pain001": "ISO 20022 — the new payment file standard at Swedbank, SEB, Handelsbanken and Nordea.",
"format_description_pain001": "ISO 20022, the payment file standard. Usually requires a file transfer agreement with your bank: several online banks do not accept pain.001 through ordinary file upload.",
"pain001_agreement_warning": "pain.001 is normally delivered through a file transfer agreement or a bankgiro connection, not by uploading it in your online bank. Check that your bank accepts the file that way well before the pay date.",
"sunset_warning": "Swedish banks are retiring Bankgirot Lön during 2026 — Swedbank stops accepting LB salary files on 1 August 2026, other banks during the autumn. Switch to pain.001 in good time.",
"sunset_link": "Change in payroll settings",
"download": "Download payment file",
@@ -1622,7 +1623,7 @@
"steps_bg_lb_handelsbanken": "Betala → Filimport → choose LB → verify totals → sign. Note: Handelsbanken no longer accepts salary files via Bankgirot.",
"steps_bg_lb_nordea": "Filimport → Bankgiro LB → upload → approve the payment.",
"steps_pain001_swedbank": "Betala och överföra → Filtjänster → Upload file (ISO 20022 pain.001) → sign with BankID.",
"steps_pain001_seb": "Betalningar → Import SEPA / ISO 20022 (pain.001) → upload and sign. The file must be received no later than 10:30 the day before the pay date.",
"steps_pain001_seb": "SEB Business Arena does not accept pain.001 through file upload, only CSV, and SEB's SEPA CSV covers EUR payments only. pain.001 to SEB requires a file transfer agreement. Without one, choose the Bankgirot LB file instead for domestic salaries in SEK.",
"steps_pain001_handelsbanken": "Betala → Filimport → ISO 20022 → choose pain.001 → sign.",
"steps_pain001_nordea": "Filimport in Nordea Business → Format pain.001 → upload → approve.",
"tax_title": "Payment to your skattekonto",
+3 -2
View File
@@ -1604,7 +1604,8 @@
"format_bg_lb": "Bankgirot LB-fil",
"format_pain001": "ISO 20022 pain.001 (XML)",
"format_description_bg_lb": "Äldre Bankgirot-format. Avvecklas av bankerna under 2026 — använd pain.001 om din bank stöder det.",
"format_description_pain001": "ISO 20022 — den nya standarden för betalfiler hos Swedbank, SEB, Handelsbanken och Nordea.",
"format_description_pain001": "ISO 20022, standarden för betalfiler. Kräver oftast filkommunikationsavtal med banken: flera internetbanker tar inte emot pain.001 via vanlig filuppladdning.",
"pain001_agreement_warning": "pain.001 skickas normalt via filkommunikationsavtal eller bankgirokoppling, inte genom att laddas upp i internetbanken. Kontrollera att din bank tar emot filen den vägen i god tid före utbetalningsdagen.",
"sunset_warning": "Bankerna avvecklar Bankgirot Lön under 2026 — Swedbank slutar ta emot LB-lönefiler 1 augusti 2026, övriga banker under hösten. Byt till pain.001 i god tid.",
"sunset_link": "Ändra i löneinställningarna",
"download": "Ladda ner betalfil",
@@ -1622,7 +1623,7 @@
"steps_bg_lb_handelsbanken": "Betala → Filimport → välj LB → kontrollera summor → signera. OBS: Handelsbanken tar inte längre emot lönefiler via Bankgirot.",
"steps_bg_lb_nordea": "Filimport → Bankgiro LB → ladda upp → attestera betalningen.",
"steps_pain001_swedbank": "Betala och överföra → Filtjänster → Ladda upp fil (ISO 20022 pain.001) → signera med BankID.",
"steps_pain001_seb": "Betalningar → Importera SEPA / ISO 20022 (pain.001) → ladda upp och signera. Filen ska vara inne senast 10:30 dagen före utbetalningsdagen.",
"steps_pain001_seb": "SEB Business Arena tar inte emot pain.001 via filuppladdning, där godkänns bara CSV, och SEB:s SEPA-CSV gäller enbart betalningar i EUR. pain.001 till SEB kräver filkommunikationsavtal. Utan ett sådant avtal: välj Bankgirot LB-filen i stället för inrikes löner i SEK.",
"steps_pain001_handelsbanken": "Betala → Filimport → ISO 20022 → välj pain.001 → signera.",
"steps_pain001_nordea": "Filimport i Nordea Business → Format pain.001 → ladda upp → attestera.",
"tax_title": "Inbetalning till Skattekontot",