Skip to content

Commit

Permalink
fix(infAdProd): não adiciona tag infAdProd vazia
Browse files Browse the repository at this point in the history
  • Loading branch information
mazinsw committed Nov 21, 2023
1 parent 2c3eab7 commit c516a9a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/NFe/Entity/Produto.php
Original file line number Diff line number Diff line change
Expand Up @@ -639,7 +639,9 @@ public static function getInformacoesProduto($tributos)
public static function addNodeInformacoes($tributos, $element, $name = null)
{
$texto = Produto::getInformacoesProduto($tributos);
Util::appendNode($element, is_null($name) ? 'infAdProd' : $name, $texto);
if (! is_null($texto)) {
Util::appendNode($element, is_null($name) ? 'infAdProd' : $name, $texto);
}
return $texto;
}

Expand Down

0 comments on commit c516a9a

Please sign in to comment.