fix(bookkeeping): remove false 1580 tax-receivable label, let company account names win (#1968)
The hardcoded ACCOUNT_DESCRIPTIONS entry labeled 1580 'Fordran for skatt' with a Skatteverket explanation. That is wrong on both counts: tax receivables are 1640 (skattefordringar) / 1650 (momsfordran), and 1580 was traditionally 'Fordringar for kontokort och kuponger', which BAS has since moved to 1686 (why 1580 is excluded from our BAS 2026 catalog). Reported by a user who books card/Swish settlements there. Also flip AccountNumber display precedence to the company's own account_name over the hardcoded reference name: chart rows are user-editable data and must not be visually overridden by our copy. The tooltip keeps showing the BAS reference info. Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
dae0aac26a
commit
ff88e3de05
@@ -14,6 +14,13 @@ describe('account-descriptions', () => {
|
||||
expect(getAccountDescription('9999')).toBeUndefined()
|
||||
expect(getAccountDescription('')).toBeUndefined()
|
||||
})
|
||||
|
||||
it('has no entry for 1580 (removed from BAS; was mislabeled as tax receivable)', () => {
|
||||
// Tax receivables are 1640/1650. Card/coupon receivables moved from
|
||||
// 1580 to 1686. 1580 must stay undefined so a company's own account
|
||||
// name is what renders.
|
||||
expect(getAccountDescription('1580')).toBeUndefined()
|
||||
})
|
||||
})
|
||||
|
||||
describe('data completeness', () => {
|
||||
|
||||
@@ -18,12 +18,11 @@ const ACCOUNT_DESCRIPTIONS: Record<string, AccountDescription> = {
|
||||
type: 'asset',
|
||||
explanation: 'Pengar som kunder är skyldiga dig för skickade fakturor som inte betalats ännu.',
|
||||
},
|
||||
'1580': {
|
||||
name: 'Fordran för skatt',
|
||||
classLabel: 'Tillgångar',
|
||||
type: 'asset',
|
||||
explanation: 'Pengar du har att fordra från Skatteverket, t.ex. överskjutande moms.',
|
||||
},
|
||||
// 1580 is intentionally absent: BAS moved card/coupon acquirer receivables
|
||||
// from 1580 to 1686, and 1580 is excluded from the BAS 2026 catalog as
|
||||
// non-standard (see bas-reference.test.ts). A hardcoded entry here once
|
||||
// mislabeled it as a tax receivable (that is 1640/1650); companies with a
|
||||
// legacy 1580 see their own account name instead.
|
||||
'1630': {
|
||||
name: 'Skattekonto',
|
||||
classLabel: 'Tillgångar',
|
||||
|
||||
Reference in New Issue
Block a user