Skip to content

Commit

Permalink
Merge pull request #6 from conectra/feature/CN-56-isento-branco-danfe
Browse files Browse the repository at this point in the history
[UPD] #sped-da,#danfe - atualizando validação para quando do tipo isento, aparecer literal isento na danfe
  • Loading branch information
evandrogdn authored Apr 20, 2021
2 parents 42311e2 + 8e13d1b commit adb3b16
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions src/NFe/Danfe.php
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ public function creditsIntegratorFooter($message = '')
{
$this->creditos = trim($message);
}

/**
* monta
*
Expand Down Expand Up @@ -715,8 +715,8 @@ public function montaDANFE(
$y = $this->pCabecalhoDANFE($x, $y, $pag, $totPag);
//coloca os dados do destinatário
$y = $this->pDestinatarioDANFE($x, $y+1);


//Verifica as formas de pagamento da nota fiscal
$formaPag = array();
if (isset($this->detPag) && $this->detPag->length > 0) {
Expand Down Expand Up @@ -1605,7 +1605,12 @@ protected function pDestinatarioDANFE($x = 0, $y = 0)
$aFont = array('font'=>$this->fontePadrao, 'size'=>6, 'style'=>'');
$this->pTextBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
$IE = $this->dest->getElementsByTagName("IE");
$texto = ($IE && $IE->length > 0) ? $IE->item(0)->nodeValue : '';
$indIE = $this->dest->getElementsByTagName("indIEDest")->item(0)->nodeValue;
if ($indIE === 2 || $indIE === '2') {
$texto = 'ISENTO';
} else {
$texto = ($IE && $IE->length > 0) ? $IE->item(0)->nodeValue : '';
}
$aFont = array('font'=>$this->fontePadrao, 'size'=>10, 'style'=>'B');
$this->pTextBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
//HORA DA SAÍDA
Expand Down Expand Up @@ -1892,7 +1897,7 @@ protected function pagamentoDANFE($x, $y)
return ($y-2);
}
} //fim da função pagamentoDANFE

/**
* impostoDanfeHelper
* Auxilia a montagem dos campos de impostos e totais da DANFE
Expand Down Expand Up @@ -3429,7 +3434,7 @@ protected function pGeraInformacoesDasNotasReferenciadas()
}
return $saida;
}

private function imagePNGtoJPG($original)
{
$image = imagecreatefrompng($original);
Expand Down

0 comments on commit adb3b16

Please sign in to comment.