Skip to content

Commit

Permalink
Merge pull request #195 from c-schmitz/master
Browse files Browse the repository at this point in the history
Fixed issue: Using addDocumentAllowanceCharge with Code SERVICE_OUTSIDE_SCOPE_OF_TAX never passes validation because Taxtype is omitted if you pass no VAT rate
  • Loading branch information
horstoeko authored Dec 3, 2024
2 parents 2dfebcb + d3c59ba commit 1e5ffc9
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 @@ -1072,7 +1072,7 @@ public function getTradeAllowanceChargeType(?float $actualAmount = null, ?bool $
$this->tryCall($tradeAllowanceChargeType, "setReasonCode", $this->getCodeType($reasonCode));
$this->tryCall($tradeAllowanceChargeType, "setReason", $this->getTextType($reason));

if (!is_null($taxCategoryCode) && !is_null($taxTypeCode) && !is_null($rateApplicablePercent)) {
if (!is_null($taxCategoryCode) && !is_null($taxTypeCode)) {
$this->tryCall($tradeAllowanceChargeType, "setCategoryTradeTax", $this->getTradeTaxType($taxCategoryCode, $taxTypeCode, null, null, $rateApplicablePercent));
}

Expand Down

0 comments on commit 1e5ffc9

Please sign in to comment.