From d21876c14f641f62ac210273ff36486c043a8243 Mon Sep 17 00:00:00 2001 From: Juergen Kunz Date: Mon, 27 Oct 2025 08:36:33 +0000 Subject: [PATCH] feat(postingkeys): allow VAT account postings to skip VAT amount validation --- ts/skr.postingkeys.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ts/skr.postingkeys.ts b/ts/skr.postingkeys.ts index 552d61a..9ce57e3 100644 --- a/ts/skr.postingkeys.ts +++ b/ts/skr.postingkeys.ts @@ -85,7 +85,9 @@ export function validatePostingKey( } // Validate VAT requirement - if (rule.requiresVAT && !vatAmount) { + // Skip VAT amount requirement if posting TO a VAT account (the line itself IS the VAT) + const isVATAccount = accountNumber === '1571' || accountNumber === '1771' || accountNumber === '1576'; + if (rule.requiresVAT && !vatAmount && !isVATAccount) { errors.push( `Posting key ${postingKey} requires VAT amount, but none provided. ` + `Description: ${rule.description}`