Skip to content

Commit f19e25f

Browse files
Hiding NF info when not available
1 parent 7e01b11 commit f19e25f

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/PhpSigep/Pdf/CartaoDePostagem.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,13 @@ private function _render()
282282
$this->setFillColor(100, 150, 200);
283283
$this->pdf->SetXY($lPosFourAreas + 43, $bPosHeader + 15);
284284
// $this->t($lPosChancela - $lPosHeaderCol2, 'Volume: ' . ($total - count($objetosPostais)) . '/' . $total, 0, 'C', $lineHeigth);
285-
$this->t($lPosChancela, 'Volume: 1/1 '.'Peso(g): ' . ((float)$objetoPostal->getPeso()) . ' NF: '.((float)$objetoPostal->getDestino()->getNumeroNotaFiscal()), 1, 'C', null);
285+
286+
$nf = (float)$objetoPostal->getDestino()->getNumeroNotaFiscal();
287+
if($nf > 0) {
288+
$nf = ' NF: '. $nf;
289+
}
290+
291+
$this->t($lPosChancela, 'Volume: 1/1 '.'Peso(g): ' . ((float)$objetoPostal->getPeso()) . $nf, 1, 'C', null);
286292

287293
// Número da etiqueta
288294
$this->setFillColor(100, 100, 200);

0 commit comments

Comments
 (0)