From dc5a8817e0fbbd82c5724289da581f42f555da08 Mon Sep 17 00:00:00 2001 From: Carsten Schmitz Date: Mon, 2 Dec 2024 17:04:33 +0100 Subject: [PATCH] Fixed issue: Using addDocumentAllowanceCharge with Code SERVICE_OUTSIDE_SCOPE_OF_TAX never passes validation as the Taxtype is omitted if you pass no VAT rate --- src/ZugferdObjectHelper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ZugferdObjectHelper.php b/src/ZugferdObjectHelper.php index db69b6b..58e8f38 100644 --- a/src/ZugferdObjectHelper.php +++ b/src/ZugferdObjectHelper.php @@ -1066,7 +1066,7 @@ public function getTradeAllowanceChargeType(?float $actualAmount = null, ?bool $ $this->tryCall($allowanceCharge, "setReasonCode", $this->getCodeType($reasonCode)); $this->tryCall($allowanceCharge, "setReason", $this->getTextType($reason)); - if (!is_null($taxCategoryCode) && !is_null($taxTypeCode) && !is_null($rateApplicablePercent)) { + if (!is_null($taxCategoryCode) && !is_null($taxTypeCode)) { $this->tryCall($allowanceCharge, "setCategoryTradeTax", $this->getTradeTaxType($taxCategoryCode, $taxTypeCode, null, null, $rateApplicablePercent)); }