Skip to content

fix(booking): no single BU key for reverse charge next to a taxed line - #1058

Merged
NiKrause merged 1 commit into
mainfrom
claude/tax-key-mixed-reverse-charge
Nov 28, 2026
Merged

NiKrause merged 1 commit into
mainfrom
claude/tax-key-mixed-reverse-charge

Conversation

@NiKrause

Copy link
Copy Markdown
Contributor

What

taxKeyFor (app/src/lib/booking/tax-keys.js) gave the reverse-charge key (94 by default) to the whole booking as soon as the receipt was flagged reverse_charge, even when another VAT line on the same receipt charged German VAT. One key would then book the taxed part as reverse charge too.

Such a receipt now gets no key, with via: 'mixed', like a receipt with several rates. The UI shows the existing hint for mixed rates ("bitte selbst prüfen").

The §13b key is kept when the only VAT line is the reverse-charge line itself (0 %, or a computed rate with category: 'reverse_charge'), and when a line has a rate but no amount, as a model sometimes reads it.

Why

Found while extending #932 (the BU key by where the vendor sits): the issue notes that several rates on one invoice, including a taxed line next to an AE line, need a split booking rather than one key.

Tests

Two new cases in app/src/lib/booking/booking.spec.js: the cases that keep the §13b key, and the mixed case on expense and income. All unit tests under app/src/lib pass; Prettier and ESLint are clean on both files.

Refs #932

🤖 Generated with Claude Code

taxKeyFor gave the reverse-charge key (94) to a whole booking as soon as the
receipt was flagged reverse_charge, even when another line charged German VAT.
One key would book the taxed part as reverse charge too, so such a receipt now
gets no key ('mixed'), like one with several rates. A reverse-charge line of
its own (0 % or a computed rate) and a rate without an amount keep the key.

Refs #932

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@NiKrause
NiKrause merged commit 8b20f25 into main Nov 28, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant