feat(invoices): allow BAS class 1-3 posting-account overrides and complete the aktiekapital note (#1121)

- invoice/article posting-account overrides accept active class 1-3 accounts;
  class 1-2 (balance-sheet) accounts are rejected on VAT-bearing lines so the
  ruta 05 tax base always books to a 3xxx account
- shared posting-account regex across server schemas, pending-operation
  re-validation, and client forms
- share-capital settings (aktiekapital/antal_aktier) feed the annual-report
  note; kvotvarde derived per ABL 1 kap 6 $; all-or-nothing pair constraint
- signed per-rate VAT breakdown on credit-note PDFs; U+2212 to ASCII hyphen

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Mattsson
2026-07-23 12:16:00 +02:00
committed by GitHub
co-authored by Claude Fable 5
parent b0044bfe98
commit 43f7ccab9e
27 changed files with 440 additions and 109 deletions
+6 -2
View File
@@ -6,10 +6,14 @@ import { Input } from '@/components/ui/input'
import { Label } from '@/components/ui/label'
import { roundOre } from '@/lib/money'
import { formatCurrency } from '@/lib/utils'
import type { CompanySettings } from '@/types'
// Deliberately narrow (data minimisation): the form only ever needs the two
// share-capital fields, not the whole CompanySettings object.
interface ShareCapitalFormProps {
settings: CompanySettings
settings: {
aktiekapital?: number | null
antal_aktier?: number | null
}
}
/**
@@ -59,7 +59,11 @@ export function CompanySettingsContent() {
<div className="space-y-8">
<SettingsFormWrapper onSave={handleSave} className="space-y-8">
<CompanyInfoForm settings={settings} />
{settings.entity_type === 'aktiebolag' && <ShareCapitalForm settings={settings} />}
{settings.entity_type === 'aktiebolag' && (
<ShareCapitalForm
settings={{ aktiekapital: settings.aktiekapital, antal_aktier: settings.antal_aktier }}
/>
)}
</SettingsFormWrapper>
<div className="border-t border-border pt-8">