Skip to content

Commit

Permalink
Fixed issue: Using addDocumentAllowanceCharge with Code SERVICE_OUTSI…
Browse files Browse the repository at this point in the history
…DE_SCOPE_OF_TAX never passes validation as the Taxtype is omitted if you pass no VAT rate
  • Loading branch information
c-schmitz committed Dec 2, 2024
1 parent 918faeb commit dc5a881
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ZugferdObjectHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}

Expand Down

0 comments on commit dc5a881

Please sign in to comment.