@@ -343,7 +343,7 @@ discard block |
||
343 | 343 | { |
344 | 344 | $this->textoAdic = ''; |
345 | 345 | //informações adicionais |
346 | - $fontProduto = [ |
|
346 | + $fontProduto = [ |
|
347 | 347 | 'font' => $this->fontePadrao, |
348 | 348 | 'size' => 8, |
349 | 349 | 'style' => '' |
@@ -356,16 +356,16 @@ discard block |
||
356 | 356 | if ($this->textoAdic != '') { |
357 | 357 | $this->textoAdic .= ". \n"; |
358 | 358 | } |
359 | - $this->textoAdic .= ! empty($this->getTagValue($this->infAdic, "infCpl")) |
|
359 | + $this->textoAdic .= !empty($this->getTagValue($this->infAdic, "infCpl")) |
|
360 | 360 | //? 'Inf. Contribuinte: ' . $this->anfaveaDANFE($this->getTagValue($this->infAdic, "infCpl")) |
361 | 361 | ? 'Inf. Contribuinte: ' . $this->getTagValue($this->infAdic, "infCpl") |
362 | 362 | : ''; |
363 | - $infPedido = $this->geraInformacoesDaTagCompra(); |
|
363 | + $infPedido = $this->geraInformacoesDaTagCompra(); |
|
364 | 364 | if ($infPedido != "") { |
365 | 365 | $this->textoAdic .= $infPedido; |
366 | 366 | } |
367 | 367 | $this->textoAdic .= $this->getTagValue($this->dest, "email", ' Email do Destinatário: '); |
368 | - $this->textoAdic .= ! empty($this->getTagValue($this->infAdic, "infAdFisco")) |
|
368 | + $this->textoAdic .= !empty($this->getTagValue($this->infAdic, "infAdFisco")) |
|
369 | 369 | ? "\n Inf. fisco: " . $this->getTagValue($this->infAdic, "infAdFisco") |
370 | 370 | : ''; |
371 | 371 | if ($this->obsshow) { |
@@ -373,11 +373,11 @@ discard block |
||
373 | 373 | if (isset($obsCont)) { |
374 | 374 | foreach ($obsCont as $obs) { |
375 | 375 | $campo = $obsCont->item($i)->getAttribute("xCampo"); |
376 | - $xTexto = ! empty($obsCont->item($i)->getElementsByTagName("xTexto")->item(0)->nodeValue) |
|
376 | + $xTexto = !empty($obsCont->item($i)->getElementsByTagName("xTexto")->item(0)->nodeValue) |
|
377 | 377 | ? $obsCont->item($i)->getElementsByTagName("xTexto")->item(0)->nodeValue |
378 | 378 | : ''; |
379 | 379 | $this->textoAdic .= "\n" . $campo . ': ' . trim($xTexto); |
380 | - $i ++; |
|
380 | + $i++; |
|
381 | 381 | } |
382 | 382 | } |
383 | 383 | } |
@@ -392,7 +392,7 @@ discard block |
||
392 | 392 | $flagVTT = $flagVTT && (strpos(strtolower(trim($this->textoAdic)), 'trib') || |
393 | 393 | strpos(strtolower(trim($this->textoAdic)), 'imp')); |
394 | 394 | $vTotTrib = $this->getTagValue($this->ICMSTot, 'vTotTrib'); |
395 | - if ($vTotTrib != '' && ! $flagVTT) { |
|
395 | + if ($vTotTrib != '' && !$flagVTT) { |
|
396 | 396 | $this->textoAdic .= "\n Valor Aproximado dos Tributos : R$ " |
397 | 397 | . number_format($vTotTrib, 2, ",", "."); |
398 | 398 | } |
@@ -403,9 +403,9 @@ discard block |
||
403 | 403 | $this->textadicfontsize = $this->pdf->fontSize; |
404 | 404 | $hdadosadic = ceil($numlinhasdados * ($this->textadicfontsize)); |
405 | 405 | if ($hdadosadic > 70) { |
406 | - for ($f = 8; $f > 3; $f --) { |
|
406 | + for ($f = 8; $f > 3; $f--) { |
|
407 | 407 | $this->pdf->setFont($this->fontePadrao, '', $f); |
408 | - $fontProduto = [ |
|
408 | + $fontProduto = [ |
|
409 | 409 | 'font' => $this->fontePadrao, |
410 | 410 | 'size' => $f, |
411 | 411 | 'style' => '' |
@@ -528,9 +528,9 @@ discard block |
||
528 | 528 | $this->hdadosadic = $this->calculoEspacoVericalDadosAdicionais(); |
529 | 529 | |
530 | 530 | //altura disponivel para os campos da DANFE |
531 | - $hcabecalho = 47;//para cabeçalho |
|
532 | - $hdestinatario = 25;//para destinatario |
|
533 | - $hduplicatas = 12;//para cada grupo de 7 duplicatas |
|
531 | + $hcabecalho = 47; //para cabeçalho |
|
532 | + $hdestinatario = 25; //para destinatario |
|
533 | + $hduplicatas = 12; //para cada grupo de 7 duplicatas |
|
534 | 534 | if (isset($this->entrega)) { |
535 | 535 | $hlocalentrega = 25; |
536 | 536 | } else { |
@@ -541,11 +541,11 @@ discard block |
||
541 | 541 | } else { |
542 | 542 | $hlocalretirada = 0; |
543 | 543 | } |
544 | - $himposto = 18;// para imposto |
|
545 | - $htransporte = 25;// para transporte |
|
546 | - $hissqn = 11;// para issqn |
|
547 | - $hfooter = 5;// para rodape |
|
548 | - $hCabecItens = 4;//cabeçalho dos itens |
|
544 | + $himposto = 18; // para imposto |
|
545 | + $htransporte = 25; // para transporte |
|
546 | + $hissqn = 11; // para issqn |
|
547 | + $hfooter = 5; // para rodape |
|
548 | + $hCabecItens = 4; //cabeçalho dos itens |
|
549 | 549 | $hOCUPADA = $hcabecalho |
550 | 550 | + $hdestinatario |
551 | 551 | + $hlocalentrega |
@@ -568,10 +568,10 @@ discard block |
||
568 | 568 | $this->sizeExtraTextoFatura());*/ |
569 | 569 | |
570 | 570 | if ($this->orientacao == 'P') { |
571 | - $hDispo1 -= 24 * $this->qCanhoto;//para canhoto |
|
572 | - $w = $this->wPrint; |
|
571 | + $hDispo1 -= 24 * $this->qCanhoto; //para canhoto |
|
572 | + $w = $this->wPrint; |
|
573 | 573 | } else { |
574 | - $hcanhoto = $this->hPrint;//para canhoto |
|
574 | + $hcanhoto = $this->hPrint; //para canhoto |
|
575 | 575 | $w = $this->wPrint - $this->wCanhoto; |
576 | 576 | } |
577 | 577 | //$hDispo1 += 14; |
@@ -607,12 +607,12 @@ discard block |
||
607 | 607 | ); |
608 | 608 | $hUsado += $this->calculeHeight($itemProd, $mostrarUnidadeTributavel); |
609 | 609 | if ($hUsado > $hDispo) { |
610 | - $totPag ++; |
|
610 | + $totPag++; |
|
611 | 611 | $hDispo = $hDispo2; |
612 | 612 | $hUsado = $hCabecItens; |
613 | - $i --; // decrementa para readicionar o item que não coube nessa pagina na outra. |
|
613 | + $i--; // decrementa para readicionar o item que não coube nessa pagina na outra. |
|
614 | 614 | } |
615 | - $i ++; |
|
615 | + $i++; |
|
616 | 616 | } //fim da soma das areas de itens usadas |
617 | 617 | $qtdeItens = $i; //controle da quantidade de itens no DANFE |
618 | 618 | //montagem da primeira página |
@@ -644,7 +644,7 @@ discard block |
||
644 | 644 | $formaPag = []; |
645 | 645 | if (isset($this->detPag) && $this->detPag->length > 0) { |
646 | 646 | foreach ($this->detPag as $k => $d) { |
647 | - $fPag = ! empty($this->detPag->item($k)->getElementsByTagName('tPag')->item(0)->nodeValue) |
|
647 | + $fPag = !empty($this->detPag->item($k)->getElementsByTagName('tPag')->item(0)->nodeValue) |
|
648 | 648 | ? $this->detPag->item($k)->getElementsByTagName('tPag')->item(0)->nodeValue |
649 | 649 | : '0'; |
650 | 650 | $formaPag[$fPag] = $fPag; |
@@ -688,7 +688,7 @@ discard block |
||
688 | 688 | } |
689 | 689 | |
690 | 690 | //loop para páginas seguintes |
691 | - for ($n = 2; $n <= $totPag; $n ++) { |
|
691 | + for ($n = 2; $n <= $totPag; $n++) { |
|
692 | 692 | // fixa as margens |
693 | 693 | $this->pdf->setMargins($this->margesq, $this->margsup); |
694 | 694 | //adiciona nova página |
@@ -712,7 +712,7 @@ discard block |
||
712 | 712 | } |
713 | 713 | //se estiver na última página e ainda restar itens para inserir, adiciona mais uma página |
714 | 714 | if ($n == $totPag && $this->qtdeItensProc < $qtdeItens) { |
715 | - $totPag ++; |
|
715 | + $totPag++; |
|
716 | 716 | } |
717 | 717 | } |
718 | 718 | } |
@@ -741,7 +741,7 @@ discard block |
||
741 | 741 | if ($startPos === false) { |
742 | 742 | return $cdata; |
743 | 743 | } |
744 | - for ($x = $len; $x > 0; $x --) { |
|
744 | + for ($x = $len; $x > 0; $x--) { |
|
745 | 745 | if (substr($cdata, $x, 1) == '>') { |
746 | 746 | $endPos = $x; |
747 | 747 | break; |
@@ -837,15 +837,15 @@ discard block |
||
837 | 837 | //grupo CADATA infCpl |
838 | 838 | $t = $dom->getElementsByTagName('transmissor')->item(0); |
839 | 839 | $r = $dom->getElementsByTagName('receptor')->item(0); |
840 | - $versao = ! empty($dom->getElementsByTagName('versao')->item(0)->nodeValue) ? |
|
840 | + $versao = !empty($dom->getElementsByTagName('versao')->item(0)->nodeValue) ? |
|
841 | 841 | 'Versao:' . $dom->getElementsByTagName('versao')->item(0)->nodeValue . ' ' : ''; |
842 | - $especieNF = ! empty($dom->getElementsByTagName('especieNF')->item(0)->nodeValue) ? |
|
842 | + $especieNF = !empty($dom->getElementsByTagName('especieNF')->item(0)->nodeValue) ? |
|
843 | 843 | 'Especie:' . $dom->getElementsByTagName('especieNF')->item(0)->nodeValue . ' ' : ''; |
844 | - $fabEntrega = ! empty($dom->getElementsByTagName('fabEntrega')->item(0)->nodeValue) ? |
|
844 | + $fabEntrega = !empty($dom->getElementsByTagName('fabEntrega')->item(0)->nodeValue) ? |
|
845 | 845 | 'Entrega:' . $dom->getElementsByTagName('fabEntrega')->item(0)->nodeValue . ' ' : ''; |
846 | - $dca = ! empty($dom->getElementsByTagName('dca')->item(0)->nodeValue) ? |
|
846 | + $dca = !empty($dom->getElementsByTagName('dca')->item(0)->nodeValue) ? |
|
847 | 847 | 'dca:' . $dom->getElementsByTagName('dca')->item(0)->nodeValue . ' ' : ''; |
848 | - $texto .= "" . $versao . $especieNF . $fabEntrega . $dca; |
|
848 | + $texto .= "" . $versao . $especieNF . $fabEntrega . $dca; |
|
849 | 849 | if (isset($t)) { |
850 | 850 | if ($t->hasAttributes()) { |
851 | 851 | $texto .= " Transmissor "; |
@@ -891,14 +891,14 @@ discard block |
||
891 | 891 | } else { |
892 | 892 | if ($this->getTagValue($this->ide, "tpAmb") == '2') { |
893 | 893 | $resp['status'] = false; |
894 | - $resp['message'][] = "NFe EMITIDA EM HOMOLOGAÇÃO"; |
|
894 | + $resp['message'][] = "NFe EMITIDA EM HOMOLOGAÇÃO"; |
|
895 | 895 | } |
896 | 896 | $retEvento = $this->nfeProc->getElementsByTagName('retEvento')->item(0); |
897 | 897 | $cStat = $this->getTagValue($this->nfeProc, "cStat"); |
898 | - if (in_array($cStat, ['110','205','301','302','303'])) { |
|
898 | + if (in_array($cStat, ['110', '205', '301', '302', '303'])) { |
|
899 | 899 | $resp['status'] = false; |
900 | 900 | $resp['message'][] = "NFe DENEGADA"; |
901 | - } elseif (in_array($cStat, ['101','151','135','155']) |
|
901 | + } elseif (in_array($cStat, ['101', '151', '135', '155']) |
|
902 | 902 | || $this->cancelFlag === true |
903 | 903 | ) { |
904 | 904 | $resp['status'] = false; |
@@ -906,7 +906,7 @@ discard block |
||
906 | 906 | } elseif (!empty($retEvento)) { |
907 | 907 | $infEvento = $retEvento->getElementsByTagName('infEvento')->item(0); |
908 | 908 | $cStat = $this->getTagValue($infEvento, "cStat"); |
909 | - $tpEvento= $this->getTagValue($infEvento, "tpEvento"); |
|
909 | + $tpEvento = $this->getTagValue($infEvento, "tpEvento"); |
|
910 | 910 | $dhEvento = $this->toDateTime($this->getTagValue($infEvento, "dhRegEvento"))->format("d/m/Y H:i:s"); |
911 | 911 | $nProt = $this->getTagValue($infEvento, "nProt"); |
912 | 912 | if ($tpEvento == '110111' && |
@@ -970,7 +970,7 @@ discard block |
||
970 | 970 | //se for right separa 2/3 para os dados e o terço seguinte para o logo |
971 | 971 | //se não houver logo centraliza dos dados do emitente |
972 | 972 | // coloca o logo |
973 | - if (! empty($this->logomarca)) { |
|
973 | + if (!empty($this->logomarca)) { |
|
974 | 974 | $logoInfo = getimagesize($this->logomarca); |
975 | 975 | //largura da imagem em mm |
976 | 976 | $logoWmm = ($logoInfo[0] / 72) * 25.4; |
@@ -1026,7 +1026,7 @@ discard block |
||
1026 | 1026 | //endereço |
1027 | 1027 | $y1 = $y1 + 5; |
1028 | 1028 | $aFont = ['font' => $this->fontePadrao, 'size' => 8, 'style' => '']; |
1029 | - $fone = ! empty($this->enderEmit->getElementsByTagName("fone")->item(0)->nodeValue) |
|
1029 | + $fone = !empty($this->enderEmit->getElementsByTagName("fone")->item(0)->nodeValue) |
|
1030 | 1030 | ? $this->enderEmit->getElementsByTagName("fone")->item(0)->nodeValue |
1031 | 1031 | : ''; |
1032 | 1032 | $lgr = $this->getTagValue($this->enderEmit, "xLgr"); |
@@ -1045,8 +1045,8 @@ discard block |
||
1045 | 1045 | |
1046 | 1046 | //#################################################################################### |
1047 | 1047 | //coluna central Danfe |
1048 | - $x += $w; |
|
1049 | - $w = round($maxW * 0.17, 0);//35; |
|
1048 | + $x += $w; |
|
1049 | + $w = round($maxW * 0.17, 0); //35; |
|
1050 | 1050 | $w2 = $w; |
1051 | 1051 | $h = 32; |
1052 | 1052 | $this->pdf->textBox($x, $y, $w, $h); |
@@ -1103,8 +1103,8 @@ discard block |
||
1103 | 1103 | |
1104 | 1104 | //#################################################################################### |
1105 | 1105 | //coluna codigo de barras |
1106 | - $x += $w; |
|
1107 | - $w = ($maxW - $w1 - $w2);//85; |
|
1106 | + $x += $w; |
|
1107 | + $w = ($maxW - $w1 - $w2); //85; |
|
1108 | 1108 | $w3 = $w; |
1109 | 1109 | $h = 32; |
1110 | 1110 | $this->pdf->textBox($x, $y, $w, $h); |
@@ -1166,7 +1166,7 @@ discard block |
||
1166 | 1166 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
1167 | 1167 | $w = $w1 + $w2; |
1168 | 1168 | $y = $oldY; |
1169 | - $oldY += $h; |
|
1169 | + $oldY += $h; |
|
1170 | 1170 | $x = $oldX; |
1171 | 1171 | $h = 7; |
1172 | 1172 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, ''); |
@@ -1197,7 +1197,7 @@ discard block |
||
1197 | 1197 | $cStat = ''; |
1198 | 1198 | } else { |
1199 | 1199 | if (isset($this->nfeProc)) { |
1200 | - $texto = ! empty($this->nfeProc->getElementsByTagName("nProt")->item(0)->nodeValue) |
|
1200 | + $texto = !empty($this->nfeProc->getElementsByTagName("nProt")->item(0)->nodeValue) |
|
1201 | 1201 | ? $this->nfeProc->getElementsByTagName("nProt")->item(0)->nodeValue |
1202 | 1202 | : ''; |
1203 | 1203 | $dtHora = $this->toDateTime( |
@@ -1227,7 +1227,7 @@ discard block |
||
1227 | 1227 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
1228 | 1228 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, ''); |
1229 | 1229 | //INSCRIÇÃO MUNICIPAL |
1230 | - $x += $w; |
|
1230 | + $x += $w; |
|
1231 | 1231 | $texto = 'INSCRIÇÃO MUNICIPAL'; |
1232 | 1232 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
1233 | 1233 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, ''); |
@@ -1235,29 +1235,29 @@ discard block |
||
1235 | 1235 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
1236 | 1236 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, ''); |
1237 | 1237 | //INSCRIÇÃO ESTADUAL DO SUBST. TRIBUT. |
1238 | - $x += $w; |
|
1238 | + $x += $w; |
|
1239 | 1239 | $texto = 'INSCRIÇÃO ESTADUAL DO SUBST. TRIBUT.'; |
1240 | 1240 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
1241 | 1241 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, ''); |
1242 | - $texto = ! empty($this->emit->getElementsByTagName("IEST")->item(0)->nodeValue) |
|
1242 | + $texto = !empty($this->emit->getElementsByTagName("IEST")->item(0)->nodeValue) |
|
1243 | 1243 | ? $this->emit->getElementsByTagName("IEST")->item(0)->nodeValue |
1244 | 1244 | : ''; |
1245 | 1245 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
1246 | 1246 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, ''); |
1247 | 1247 | //CNPJ |
1248 | - $x += $w; |
|
1248 | + $x += $w; |
|
1249 | 1249 | $w = ($maxW - (3 * $w)); |
1250 | 1250 | $texto = 'CNPJ / CPF'; |
1251 | 1251 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
1252 | 1252 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, ''); |
1253 | 1253 | //Pegando valor do CPF/CNPJ |
1254 | - if (! empty($this->emit->getElementsByTagName("CNPJ")->item(0)->nodeValue)) { |
|
1254 | + if (!empty($this->emit->getElementsByTagName("CNPJ")->item(0)->nodeValue)) { |
|
1255 | 1255 | $texto = $this->formatField( |
1256 | 1256 | $this->emit->getElementsByTagName("CNPJ")->item(0)->nodeValue, |
1257 | 1257 | "###.###.###/####-##" |
1258 | 1258 | ); |
1259 | 1259 | } else { |
1260 | - $texto = ! empty($this->emit->getElementsByTagName("CPF")->item(0)->nodeValue) |
|
1260 | + $texto = !empty($this->emit->getElementsByTagName("CPF")->item(0)->nodeValue) |
|
1261 | 1261 | ? $this->formatField( |
1262 | 1262 | $this->emit->getElementsByTagName("CPF")->item(0)->nodeValue, |
1263 | 1263 | "###.###.###-##" |
@@ -1276,7 +1276,7 @@ discard block |
||
1276 | 1276 | $n = count($resp['message']); |
1277 | 1277 | $alttot = $n * 15; |
1278 | 1278 | $x = 10; |
1279 | - $y = $this->hPrint/2 - $alttot/2; |
|
1279 | + $y = $this->hPrint / 2 - $alttot / 2; |
|
1280 | 1280 | $h = 15; |
1281 | 1281 | $w = $maxW - (2 * $x); |
1282 | 1282 | $this->pdf->settextcolor(170, 170, 170); |
@@ -1349,7 +1349,7 @@ discard block |
||
1349 | 1349 | //NOME / RAZÃO SOCIAL |
1350 | 1350 | $w = round($maxW * 0.61, 0); |
1351 | 1351 | $w1 = $w; |
1352 | - $y += 3; |
|
1352 | + $y += 3; |
|
1353 | 1353 | $texto = 'NOME / RAZÃO SOCIAL'; |
1354 | 1354 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
1355 | 1355 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, ''); |
@@ -1361,20 +1361,20 @@ discard block |
||
1361 | 1361 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'L', 1, ''); |
1362 | 1362 | } |
1363 | 1363 | //CNPJ / CPF |
1364 | - $x += $w; |
|
1364 | + $x += $w; |
|
1365 | 1365 | $w = round($maxW * 0.23, 0); |
1366 | 1366 | $w2 = $w; |
1367 | 1367 | $texto = 'CNPJ / CPF'; |
1368 | 1368 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
1369 | 1369 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, ''); |
1370 | 1370 | //Pegando valor do CPF/CNPJ |
1371 | - if (! empty($this->dest->getElementsByTagName("CNPJ")->item(0)->nodeValue)) { |
|
1371 | + if (!empty($this->dest->getElementsByTagName("CNPJ")->item(0)->nodeValue)) { |
|
1372 | 1372 | $texto = $this->formatField( |
1373 | 1373 | $this->dest->getElementsByTagName("CNPJ")->item(0)->nodeValue, |
1374 | 1374 | "###.###.###/####-##" |
1375 | 1375 | ); |
1376 | 1376 | } else { |
1377 | - $texto = ! empty($this->dest->getElementsByTagName("CPF")->item(0)->nodeValue) |
|
1377 | + $texto = !empty($this->dest->getElementsByTagName("CPF")->item(0)->nodeValue) |
|
1378 | 1378 | ? $this->formatField( |
1379 | 1379 | $this->dest->getElementsByTagName("CPF")->item(0)->nodeValue, |
1380 | 1380 | "###.###.###-##" |
@@ -1384,17 +1384,17 @@ discard block |
||
1384 | 1384 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
1385 | 1385 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, ''); |
1386 | 1386 | //DATA DA EMISSÃO |
1387 | - $x += $w; |
|
1387 | + $x += $w; |
|
1388 | 1388 | $w = $maxW - ($w1 + $w2); |
1389 | 1389 | $wx = $w; |
1390 | 1390 | $texto = 'DATA DA EMISSÃO'; |
1391 | 1391 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
1392 | 1392 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, ''); |
1393 | - $dEmi = ! empty($this->ide->getElementsByTagName("dEmi")->item(0)->nodeValue) |
|
1393 | + $dEmi = !empty($this->ide->getElementsByTagName("dEmi")->item(0)->nodeValue) |
|
1394 | 1394 | ? $this->ide->getElementsByTagName("dEmi")->item(0)->nodeValue |
1395 | 1395 | : ''; |
1396 | 1396 | if ($dEmi == '') { |
1397 | - $dEmi = ! empty($this->ide->getElementsByTagName("dhEmi")->item(0)->nodeValue) |
|
1397 | + $dEmi = !empty($this->ide->getElementsByTagName("dhEmi")->item(0)->nodeValue) |
|
1398 | 1398 | ? $this->ide->getElementsByTagName("dhEmi")->item(0)->nodeValue |
1399 | 1399 | : ''; |
1400 | 1400 | $aDemi = explode('T', $dEmi); |
@@ -1410,7 +1410,7 @@ discard block |
||
1410 | 1410 | //ENDEREÇO |
1411 | 1411 | $w = round($maxW * 0.47, 0); |
1412 | 1412 | $w1 = $w; |
1413 | - $y += $h; |
|
1413 | + $y += $h; |
|
1414 | 1414 | $x = $oldX; |
1415 | 1415 | $texto = 'ENDEREÇO'; |
1416 | 1416 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
@@ -1422,7 +1422,7 @@ discard block |
||
1422 | 1422 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
1423 | 1423 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'L', 0, '', true); |
1424 | 1424 | //BAIRRO / DISTRITO |
1425 | - $x += $w; |
|
1425 | + $x += $w; |
|
1426 | 1426 | $w = round($maxW * 0.21, 0); |
1427 | 1427 | $w2 = $w; |
1428 | 1428 | $texto = 'BAIRRO / DISTRITO'; |
@@ -1432,29 +1432,29 @@ discard block |
||
1432 | 1432 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
1433 | 1433 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, ''); |
1434 | 1434 | //CEP |
1435 | - $x += $w; |
|
1435 | + $x += $w; |
|
1436 | 1436 | $w = $maxW - $w1 - $w2 - $wx; |
1437 | 1437 | $w2 = $w; |
1438 | 1438 | $texto = 'CEP'; |
1439 | 1439 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
1440 | 1440 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, ''); |
1441 | - $texto = ! empty($this->dest->getElementsByTagName("CEP")->item(0)->nodeValue) |
|
1441 | + $texto = !empty($this->dest->getElementsByTagName("CEP")->item(0)->nodeValue) |
|
1442 | 1442 | ? $this->dest->getElementsByTagName("CEP")->item(0)->nodeValue |
1443 | 1443 | : ''; |
1444 | 1444 | $texto = $this->formatField($texto, "#####-###"); |
1445 | 1445 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
1446 | 1446 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, ''); |
1447 | 1447 | //DATA DA SAÍDA |
1448 | - $x += $w; |
|
1448 | + $x += $w; |
|
1449 | 1449 | $w = $wx; |
1450 | 1450 | $texto = 'DATA DA SAÍDA/ENTRADA'; |
1451 | 1451 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
1452 | 1452 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, ''); |
1453 | - $dSaiEnt = ! empty($this->ide->getElementsByTagName("dSaiEnt")->item(0)->nodeValue) |
|
1453 | + $dSaiEnt = !empty($this->ide->getElementsByTagName("dSaiEnt")->item(0)->nodeValue) |
|
1454 | 1454 | ? $this->ide->getElementsByTagName("dSaiEnt")->item(0)->nodeValue |
1455 | 1455 | : ''; |
1456 | 1456 | if ($dSaiEnt == '') { |
1457 | - $dSaiEnt = ! empty($this->ide->getElementsByTagName("dhSaiEnt")->item(0)->nodeValue) |
|
1457 | + $dSaiEnt = !empty($this->ide->getElementsByTagName("dhSaiEnt")->item(0)->nodeValue) |
|
1458 | 1458 | ? $this->ide->getElementsByTagName("dhSaiEnt")->item(0)->nodeValue |
1459 | 1459 | : ''; |
1460 | 1460 | $aDsaient = explode('T', $dSaiEnt); |
@@ -1465,7 +1465,7 @@ discard block |
||
1465 | 1465 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, ''); |
1466 | 1466 | //MUNICÍPIO |
1467 | 1467 | $w = $w1; |
1468 | - $y += $h; |
|
1468 | + $y += $h; |
|
1469 | 1469 | $x = $oldX; |
1470 | 1470 | $texto = 'MUNICÍPIO'; |
1471 | 1471 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
@@ -1479,7 +1479,7 @@ discard block |
||
1479 | 1479 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
1480 | 1480 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'L', 0, ''); |
1481 | 1481 | //UF |
1482 | - $x += $w; |
|
1482 | + $x += $w; |
|
1483 | 1483 | $w = 8; |
1484 | 1484 | $texto = 'UF'; |
1485 | 1485 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
@@ -1488,19 +1488,19 @@ discard block |
||
1488 | 1488 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
1489 | 1489 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, ''); |
1490 | 1490 | //FONE / FAX |
1491 | - $x += $w; |
|
1491 | + $x += $w; |
|
1492 | 1492 | $w = round(($maxW - $w1 - $wx - 8) / 2, 0); |
1493 | 1493 | $w3 = $w; |
1494 | 1494 | $texto = 'FONE / FAX'; |
1495 | 1495 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
1496 | 1496 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, ''); |
1497 | - $texto = ! empty($this->dest->getElementsByTagName("fone")->item(0)->nodeValue) |
|
1497 | + $texto = !empty($this->dest->getElementsByTagName("fone")->item(0)->nodeValue) |
|
1498 | 1498 | ? $this->dest->getElementsByTagName("fone")->item(0)->nodeValue |
1499 | 1499 | : ''; |
1500 | 1500 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
1501 | 1501 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, ''); |
1502 | 1502 | //INSCRIÇÃO ESTADUAL |
1503 | - $x += $w; |
|
1503 | + $x += $w; |
|
1504 | 1504 | $w = $maxW - $w1 - $wx - 8 - $w3; |
1505 | 1505 | $texto = 'INSCRIÇÃO ESTADUAL'; |
1506 | 1506 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
@@ -1510,16 +1510,16 @@ discard block |
||
1510 | 1510 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
1511 | 1511 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, ''); |
1512 | 1512 | //HORA DA SAÍDA |
1513 | - $x += $w; |
|
1513 | + $x += $w; |
|
1514 | 1514 | $w = $wx; |
1515 | 1515 | $texto = 'HORA DA SAÍDA/ENTRADA'; |
1516 | 1516 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
1517 | 1517 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, ''); |
1518 | - $hSaiEnt = ! empty($this->ide->getElementsByTagName("hSaiEnt")->item(0)->nodeValue) |
|
1518 | + $hSaiEnt = !empty($this->ide->getElementsByTagName("hSaiEnt")->item(0)->nodeValue) |
|
1519 | 1519 | ? $this->ide->getElementsByTagName("hSaiEnt")->item(0)->nodeValue |
1520 | 1520 | : ''; |
1521 | 1521 | if ($hSaiEnt == '') { |
1522 | - $dhSaiEnt = ! empty($this->ide->getElementsByTagName("dhSaiEnt")->item(0)->nodeValue) |
|
1522 | + $dhSaiEnt = !empty($this->ide->getElementsByTagName("dhSaiEnt")->item(0)->nodeValue) |
|
1523 | 1523 | ? $this->ide->getElementsByTagName("dhSaiEnt")->item(0)->nodeValue |
1524 | 1524 | : ''; |
1525 | 1525 | $tsDhSaiEnt = $this->toDateTime($dhSaiEnt); |
@@ -1563,7 +1563,7 @@ discard block |
||
1563 | 1563 | //NOME / RAZÃO SOCIAL |
1564 | 1564 | $w = round($maxW * 0.61, 0); |
1565 | 1565 | $w1 = $w; |
1566 | - $y += 3; |
|
1566 | + $y += 3; |
|
1567 | 1567 | $texto = 'NOME / RAZÃO SOCIAL'; |
1568 | 1568 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
1569 | 1569 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, ''); |
@@ -1578,20 +1578,20 @@ discard block |
||
1578 | 1578 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'L', 1, ''); |
1579 | 1579 | } |
1580 | 1580 | //CNPJ / CPF |
1581 | - $x += $w; |
|
1581 | + $x += $w; |
|
1582 | 1582 | $w = round($maxW * 0.23, 0); |
1583 | 1583 | $w2 = $w; |
1584 | 1584 | $texto = 'CNPJ / CPF'; |
1585 | 1585 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
1586 | 1586 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, ''); |
1587 | 1587 | //Pegando valor do CPF/CNPJ |
1588 | - if (! empty($this->entrega->getElementsByTagName("CNPJ")->item(0)->nodeValue)) { |
|
1588 | + if (!empty($this->entrega->getElementsByTagName("CNPJ")->item(0)->nodeValue)) { |
|
1589 | 1589 | $texto = $this->formatField( |
1590 | 1590 | $this->entrega->getElementsByTagName("CNPJ")->item(0)->nodeValue, |
1591 | 1591 | "###.###.###/####-##" |
1592 | 1592 | ); |
1593 | 1593 | } else { |
1594 | - $texto = ! empty($this->entrega->getElementsByTagName("CPF")->item(0)->nodeValue) ? |
|
1594 | + $texto = !empty($this->entrega->getElementsByTagName("CPF")->item(0)->nodeValue) ? |
|
1595 | 1595 | $this->formatField( |
1596 | 1596 | $this->entrega->getElementsByTagName("CPF")->item(0)->nodeValue, |
1597 | 1597 | "###.###.###-##" |
@@ -1600,7 +1600,7 @@ discard block |
||
1600 | 1600 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
1601 | 1601 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, ''); |
1602 | 1602 | //INSCRIÇÃO ESTADUAL |
1603 | - $x += $w; |
|
1603 | + $x += $w; |
|
1604 | 1604 | $w = $maxW - ($w1 + $w2); |
1605 | 1605 | $wx = $w; |
1606 | 1606 | $texto = 'INSCRIÇÃO ESTADUAL'; |
@@ -1619,7 +1619,7 @@ discard block |
||
1619 | 1619 | //ENDEREÇO |
1620 | 1620 | $w = round($maxW * 0.355, 0) + $wx; |
1621 | 1621 | $w1 = $w; |
1622 | - $y += $h; |
|
1622 | + $y += $h; |
|
1623 | 1623 | $x = $oldX; |
1624 | 1624 | $texto = 'ENDEREÇO'; |
1625 | 1625 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
@@ -1630,7 +1630,7 @@ discard block |
||
1630 | 1630 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
1631 | 1631 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'L', 0, '', true); |
1632 | 1632 | //BAIRRO / DISTRITO |
1633 | - $x += $w; |
|
1633 | + $x += $w; |
|
1634 | 1634 | $w = round($maxW * 0.335, 0); |
1635 | 1635 | $w2 = $w; |
1636 | 1636 | $texto = 'BAIRRO / DISTRITO'; |
@@ -1640,12 +1640,12 @@ discard block |
||
1640 | 1640 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
1641 | 1641 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, ''); |
1642 | 1642 | //CEP |
1643 | - $x += $w; |
|
1643 | + $x += $w; |
|
1644 | 1644 | $w = $maxW - ($w1 + $w2); |
1645 | 1645 | $texto = 'CEP'; |
1646 | 1646 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
1647 | 1647 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, ''); |
1648 | - $texto = ! empty($this->entrega->getElementsByTagName("CEP")->item(0)->nodeValue) ? |
|
1648 | + $texto = !empty($this->entrega->getElementsByTagName("CEP")->item(0)->nodeValue) ? |
|
1649 | 1649 | $this->entrega->getElementsByTagName("CEP")->item(0)->nodeValue : ''; |
1650 | 1650 | $texto = $this->formatField($texto, "#####-###"); |
1651 | 1651 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
@@ -1653,7 +1653,7 @@ discard block |
||
1653 | 1653 | //MUNICÍPIO |
1654 | 1654 | $w = round($maxW * 0.805, 0); |
1655 | 1655 | $w1 = $w; |
1656 | - $y += $h; |
|
1656 | + $y += $h; |
|
1657 | 1657 | $x = $oldX; |
1658 | 1658 | $texto = 'MUNICÍPIO'; |
1659 | 1659 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
@@ -1665,7 +1665,7 @@ discard block |
||
1665 | 1665 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
1666 | 1666 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'L', 0, ''); |
1667 | 1667 | //UF |
1668 | - $x += $w; |
|
1668 | + $x += $w; |
|
1669 | 1669 | $w = 8; |
1670 | 1670 | $texto = 'UF'; |
1671 | 1671 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
@@ -1674,12 +1674,12 @@ discard block |
||
1674 | 1674 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
1675 | 1675 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, ''); |
1676 | 1676 | //FONE / FAX |
1677 | - $x += $w; |
|
1677 | + $x += $w; |
|
1678 | 1678 | $w = $maxW - $w - $w1; |
1679 | 1679 | $texto = 'FONE / FAX'; |
1680 | 1680 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
1681 | 1681 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, ''); |
1682 | - $texto = ! empty($this->entrega->getElementsByTagName("fone")->item(0)->nodeValue) ? |
|
1682 | + $texto = !empty($this->entrega->getElementsByTagName("fone")->item(0)->nodeValue) ? |
|
1683 | 1683 | $this->entrega->getElementsByTagName("fone")->item(0)->nodeValue : ''; |
1684 | 1684 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
1685 | 1685 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, ''); |
@@ -1716,7 +1716,7 @@ discard block |
||
1716 | 1716 | //NOME / RAZÃO SOCIAL |
1717 | 1717 | $w = round($maxW * 0.61, 0); |
1718 | 1718 | $w1 = $w; |
1719 | - $y += 3; |
|
1719 | + $y += 3; |
|
1720 | 1720 | $texto = 'NOME / RAZÃO SOCIAL'; |
1721 | 1721 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
1722 | 1722 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, ''); |
@@ -1731,20 +1731,20 @@ discard block |
||
1731 | 1731 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'L', 1, ''); |
1732 | 1732 | } |
1733 | 1733 | //CNPJ / CPF |
1734 | - $x += $w; |
|
1734 | + $x += $w; |
|
1735 | 1735 | $w = round($maxW * 0.23, 0); |
1736 | 1736 | $w2 = $w; |
1737 | 1737 | $texto = 'CNPJ / CPF'; |
1738 | 1738 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
1739 | 1739 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, ''); |
1740 | 1740 | //Pegando valor do CPF/CNPJ |
1741 | - if (! empty($this->retirada->getElementsByTagName("CNPJ")->item(0)->nodeValue)) { |
|
1741 | + if (!empty($this->retirada->getElementsByTagName("CNPJ")->item(0)->nodeValue)) { |
|
1742 | 1742 | $texto = $this->formatField( |
1743 | 1743 | $this->retirada->getElementsByTagName("CNPJ")->item(0)->nodeValue, |
1744 | 1744 | "###.###.###/####-##" |
1745 | 1745 | ); |
1746 | 1746 | } else { |
1747 | - $texto = ! empty($this->retirada->getElementsByTagName("CPF")->item(0)->nodeValue) ? |
|
1747 | + $texto = !empty($this->retirada->getElementsByTagName("CPF")->item(0)->nodeValue) ? |
|
1748 | 1748 | $this->formatField( |
1749 | 1749 | $this->retirada->getElementsByTagName("CPF")->item(0)->nodeValue, |
1750 | 1750 | "###.###.###-##" |
@@ -1753,7 +1753,7 @@ discard block |
||
1753 | 1753 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
1754 | 1754 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, ''); |
1755 | 1755 | //INSCRIÇÃO ESTADUAL |
1756 | - $x += $w; |
|
1756 | + $x += $w; |
|
1757 | 1757 | $w = $maxW - ($w1 + $w2); |
1758 | 1758 | $wx = $w; |
1759 | 1759 | $texto = 'INSCRIÇÃO ESTADUAL'; |
@@ -1772,7 +1772,7 @@ discard block |
||
1772 | 1772 | //ENDEREÇO |
1773 | 1773 | $w = round($maxW * 0.355, 0) + $wx; |
1774 | 1774 | $w1 = $w; |
1775 | - $y += $h; |
|
1775 | + $y += $h; |
|
1776 | 1776 | $x = $oldX; |
1777 | 1777 | $texto = 'ENDEREÇO'; |
1778 | 1778 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
@@ -1783,7 +1783,7 @@ discard block |
||
1783 | 1783 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
1784 | 1784 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'L', 0, '', true); |
1785 | 1785 | //BAIRRO / DISTRITO |
1786 | - $x += $w; |
|
1786 | + $x += $w; |
|
1787 | 1787 | $w = round($maxW * 0.335, 0); |
1788 | 1788 | $w2 = $w; |
1789 | 1789 | $texto = 'BAIRRO / DISTRITO'; |
@@ -1793,12 +1793,12 @@ discard block |
||
1793 | 1793 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
1794 | 1794 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, ''); |
1795 | 1795 | //CEP |
1796 | - $x += $w; |
|
1796 | + $x += $w; |
|
1797 | 1797 | $w = $maxW - ($w1 + $w2); |
1798 | 1798 | $texto = 'CEP'; |
1799 | 1799 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
1800 | 1800 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, ''); |
1801 | - $texto = ! empty($this->retirada->getElementsByTagName("CEP")->item(0)->nodeValue) ? |
|
1801 | + $texto = !empty($this->retirada->getElementsByTagName("CEP")->item(0)->nodeValue) ? |
|
1802 | 1802 | $this->retirada->getElementsByTagName("CEP")->item(0)->nodeValue : ''; |
1803 | 1803 | $texto = $this->formatField($texto, "#####-###"); |
1804 | 1804 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
@@ -1806,7 +1806,7 @@ discard block |
||
1806 | 1806 | //MUNICÍPIO |
1807 | 1807 | $w = round($maxW * 0.805, 0); |
1808 | 1808 | $w1 = $w; |
1809 | - $y += $h; |
|
1809 | + $y += $h; |
|
1810 | 1810 | $x = $oldX; |
1811 | 1811 | $texto = 'MUNICÍPIO'; |
1812 | 1812 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
@@ -1818,7 +1818,7 @@ discard block |
||
1818 | 1818 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
1819 | 1819 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'L', 0, ''); |
1820 | 1820 | //UF |
1821 | - $x += $w; |
|
1821 | + $x += $w; |
|
1822 | 1822 | $w = 8; |
1823 | 1823 | $texto = 'UF'; |
1824 | 1824 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
@@ -1827,12 +1827,12 @@ discard block |
||
1827 | 1827 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
1828 | 1828 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, ''); |
1829 | 1829 | //FONE / FAX |
1830 | - $x += $w; |
|
1830 | + $x += $w; |
|
1831 | 1831 | $w = $maxW - $w - $w1; |
1832 | 1832 | $texto = 'FONE / FAX'; |
1833 | 1833 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
1834 | 1834 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, ''); |
1835 | - $texto = ! empty($this->retirada->getElementsByTagName("fone")->item(0)->nodeValue) ? |
|
1835 | + $texto = !empty($this->retirada->getElementsByTagName("fone")->item(0)->nodeValue) ? |
|
1836 | 1836 | $this->retirada->getElementsByTagName("fone")->item(0)->nodeValue : ''; |
1837 | 1837 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
1838 | 1838 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, ''); |
@@ -1852,7 +1852,7 @@ discard block |
||
1852 | 1852 | if (isset($this->cobr)) { |
1853 | 1853 | $fat = $this->cobr->getElementsByTagName("fat")->item(0); |
1854 | 1854 | if (isset($fat)) { |
1855 | - if (! empty($this->getTagValue($this->ide, "indPag"))) { |
|
1855 | + if (!empty($this->getTagValue($this->ide, "indPag"))) { |
|
1856 | 1856 | $textoIndPag = ""; |
1857 | 1857 | $indPag = $this->getTagValue($this->ide, "indPag"); |
1858 | 1858 | if ($indPag === "0") { |
@@ -1926,7 +1926,7 @@ discard block |
||
1926 | 1926 | $h = 8; |
1927 | 1927 | $aFont = ['font' => $this->fontePadrao, 'size' => 7, 'style' => 'B']; |
1928 | 1928 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, ''); |
1929 | - $y += 3; |
|
1929 | + $y += 3; |
|
1930 | 1930 | $dups = ""; |
1931 | 1931 | $dupcont = 0; |
1932 | 1932 | $nFat = $this->dup->length; |
@@ -1960,13 +1960,13 @@ discard block |
||
1960 | 1960 | } |
1961 | 1961 | $increm = 1; |
1962 | 1962 | foreach ($this->dup as $k => $d) { |
1963 | - $nDup = ! empty($this->dup->item($k)->getElementsByTagName('nDup')->item(0)->nodeValue) |
|
1963 | + $nDup = !empty($this->dup->item($k)->getElementsByTagName('nDup')->item(0)->nodeValue) |
|
1964 | 1964 | ? $this->dup->item($k)->getElementsByTagName('nDup')->item(0)->nodeValue |
1965 | 1965 | : ''; |
1966 | - $dDup = ! empty($this->dup->item($k)->getElementsByTagName('dVenc')->item(0)->nodeValue) |
|
1966 | + $dDup = !empty($this->dup->item($k)->getElementsByTagName('dVenc')->item(0)->nodeValue) |
|
1967 | 1967 | ? $this->ymdTodmy($this->dup->item($k)->getElementsByTagName('dVenc')->item(0)->nodeValue) |
1968 | 1968 | : ''; |
1969 | - $vDup = ! empty($this->dup->item($k)->getElementsByTagName('vDup')->item(0)->nodeValue) |
|
1969 | + $vDup = !empty($this->dup->item($k)->getElementsByTagName('vDup')->item(0)->nodeValue) |
|
1970 | 1970 | ? 'R$ ' . number_format( |
1971 | 1971 | $this->dup->item($k)->getElementsByTagName('vDup')->item(0)->nodeValue, |
1972 | 1972 | 2, |
@@ -2013,7 +2013,7 @@ discard block |
||
2013 | 2013 | } |
2014 | 2014 | if ($dupcont == 0) { |
2015 | 2015 | $y -= 9; |
2016 | - $linha --; |
|
2016 | + $linha--; |
|
2017 | 2017 | } |
2018 | 2018 | |
2019 | 2019 | return ($y + $h); |
@@ -2053,7 +2053,7 @@ discard block |
||
2053 | 2053 | $h = 8; |
2054 | 2054 | $aFont = ['font' => $this->fontePadrao, 'size' => 7, 'style' => 'B']; |
2055 | 2055 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, ''); |
2056 | - $y += 3; |
|
2056 | + $y += 3; |
|
2057 | 2057 | $dups = ""; |
2058 | 2058 | $dupcont = 0; |
2059 | 2059 | if ($this->orientacao == 'P') { |
@@ -2086,7 +2086,7 @@ discard block |
||
2086 | 2086 | '90' => 'Sem pagamento', |
2087 | 2087 | '99' => 'Outros' |
2088 | 2088 | ]; |
2089 | - $bandeira = [ |
|
2089 | + $bandeira = [ |
|
2090 | 2090 | '01' => 'Visa', |
2091 | 2091 | '02' => 'Mastercard', |
2092 | 2092 | '03' => 'American', |
@@ -2099,10 +2099,10 @@ discard block |
||
2099 | 2099 | '99' => 'Outros' |
2100 | 2100 | ]; |
2101 | 2101 | foreach ($this->detPag as $k => $d) { |
2102 | - $fPag = ! empty($this->detPag->item($k)->getElementsByTagName('tPag')->item(0)->nodeValue) |
|
2102 | + $fPag = !empty($this->detPag->item($k)->getElementsByTagName('tPag')->item(0)->nodeValue) |
|
2103 | 2103 | ? $this->detPag->item($k)->getElementsByTagName('tPag')->item(0)->nodeValue |
2104 | 2104 | : '0'; |
2105 | - $vPag = ! empty($this->detPag->item($k)->getElementsByTagName('vPag')->item(0)->nodeValue) |
|
2105 | + $vPag = !empty($this->detPag->item($k)->getElementsByTagName('vPag')->item(0)->nodeValue) |
|
2106 | 2106 | ? 'R$ ' . number_format( |
2107 | 2107 | $this->detPag->item($k)->getElementsByTagName('vPag')->item(0)->nodeValue, |
2108 | 2108 | 2, |
@@ -2145,7 +2145,7 @@ discard block |
||
2145 | 2145 | } |
2146 | 2146 | if ($dupcont == 0) { |
2147 | 2147 | $y -= 9; |
2148 | - $linha --; |
|
2148 | + $linha--; |
|
2149 | 2149 | } |
2150 | 2150 | |
2151 | 2151 | return ($y + $h); |
@@ -2177,7 +2177,7 @@ discard block |
||
2177 | 2177 | $the_field = $this->ICMSTot->getElementsByTagName($campoImposto)->item(0); |
2178 | 2178 | if (isset($the_field)) { |
2179 | 2179 | $the_value = $the_field->nodeValue; |
2180 | - if (! empty($the_value)) { |
|
2180 | + if (!empty($the_value)) { |
|
2181 | 2181 | $valorImposto = number_format($the_value, 2, ",", "."); |
2182 | 2182 | } |
2183 | 2183 | } |
@@ -2206,10 +2206,10 @@ discard block |
||
2206 | 2206 | $x_inicial = $x; |
2207 | 2207 | //##################################################################### |
2208 | 2208 | $campos_por_linha = 9; |
2209 | - if (! $this->exibirPIS) { |
|
2210 | - $campos_por_linha --; |
|
2209 | + if (!$this->exibirPIS) { |
|
2210 | + $campos_por_linha--; |
|
2211 | 2211 | } |
2212 | - if (! $this->exibirIcmsInterestadual) { |
|
2212 | + if (!$this->exibirIcmsInterestadual) { |
|
2213 | 2213 | $campos_por_linha -= 2; |
2214 | 2214 | } |
2215 | 2215 | |
@@ -2296,12 +2296,12 @@ discard block |
||
2296 | 2296 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, ''); |
2297 | 2297 | //NOME / RAZÃO SOCIAL |
2298 | 2298 | $w1 = $maxW * 0.29; |
2299 | - $y += 3; |
|
2299 | + $y += 3; |
|
2300 | 2300 | $texto = 'NOME / RAZÃO SOCIAL'; |
2301 | 2301 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
2302 | 2302 | $this->pdf->textBox($x, $y, $w1, $h, $texto, $aFont, 'T', 'L', 1, ''); |
2303 | 2303 | if (isset($this->transporta)) { |
2304 | - $texto = ! empty($this->transporta->getElementsByTagName("xNome")->item(0)->nodeValue) |
|
2304 | + $texto = !empty($this->transporta->getElementsByTagName("xNome")->item(0)->nodeValue) |
|
2305 | 2305 | ? $this->transporta->getElementsByTagName("xNome")->item(0)->nodeValue |
2306 | 2306 | : ''; |
2307 | 2307 | } else { |
@@ -2310,12 +2310,12 @@ discard block |
||
2310 | 2310 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
2311 | 2311 | $this->pdf->textBox($x, $y, $w1, $h, $texto, $aFont, 'B', 'L', 0, ''); |
2312 | 2312 | //FRETE POR CONTA |
2313 | - $x += $w1; |
|
2313 | + $x += $w1; |
|
2314 | 2314 | $w2 = $maxW * 0.15; |
2315 | 2315 | $texto = 'FRETE'; |
2316 | 2316 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
2317 | 2317 | $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'T', 'L', 1, ''); |
2318 | - $tipoFrete = ! empty($this->transp->getElementsByTagName("modFrete")->item(0)->nodeValue) |
|
2318 | + $tipoFrete = !empty($this->transp->getElementsByTagName("modFrete")->item(0)->nodeValue) |
|
2319 | 2319 | ? $this->transp->getElementsByTagName("modFrete")->item(0)->nodeValue |
2320 | 2320 | : '0'; |
2321 | 2321 | switch ($tipoFrete) { |
@@ -2341,12 +2341,12 @@ discard block |
||
2341 | 2341 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
2342 | 2342 | $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'C', 'C', 1, ''); |
2343 | 2343 | //CÓDIGO ANTT |
2344 | - $x += $w2; |
|
2344 | + $x += $w2; |
|
2345 | 2345 | $texto = 'CÓDIGO ANTT'; |
2346 | 2346 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
2347 | 2347 | $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'T', 'L', 1, ''); |
2348 | 2348 | if (isset($this->veicTransp)) { |
2349 | - $texto = ! empty($this->veicTransp->getElementsByTagName("RNTC")->item(0)->nodeValue) |
|
2349 | + $texto = !empty($this->veicTransp->getElementsByTagName("RNTC")->item(0)->nodeValue) |
|
2350 | 2350 | ? $this->veicTransp->getElementsByTagName("RNTC")->item(0)->nodeValue |
2351 | 2351 | : ''; |
2352 | 2352 | } else { |
@@ -2355,16 +2355,16 @@ discard block |
||
2355 | 2355 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
2356 | 2356 | $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'B', 'C', 0, ''); |
2357 | 2357 | //PLACA DO VEÍC |
2358 | - $x += $w2; |
|
2358 | + $x += $w2; |
|
2359 | 2359 | $texto = 'PLACA DO VEÍCULO'; |
2360 | 2360 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
2361 | 2361 | $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'T', 'L', 1, ''); |
2362 | 2362 | if (isset($this->veicTransp)) { |
2363 | - $texto = ! empty($this->veicTransp->getElementsByTagName("placa")->item(0)->nodeValue) |
|
2363 | + $texto = !empty($this->veicTransp->getElementsByTagName("placa")->item(0)->nodeValue) |
|
2364 | 2364 | ? $this->veicTransp->getElementsByTagName("placa")->item(0)->nodeValue |
2365 | 2365 | : ''; |
2366 | 2366 | } elseif (isset($this->reboque)) { |
2367 | - $texto = ! empty($this->reboque->getElementsByTagName("placa")->item(0)->nodeValue) |
|
2367 | + $texto = !empty($this->reboque->getElementsByTagName("placa")->item(0)->nodeValue) |
|
2368 | 2368 | ? $this->reboque->getElementsByTagName("placa")->item(0)->nodeValue |
2369 | 2369 | : ''; |
2370 | 2370 | } else { |
@@ -2373,17 +2373,17 @@ discard block |
||
2373 | 2373 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
2374 | 2374 | $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'B', 'C', 0, ''); |
2375 | 2375 | //UF |
2376 | - $x += $w2; |
|
2376 | + $x += $w2; |
|
2377 | 2377 | $w3 = round($maxW * 0.04, 0); |
2378 | 2378 | $texto = 'UF'; |
2379 | 2379 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
2380 | 2380 | $this->pdf->textBox($x, $y, $w3, $h, $texto, $aFont, 'T', 'L', 1, ''); |
2381 | 2381 | if (isset($this->veicTransp)) { |
2382 | - $texto = ! empty($this->veicTransp->getElementsByTagName("UF")->item(0)->nodeValue) |
|
2382 | + $texto = !empty($this->veicTransp->getElementsByTagName("UF")->item(0)->nodeValue) |
|
2383 | 2383 | ? $this->veicTransp->getElementsByTagName("UF")->item(0)->nodeValue |
2384 | 2384 | : ''; |
2385 | 2385 | } elseif (isset($this->reboque)) { |
2386 | - $texto = ! empty($this->reboque->getElementsByTagName("UF")->item(0)->nodeValue) |
|
2386 | + $texto = !empty($this->reboque->getElementsByTagName("UF")->item(0)->nodeValue) |
|
2387 | 2387 | ? $this->reboque->getElementsByTagName("UF")->item(0)->nodeValue |
2388 | 2388 | : ''; |
2389 | 2389 | } else { |
@@ -2392,20 +2392,20 @@ discard block |
||
2392 | 2392 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
2393 | 2393 | $this->pdf->textBox($x, $y, $w3, $h, $texto, $aFont, 'B', 'C', 0, ''); |
2394 | 2394 | //CNPJ / CPF |
2395 | - $x += $w3; |
|
2395 | + $x += $w3; |
|
2396 | 2396 | $w = $maxW - ($w1 + 3 * $w2 + $w3); |
2397 | 2397 | $texto = 'CNPJ / CPF'; |
2398 | 2398 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
2399 | 2399 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, ''); |
2400 | 2400 | if (isset($this->transporta)) { |
2401 | - $texto = ! empty($this->transporta->getElementsByTagName("CNPJ")->item(0)->nodeValue) |
|
2401 | + $texto = !empty($this->transporta->getElementsByTagName("CNPJ")->item(0)->nodeValue) |
|
2402 | 2402 | ? $this->formatField( |
2403 | 2403 | $this->transporta->getElementsByTagName("CNPJ")->item(0)->nodeValue, |
2404 | 2404 | "##.###.###/####-##" |
2405 | 2405 | ) |
2406 | 2406 | : ''; |
2407 | 2407 | if ($texto == '') { |
2408 | - $texto = ! empty($this->transporta->getElementsByTagName("CPF")->item(0)->nodeValue) |
|
2408 | + $texto = !empty($this->transporta->getElementsByTagName("CPF")->item(0)->nodeValue) |
|
2409 | 2409 | ? $this->formatField( |
2410 | 2410 | $this->transporta->getElementsByTagName("CPF")->item(0)->nodeValue, |
2411 | 2411 | "###.###.###-##" |
@@ -2419,7 +2419,7 @@ discard block |
||
2419 | 2419 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, ''); |
2420 | 2420 | //##################################################################### |
2421 | 2421 | //ENDEREÇO |
2422 | - $y += $h; |
|
2422 | + $y += $h; |
|
2423 | 2423 | $x = $oldX; |
2424 | 2424 | $h = 7; |
2425 | 2425 | $w1 = $maxW * 0.44; |
@@ -2427,7 +2427,7 @@ discard block |
||
2427 | 2427 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
2428 | 2428 | $this->pdf->textBox($x, $y, $w1, $h, $texto, $aFont, 'T', 'L', 1, ''); |
2429 | 2429 | if (isset($this->transporta)) { |
2430 | - $texto = ! empty($this->transporta->getElementsByTagName("xEnder")->item(0)->nodeValue) |
|
2430 | + $texto = !empty($this->transporta->getElementsByTagName("xEnder")->item(0)->nodeValue) |
|
2431 | 2431 | ? $this->transporta->getElementsByTagName("xEnder")->item(0)->nodeValue |
2432 | 2432 | : ''; |
2433 | 2433 | } else { |
@@ -2436,13 +2436,13 @@ discard block |
||
2436 | 2436 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
2437 | 2437 | $this->pdf->textBox($x, $y, $w1, $h, $texto, $aFont, 'B', 'L', 0, ''); |
2438 | 2438 | //MUNICÍPIO |
2439 | - $x += $w1; |
|
2439 | + $x += $w1; |
|
2440 | 2440 | $w2 = round($maxW * 0.30, 0); |
2441 | 2441 | $texto = 'MUNICÍPIO'; |
2442 | 2442 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
2443 | 2443 | $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'T', 'L', 1, ''); |
2444 | 2444 | if (isset($this->transporta)) { |
2445 | - $texto = ! empty($this->transporta->getElementsByTagName("xMun")->item(0)->nodeValue) |
|
2445 | + $texto = !empty($this->transporta->getElementsByTagName("xMun")->item(0)->nodeValue) |
|
2446 | 2446 | ? $this->transporta->getElementsByTagName("xMun")->item(0)->nodeValue |
2447 | 2447 | : ''; |
2448 | 2448 | } else { |
@@ -2451,13 +2451,13 @@ discard block |
||
2451 | 2451 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
2452 | 2452 | $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'B', 'C', 0, ''); |
2453 | 2453 | //UF |
2454 | - $x += $w2; |
|
2454 | + $x += $w2; |
|
2455 | 2455 | $w3 = round($maxW * 0.04, 0); |
2456 | 2456 | $texto = 'UF'; |
2457 | 2457 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
2458 | 2458 | $this->pdf->textBox($x, $y, $w3, $h, $texto, $aFont, 'T', 'L', 1, ''); |
2459 | 2459 | if (isset($this->transporta)) { |
2460 | - $texto = ! empty($this->transporta->getElementsByTagName("UF")->item(0)->nodeValue) |
|
2460 | + $texto = !empty($this->transporta->getElementsByTagName("UF")->item(0)->nodeValue) |
|
2461 | 2461 | ? $this->transporta->getElementsByTagName("UF")->item(0)->nodeValue |
2462 | 2462 | : ''; |
2463 | 2463 | } else { |
@@ -2466,14 +2466,14 @@ discard block |
||
2466 | 2466 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
2467 | 2467 | $this->pdf->textBox($x, $y, $w3, $h, $texto, $aFont, 'B', 'C', 0, ''); |
2468 | 2468 | //INSCRIÇÃO ESTADUAL |
2469 | - $x += $w3; |
|
2469 | + $x += $w3; |
|
2470 | 2470 | $w = $maxW - ($w1 + $w2 + $w3); |
2471 | 2471 | $texto = 'INSCRIÇÃO ESTADUAL'; |
2472 | 2472 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
2473 | 2473 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, ''); |
2474 | 2474 | $texto = ''; |
2475 | 2475 | if (isset($this->transporta)) { |
2476 | - if (! empty($this->transporta->getElementsByTagName("IE")->item(0)->nodeValue)) { |
|
2476 | + if (!empty($this->transporta->getElementsByTagName("IE")->item(0)->nodeValue)) { |
|
2477 | 2477 | $texto = $this->transporta->getElementsByTagName("IE")->item(0)->nodeValue; |
2478 | 2478 | } |
2479 | 2479 | } |
@@ -2489,13 +2489,13 @@ discard block |
||
2489 | 2489 | $pesoBruto = 0; |
2490 | 2490 | $pesoLiquido = 0; |
2491 | 2491 | foreach ($volumes as $volume) { |
2492 | - $quantidade += ! empty($volume->getElementsByTagName("qVol")->item(0)->nodeValue) ? |
|
2492 | + $quantidade += !empty($volume->getElementsByTagName("qVol")->item(0)->nodeValue) ? |
|
2493 | 2493 | $volume->getElementsByTagName("qVol")->item(0)->nodeValue : 0; |
2494 | - $pesoBruto += ! empty($volume->getElementsByTagName("pesoB")->item(0)->nodeValue) ? |
|
2494 | + $pesoBruto += !empty($volume->getElementsByTagName("pesoB")->item(0)->nodeValue) ? |
|
2495 | 2495 | $volume->getElementsByTagName("pesoB")->item(0)->nodeValue : 0; |
2496 | - $pesoLiquido += ! empty($volume->getElementsByTagName("pesoL")->item(0)->nodeValue) ? |
|
2496 | + $pesoLiquido += !empty($volume->getElementsByTagName("pesoL")->item(0)->nodeValue) ? |
|
2497 | 2497 | $volume->getElementsByTagName("pesoL")->item(0)->nodeValue : 0; |
2498 | - $texto = ! empty($this->transp->getElementsByTagName("esp")->item(0)->nodeValue) ? |
|
2498 | + $texto = !empty($this->transp->getElementsByTagName("esp")->item(0)->nodeValue) ? |
|
2499 | 2499 | $this->transp->getElementsByTagName("esp")->item(0)->nodeValue : ''; |
2500 | 2500 | if ($texto != $especie && $especie != '') { |
2501 | 2501 | //tem várias especies |
@@ -2503,7 +2503,7 @@ discard block |
||
2503 | 2503 | } else { |
2504 | 2504 | $especie = $texto; |
2505 | 2505 | } |
2506 | - $texto = ! empty($this->transp->getElementsByTagName("marca")->item(0)->nodeValue) |
|
2506 | + $texto = !empty($this->transp->getElementsByTagName("marca")->item(0)->nodeValue) |
|
2507 | 2507 | ? $this->transp->getElementsByTagName("marca")->item(0)->nodeValue |
2508 | 2508 | : ''; |
2509 | 2509 | if ($texto != $marca && $marca != '') { |
@@ -2512,7 +2512,7 @@ discard block |
||
2512 | 2512 | } else { |
2513 | 2513 | $marca = $texto; |
2514 | 2514 | } |
2515 | - $texto = ! empty($this->transp->getElementsByTagName("nVol")->item(0)->nodeValue) |
|
2515 | + $texto = !empty($this->transp->getElementsByTagName("nVol")->item(0)->nodeValue) |
|
2516 | 2516 | ? $this->transp->getElementsByTagName("nVol")->item(0)->nodeValue |
2517 | 2517 | : ''; |
2518 | 2518 | if ($texto != $numero && $numero != '') { |
@@ -2525,20 +2525,20 @@ discard block |
||
2525 | 2525 | |
2526 | 2526 | //##################################################################### |
2527 | 2527 | //QUANTIDADE |
2528 | - $y += $h; |
|
2528 | + $y += $h; |
|
2529 | 2529 | $x = $oldX; |
2530 | 2530 | $h = 7; |
2531 | 2531 | $w1 = round($maxW * 0.10, 0); |
2532 | 2532 | $texto = 'QUANTIDADE'; |
2533 | 2533 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
2534 | 2534 | $this->pdf->textBox($x, $y, $w1, $h, $texto, $aFont, 'T', 'L', 1, ''); |
2535 | - if (! empty($quantidade)) { |
|
2535 | + if (!empty($quantidade)) { |
|
2536 | 2536 | $texto = $quantidade; |
2537 | 2537 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
2538 | 2538 | $this->pdf->textBox($x, $y, $w1, $h, $texto, $aFont, 'B', 'C', 0, ''); |
2539 | 2539 | } |
2540 | 2540 | //ESPÉCIE |
2541 | - $x += $w1; |
|
2541 | + $x += $w1; |
|
2542 | 2542 | $w2 = round($maxW * 0.17, 0); |
2543 | 2543 | $texto = 'ESPÉCIE'; |
2544 | 2544 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
@@ -2547,16 +2547,16 @@ discard block |
||
2547 | 2547 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
2548 | 2548 | $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'B', 'C', 0, ''); |
2549 | 2549 | //MARCA |
2550 | - $x += $w2; |
|
2550 | + $x += $w2; |
|
2551 | 2551 | $texto = 'MARCA'; |
2552 | 2552 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
2553 | 2553 | $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'T', 'L', 1, ''); |
2554 | - $texto = ! empty($this->transp->getElementsByTagName("marca")->item(0)->nodeValue) ? |
|
2554 | + $texto = !empty($this->transp->getElementsByTagName("marca")->item(0)->nodeValue) ? |
|
2555 | 2555 | $this->transp->getElementsByTagName("marca")->item(0)->nodeValue : ''; |
2556 | 2556 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
2557 | 2557 | $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'B', 'C', 0, ''); |
2558 | 2558 | //NUMERAÇÃO |
2559 | - $x += $w2; |
|
2559 | + $x += $w2; |
|
2560 | 2560 | $texto = 'NUMERAÇÃO'; |
2561 | 2561 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
2562 | 2562 | $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'T', 'L', 1, ''); |
@@ -2564,7 +2564,7 @@ discard block |
||
2564 | 2564 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
2565 | 2565 | $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'B', 'C', 0, ''); |
2566 | 2566 | //PESO BRUTO |
2567 | - $x += $w2; |
|
2567 | + $x += $w2; |
|
2568 | 2568 | $w3 = round($maxW * 0.20, 0); |
2569 | 2569 | $texto = 'PESO BRUTO'; |
2570 | 2570 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
@@ -2577,7 +2577,7 @@ discard block |
||
2577 | 2577 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
2578 | 2578 | $this->pdf->textBox($x, $y, $w3, $h, $texto, $aFont, 'B', 'R', 0, ''); |
2579 | 2579 | //PESO LÍQUIDO |
2580 | - $x += $w3; |
|
2580 | + $x += $w3; |
|
2581 | 2581 | $w = $maxW - ($w1 + 3 * $w2 + $w3); |
2582 | 2582 | $texto = 'PESO LÍQUIDO'; |
2583 | 2583 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
@@ -2597,11 +2597,11 @@ discard block |
||
2597 | 2597 | protected function descricaoProdutoHelper($origem, $campo, $formato) |
2598 | 2598 | { |
2599 | 2599 | $valor_original = $origem->getElementsByTagName($campo)->item(0); |
2600 | - if (! isset($valor_original)) { |
|
2600 | + if (!isset($valor_original)) { |
|
2601 | 2601 | return ""; |
2602 | 2602 | } |
2603 | 2603 | $valor_original = $valor_original->nodeValue; |
2604 | - $valor = ! empty($valor_original) ? number_format($valor_original, 2, ",", ".") : ''; |
|
2604 | + $valor = !empty($valor_original) ? number_format($valor_original, 2, ",", ".") : ''; |
|
2605 | 2605 | |
2606 | 2606 | if ($valor != "") { |
2607 | 2607 | return sprintf($formato, $valor); |
@@ -2627,7 +2627,7 @@ discard block |
||
2627 | 2627 | $ICMSUFDest = $itemProd->getElementsByTagName("ICMSUFDest")->item(0); |
2628 | 2628 | $impostos = ''; |
2629 | 2629 | |
2630 | - if (! empty($ICMS)) { |
|
2630 | + if (!empty($ICMS)) { |
|
2631 | 2631 | $impostos .= $this->descricaoProdutoHelper($ICMS, "vBCFCP", " BcFcp=%s"); |
2632 | 2632 | $impostos .= $this->descricaoProdutoHelper($ICMS, "pFCP", " pFcp=%s%%"); |
2633 | 2633 | $impostos .= $this->descricaoProdutoHelper($ICMS, "vFCP", " vFcp=%s"); |
@@ -2643,7 +2643,7 @@ discard block |
||
2643 | 2643 | $impostos .= $this->descricaoProdutoHelper($ICMS, "pST", " pSt=%s"); |
2644 | 2644 | $impostos .= $this->descricaoProdutoHelper($ICMS, "vICMSSTRet", " VALOR ICMS ST=%s"); |
2645 | 2645 | } |
2646 | - if (! empty($ICMSUFDest)) { |
|
2646 | + if (!empty($ICMSUFDest)) { |
|
2647 | 2647 | $impostos .= $this->descricaoProdutoHelper($ICMSUFDest, "pFCPUFDest", " pFCPUFDest=%s%%"); |
2648 | 2648 | $impostos .= $this->descricaoProdutoHelper($ICMSUFDest, "pICMSUFDest", " pICMSUFDest=%s%%"); |
2649 | 2649 | $impostos .= $this->descricaoProdutoHelper($ICMSUFDest, "pICMSInterPart", " pICMSInterPart=%s%%"); |
@@ -2651,7 +2651,7 @@ discard block |
||
2651 | 2651 | $impostos .= $this->descricaoProdutoHelper($ICMSUFDest, "vICMSUFDest", " vICMSUFDest=%s"); |
2652 | 2652 | $impostos .= $this->descricaoProdutoHelper($ICMSUFDest, "vICMSUFRemet", " vICMSUFRemet=%s"); |
2653 | 2653 | } |
2654 | - $infAdProd = ! empty($itemProd->getElementsByTagName('infAdProd')->item(0)->nodeValue) |
|
2654 | + $infAdProd = !empty($itemProd->getElementsByTagName('infAdProd')->item(0)->nodeValue) |
|
2655 | 2655 | ? substr( |
2656 | 2656 | //$this->anfaveaDANFE($itemProd->getElementsByTagName('infAdProd')->item(0)->nodeValue), |
2657 | 2657 | $itemProd->getElementsByTagName('infAdProd')->item(0)->nodeValue, |
@@ -2659,13 +2659,13 @@ discard block |
||
2659 | 2659 | 500 |
2660 | 2660 | ) |
2661 | 2661 | : ''; |
2662 | - if (! empty($infAdProd)) { |
|
2662 | + if (!empty($infAdProd)) { |
|
2663 | 2663 | $infAdProd = trim($infAdProd); |
2664 | 2664 | $infAdProd .= ' '; |
2665 | 2665 | } |
2666 | 2666 | $loteTxt = ''; |
2667 | 2667 | $rastro = $prod->getElementsByTagName("med"); |
2668 | - if (! empty($prod->getElementsByTagName("rastro"))) { |
|
2668 | + if (!empty($prod->getElementsByTagName("rastro"))) { |
|
2669 | 2669 | $rastro = $prod->getElementsByTagName("rastro"); |
2670 | 2670 | $i = 0; |
2671 | 2671 | while ($i < $rastro->length) { |
@@ -2679,14 +2679,14 @@ discard block |
||
2679 | 2679 | $loteTxt .= $datafab; //$this->getTagDate($rastro->item($i), 'dFab', ' Fab: '); |
2680 | 2680 | $loteTxt .= $dataval; //$this->getTagDate($rastro->item($i), 'dVal', ' Val: '); |
2681 | 2681 | $loteTxt .= $this->getTagValue($rastro->item($i), 'vPMC', ' PMC: '); |
2682 | - $i ++; |
|
2682 | + $i++; |
|
2683 | 2683 | } |
2684 | 2684 | if ($loteTxt != '') { |
2685 | 2685 | $loteTxt .= ' '; |
2686 | 2686 | } |
2687 | 2687 | } |
2688 | 2688 | //NT2013.006 FCI |
2689 | - $nFCI = (! empty($itemProd->getElementsByTagName('nFCI')->item(0)->nodeValue)) ? |
|
2689 | + $nFCI = (!empty($itemProd->getElementsByTagName('nFCI')->item(0)->nodeValue)) ? |
|
2690 | 2690 | ' FCI:' . $itemProd->getElementsByTagName('nFCI')->item(0)->nodeValue : ''; |
2691 | 2691 | $tmp_ad = $infAdProd . ($this->descProdInfoComplemento ? $loteTxt . $impostos . $nFCI : ''); |
2692 | 2692 | $texto = $prod->getElementsByTagName("xProd")->item(0)->nodeValue |
@@ -2736,7 +2736,7 @@ discard block |
||
2736 | 2736 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, ''); |
2737 | 2737 | $y += 3; |
2738 | 2738 | //desenha a caixa dos dados dos itens da NF |
2739 | - $hmax += 1; |
|
2739 | + $hmax += 1; |
|
2740 | 2740 | $texto = ''; |
2741 | 2741 | $this->pdf->textBox($x, $y, $w, $hmax); |
2742 | 2742 | //################################################################################## |
@@ -2749,101 +2749,101 @@ discard block |
||
2749 | 2749 | $this->pdf->textBox($x, $y, $w1, $h, $texto, $aFont, 'C', 'C', 0, '', false); |
2750 | 2750 | $this->pdf->line($x + $w1, $y, $x + $w1, $y + $hmax); |
2751 | 2751 | //DESCRIÇÃO DO PRODUTO / SERVIÇO |
2752 | - $x += $w1; |
|
2752 | + $x += $w1; |
|
2753 | 2753 | $w2 = round($w * 0.25, 0); |
2754 | 2754 | $texto = 'DESCRIÇÃO DO PRODUTO / SERVIÇO'; |
2755 | 2755 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
2756 | 2756 | $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'C', 'C', 0, '', false); |
2757 | 2757 | $this->pdf->line($x + $w2, $y, $x + $w2, $y + $hmax); |
2758 | 2758 | //NCM/SH |
2759 | - $x += $w2; |
|
2759 | + $x += $w2; |
|
2760 | 2760 | $w3 = round($w * 0.06, 0); |
2761 | 2761 | $texto = 'NCM/SH'; |
2762 | 2762 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
2763 | 2763 | $this->pdf->textBox($x, $y, $w3, $h, $texto, $aFont, 'C', 'C', 0, '', false); |
2764 | 2764 | $this->pdf->line($x + $w3, $y, $x + $w3, $y + $hmax); |
2765 | 2765 | //O/CST ou O/CSOSN |
2766 | - $x += $w3; |
|
2766 | + $x += $w3; |
|
2767 | 2767 | $w4 = round($w * 0.05, 0); |
2768 | 2768 | $texto = 'O/CST'; // CRT = 2 ou CRT = 3 |
2769 | 2769 | if ($this->getTagValue($this->emit, 'CRT') == '1') { |
2770 | - $texto = 'O/CSOSN';//Regime do Simples CRT = 1 |
|
2770 | + $texto = 'O/CSOSN'; //Regime do Simples CRT = 1 |
|
2771 | 2771 | } |
2772 | 2772 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
2773 | 2773 | $this->pdf->textBox($x, $y, $w4, $h, $texto, $aFont, 'C', 'C', 0, '', false); |
2774 | 2774 | $this->pdf->line($x + $w4, $y, $x + $w4, $y + $hmax); |
2775 | 2775 | //CFOP |
2776 | - $x += $w4; |
|
2776 | + $x += $w4; |
|
2777 | 2777 | $w5 = round($w * 0.04, 0); |
2778 | 2778 | $texto = 'CFOP'; |
2779 | 2779 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
2780 | 2780 | $this->pdf->textBox($x, $y, $w5, $h, $texto, $aFont, 'C', 'C', 0, '', false); |
2781 | 2781 | $this->pdf->line($x + $w5, $y, $x + $w5, $y + $hmax); |
2782 | 2782 | //UN |
2783 | - $x += $w5; |
|
2783 | + $x += $w5; |
|
2784 | 2784 | $w6 = round($w * 0.03, 0); |
2785 | 2785 | $texto = 'UN'; |
2786 | 2786 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
2787 | 2787 | $this->pdf->textBox($x, $y, $w6, $h, $texto, $aFont, 'C', 'C', 0, '', false); |
2788 | 2788 | $this->pdf->line($x + $w6, $y, $x + $w6, $y + $hmax); |
2789 | 2789 | //QUANT |
2790 | - $x += $w6; |
|
2790 | + $x += $w6; |
|
2791 | 2791 | $w7 = round($w * 0.08, 0); |
2792 | 2792 | $texto = 'QUANT'; |
2793 | 2793 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
2794 | 2794 | $this->pdf->textBox($x, $y, $w7, $h, $texto, $aFont, 'C', 'C', 0, '', false); |
2795 | 2795 | $this->pdf->line($x + $w7, $y, $x + $w7, $y + $hmax); |
2796 | 2796 | //VALOR UNIT |
2797 | - $x += $w7; |
|
2797 | + $x += $w7; |
|
2798 | 2798 | $w8 = round($w * 0.06, 0); |
2799 | 2799 | $texto = 'VALOR UNIT'; |
2800 | 2800 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
2801 | 2801 | $this->pdf->textBox($x, $y, $w8, $h, $texto, $aFont, 'C', 'C', 0, '', false); |
2802 | 2802 | $this->pdf->line($x + $w8, $y, $x + $w8, $y + $hmax); |
2803 | 2803 | //VALOR TOTAL |
2804 | - $x += $w8; |
|
2804 | + $x += $w8; |
|
2805 | 2805 | $w9 = round($w * 0.06, 0); |
2806 | 2806 | $texto = 'VALOR TOTAL'; |
2807 | 2807 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
2808 | 2808 | $this->pdf->textBox($x, $y, $w9, $h, $texto, $aFont, 'C', 'C', 0, '', false); |
2809 | 2809 | $this->pdf->line($x + $w9, $y, $x + $w9, $y + $hmax); |
2810 | 2810 | //VALOR DESCONTO |
2811 | - $x += $w9; |
|
2811 | + $x += $w9; |
|
2812 | 2812 | $w10 = round($w * 0.05, 0); |
2813 | 2813 | $texto = 'VALOR DESC'; |
2814 | 2814 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
2815 | 2815 | $this->pdf->textBox($x, $y, $w10, $h, $texto, $aFont, 'C', 'C', 0, '', false); |
2816 | 2816 | $this->pdf->line($x + $w10, $y, $x + $w10, $y + $hmax); |
2817 | 2817 | //B.CÁLC ICMS |
2818 | - $x += $w10; |
|
2818 | + $x += $w10; |
|
2819 | 2819 | $w11 = round($w * 0.06, 0); |
2820 | 2820 | $texto = 'B.CÁLC ICMS'; |
2821 | 2821 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
2822 | 2822 | $this->pdf->textBox($x, $y, $w11, $h, $texto, $aFont, 'C', 'C', 0, '', false); |
2823 | 2823 | $this->pdf->line($x + $w11, $y, $x + $w11, $y + $hmax); |
2824 | 2824 | //VALOR ICMS |
2825 | - $x += $w11; |
|
2825 | + $x += $w11; |
|
2826 | 2826 | $w12 = round($w * 0.06, 0); |
2827 | 2827 | $texto = 'VALOR ICMS'; |
2828 | 2828 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
2829 | 2829 | $this->pdf->textBox($x, $y, $w12, $h, $texto, $aFont, 'C', 'C', 0, '', false); |
2830 | 2830 | $this->pdf->line($x + $w12, $y, $x + $w12, $y + $hmax); |
2831 | 2831 | //VALOR IPI |
2832 | - $x += $w12; |
|
2832 | + $x += $w12; |
|
2833 | 2833 | $w13 = round($w * 0.05, 0); |
2834 | 2834 | $texto = 'VALOR IPI'; |
2835 | 2835 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
2836 | 2836 | $this->pdf->textBox($x, $y, $w13, $h, $texto, $aFont, 'C', 'C', 0, '', false); |
2837 | 2837 | $this->pdf->line($x + $w13, $y, $x + $w13, $y + $hmax); |
2838 | 2838 | //ALÍQ. ICMS |
2839 | - $x += $w13; |
|
2839 | + $x += $w13; |
|
2840 | 2840 | $w14 = round($w * 0.04, 0); |
2841 | 2841 | $texto = 'ALÍQ. ICMS'; |
2842 | 2842 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
2843 | 2843 | $this->pdf->textBox($x, $y, $w14, $h, $texto, $aFont, 'C', 'C', 0, '', false); |
2844 | 2844 | $this->pdf->line($x + $w14, $y, $x + $w14, $y + $hmax); |
2845 | 2845 | //ALÍQ. IPI |
2846 | - $x += $w14; |
|
2846 | + $x += $w14; |
|
2847 | 2847 | $w15 = $w - ($w1 + $w2 + $w3 + $w4 + $w5 + $w6 + $w7 + $w8 + $w9 + $w10 + $w11 + $w12 + $w13 + $w14); |
2848 | 2848 | $texto = 'ALÍQ. IPI'; |
2849 | 2849 | $this->pdf->textBox($x, $y, $w15, $h, $texto, $aFont, 'C', 'C', 0, '', false); |
@@ -2897,7 +2897,7 @@ discard block |
||
2897 | 2897 | // Informação sobre unidade de medida tributavel. |
2898 | 2898 | // Se não for para exibir a unidade de medida tributavel, então |
2899 | 2899 | // A Escrita irá começar em 0. |
2900 | - if (! $mostrarUnidadeTributavel) { |
|
2900 | + if (!$mostrarUnidadeTributavel) { |
|
2901 | 2901 | $yTrib = 0; |
2902 | 2902 | } |
2903 | 2903 | $h = $this->calculeHeight($thisItem, $mostrarUnidadeTributavel); |
@@ -2932,7 +2932,7 @@ discard block |
||
2932 | 2932 | } |
2933 | 2933 | $x += $w2; |
2934 | 2934 | //NCM |
2935 | - $texto = ! empty($prod->getElementsByTagName("NCM")->item(0)->nodeValue) ? |
|
2935 | + $texto = !empty($prod->getElementsByTagName("NCM")->item(0)->nodeValue) ? |
|
2936 | 2936 | $prod->getElementsByTagName("NCM")->item(0)->nodeValue : ''; |
2937 | 2937 | $this->pdf->textBox($x, $y, $w3, $h, $texto, $aFont, 'T', 'C', 0, ''); |
2938 | 2938 | $x += $w3; |
@@ -2945,11 +2945,11 @@ discard block |
||
2945 | 2945 | $this->pdf->textBox($x, $y, $w4, $h, $texto, $aFont, 'T', 'C', 0, ''); |
2946 | 2946 | } |
2947 | 2947 | //CFOP |
2948 | - $x += $w4; |
|
2948 | + $x += $w4; |
|
2949 | 2949 | $texto = $prod->getElementsByTagName("CFOP")->item(0)->nodeValue; |
2950 | 2950 | $this->pdf->textBox($x, $y, $w5, $h, $texto, $aFont, 'T', 'C', 0, ''); |
2951 | 2951 | //Unidade |
2952 | - $x += $w5; |
|
2952 | + $x += $w5; |
|
2953 | 2953 | $texto = $uCom; |
2954 | 2954 | $this->pdf->textBox($x, $y, $w6, $h, $texto, $aFont, 'T', 'C', 0, ''); |
2955 | 2955 | //Unidade de medida tributável |
@@ -2971,7 +2971,7 @@ discard block |
||
2971 | 2971 | // QTDADE Tributável |
2972 | 2972 | if ($mostrarUnidadeTributavel) { |
2973 | 2973 | $qTrib = $prod->getElementsByTagName("qTrib")->item(0); |
2974 | - if (! empty($qTrib)) { |
|
2974 | + if (!empty($qTrib)) { |
|
2975 | 2975 | $texto = number_format($qTrib->nodeValue, $this->qComCasasDec, ",", "."); |
2976 | 2976 | $this->pdf->textBox($x, $yTrib, $w7, $h, $texto, $aFont, 'T', $alinhamento, 0, ''); |
2977 | 2977 | } |
@@ -2984,7 +2984,7 @@ discard block |
||
2984 | 2984 | // Valor Unitário Tributável |
2985 | 2985 | if ($mostrarUnidadeTributavel) { |
2986 | 2986 | $vUnTrib = $prod->getElementsByTagName("vUnTrib")->item(0); |
2987 | - if (! empty($vUnTrib)) { |
|
2987 | + if (!empty($vUnTrib)) { |
|
2988 | 2988 | $texto = number_format($vUnTrib->nodeValue, $this->vUnComCasasDec, ",", "."); |
2989 | 2989 | $this->pdf->textBox($x, $yTrib, $w8, $h, $texto, $aFont, 'T', $alinhamento, 0, ''); |
2990 | 2990 | } |
@@ -2998,7 +2998,7 @@ discard block |
||
2998 | 2998 | $this->pdf->textBox($x, $y, $w9, $h, $texto, $aFont, 'T', $alinhamento, 0, ''); |
2999 | 2999 | $x += $w9; |
3000 | 3000 | //Valor do Desconto |
3001 | - $vdesc = ! empty($prod->getElementsByTagName("vDesc")->item(0)->nodeValue) |
|
3001 | + $vdesc = !empty($prod->getElementsByTagName("vDesc")->item(0)->nodeValue) |
|
3002 | 3002 | ? $prod->getElementsByTagName("vDesc")->item(0)->nodeValue : 0; |
3003 | 3003 | |
3004 | 3004 | $texto = number_format($vdesc, 2, ",", "."); |
@@ -3006,7 +3006,7 @@ discard block |
||
3006 | 3006 | //Valor da Base de calculo |
3007 | 3007 | $x += $w10; |
3008 | 3008 | if (isset($ICMS)) { |
3009 | - $texto = ! empty($ICMS->getElementsByTagName("vBC")->item(0)->nodeValue) |
|
3009 | + $texto = !empty($ICMS->getElementsByTagName("vBC")->item(0)->nodeValue) |
|
3010 | 3010 | ? number_format( |
3011 | 3011 | $ICMS->getElementsByTagName("vBC")->item(0)->nodeValue, |
3012 | 3012 | 2, |
@@ -3019,7 +3019,7 @@ discard block |
||
3019 | 3019 | //Valor do ICMS |
3020 | 3020 | $x += $w11; |
3021 | 3021 | if (isset($ICMS)) { |
3022 | - $texto = ! empty($ICMS->getElementsByTagName("vICMS")->item(0)->nodeValue) |
|
3022 | + $texto = !empty($ICMS->getElementsByTagName("vICMS")->item(0)->nodeValue) |
|
3023 | 3023 | ? number_format( |
3024 | 3024 | $ICMS->getElementsByTagName("vICMS")->item(0)->nodeValue, |
3025 | 3025 | 2, |
@@ -3032,7 +3032,7 @@ discard block |
||
3032 | 3032 | //Valor do IPI |
3033 | 3033 | $x += $w12; |
3034 | 3034 | if (isset($IPI)) { |
3035 | - $texto = ! empty($IPI->getElementsByTagName("vIPI")->item(0)->nodeValue) |
|
3035 | + $texto = !empty($IPI->getElementsByTagName("vIPI")->item(0)->nodeValue) |
|
3036 | 3036 | ? number_format( |
3037 | 3037 | $IPI->getElementsByTagName("vIPI")->item(0)->nodeValue, |
3038 | 3038 | 2, |
@@ -3047,7 +3047,7 @@ discard block |
||
3047 | 3047 | // %ICMS |
3048 | 3048 | $x += $w13; |
3049 | 3049 | if (isset($ICMS)) { |
3050 | - $texto = ! empty($ICMS->getElementsByTagName("pICMS")->item(0)->nodeValue) |
|
3050 | + $texto = !empty($ICMS->getElementsByTagName("pICMS")->item(0)->nodeValue) |
|
3051 | 3051 | ? number_format( |
3052 | 3052 | $ICMS->getElementsByTagName("pICMS")->item(0)->nodeValue, |
3053 | 3053 | 2, |
@@ -3060,7 +3060,7 @@ discard block |
||
3060 | 3060 | //%IPI |
3061 | 3061 | $x += $w14; |
3062 | 3062 | if (isset($IPI)) { |
3063 | - $texto = ! empty($IPI->getElementsByTagName("pIPI")->item(0)->nodeValue) |
|
3063 | + $texto = !empty($IPI->getElementsByTagName("pIPI")->item(0)->nodeValue) |
|
3064 | 3064 | ? number_format( |
3065 | 3065 | $IPI->getElementsByTagName("pIPI")->item(0)->nodeValue, |
3066 | 3066 | 2, |
@@ -3078,17 +3078,17 @@ discard block |
||
3078 | 3078 | $veicProd = $prod->getElementsByTagName("veicProd")->item(0); |
3079 | 3079 | // Tag somente é gerada para veiculo 0k, e só é permitido um veiculo por NF-e por conta do detran |
3080 | 3080 | // Verifica se a Tag existe |
3081 | - if (! empty($veicProd)) { |
|
3081 | + if (!empty($veicProd)) { |
|
3082 | 3082 | $this->dadosItenVeiculoDANFE($oldX + 3, $y + 40, $nInicio, 3, $prod); |
3083 | 3083 | } |
3084 | 3084 | |
3085 | 3085 | |
3086 | 3086 | $y += $h; |
3087 | - $i ++; |
|
3087 | + $i++; |
|
3088 | 3088 | //incrementa o controle dos itens processados. |
3089 | - $this->qtdeItensProc ++; |
|
3089 | + $this->qtdeItensProc++; |
|
3090 | 3090 | } else { |
3091 | - $i ++; |
|
3091 | + $i++; |
|
3092 | 3092 | } |
3093 | 3093 | } |
3094 | 3094 | |
@@ -3205,7 +3205,7 @@ discard block |
||
3205 | 3205 | $veiculoTipo = $veicProd->getElementsByTagName("tpVeic")->item(0)->nodeValue; |
3206 | 3206 | |
3207 | 3207 | $veiculoMotor = $veicProd->getElementsByTagName("nMotor")->item(0)->nodeValue; |
3208 | - $veiculoCodigoModelo = $veicProd->getElementsByTagName("cMod")->item(0)->nodeValue; |
|
3208 | + $veiculoCodigoModelo = $veicProd->getElementsByTagName("cMod")->item(0)->nodeValue; |
|
3209 | 3209 | $veiculoHp = $veicProd->getElementsByTagName("pot")->item(0)->nodeValue; |
3210 | 3210 | $veiculoPlaca = ''; //$veiculo->getElementsByTagName("CMT")->item(0)->nodeValue; |
3211 | 3211 | $veiculoTipoPintura = $veicProd->getElementsByTagName("tpPint")->item(0)->nodeValue; |
@@ -3293,23 +3293,23 @@ discard block |
||
3293 | 3293 | $aFont = ['font' => $this->fontePadrao, 'size' => 7, 'style' => 'B']; |
3294 | 3294 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, ''); |
3295 | 3295 | //INSCRIÇÃO MUNICIPAL |
3296 | - $y += 3; |
|
3296 | + $y += 3; |
|
3297 | 3297 | $w = round($this->wPrint * 0.23, 0); |
3298 | 3298 | $texto = 'INSCRIÇÃO MUNICIPAL'; |
3299 | 3299 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
3300 | 3300 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, ''); |
3301 | 3301 | //inscrição municipal |
3302 | - $texto = ! empty($this->emit->getElementsByTagName("IM")->item(0)->nodeValue) ? |
|
3302 | + $texto = !empty($this->emit->getElementsByTagName("IM")->item(0)->nodeValue) ? |
|
3303 | 3303 | $this->emit->getElementsByTagName("IM")->item(0)->nodeValue : ''; |
3304 | 3304 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
3305 | 3305 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'L', 0, ''); |
3306 | 3306 | //VALOR TOTAL DOS SERVIÇOS |
3307 | - $x += $w; |
|
3307 | + $x += $w; |
|
3308 | 3308 | $texto = 'VALOR TOTAL DOS SERVIÇOS'; |
3309 | 3309 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
3310 | 3310 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, ''); |
3311 | 3311 | if (isset($this->ISSQNtot)) { |
3312 | - $texto = ! empty($this->ISSQNtot->getElementsByTagName("vServ")->item(0)->nodeValue) ? |
|
3312 | + $texto = !empty($this->ISSQNtot->getElementsByTagName("vServ")->item(0)->nodeValue) ? |
|
3313 | 3313 | $this->ISSQNtot->getElementsByTagName("vServ")->item(0)->nodeValue : ''; |
3314 | 3314 | $texto = number_format($texto, 2, ",", "."); |
3315 | 3315 | } else { |
@@ -3318,14 +3318,14 @@ discard block |
||
3318 | 3318 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
3319 | 3319 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'R', 0, ''); |
3320 | 3320 | //BASE DE CÁLCULO DO ISSQN |
3321 | - $x += $w; |
|
3321 | + $x += $w; |
|
3322 | 3322 | $texto = 'BASE DE CÁLCULO DO ISSQN'; |
3323 | 3323 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
3324 | 3324 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, ''); |
3325 | 3325 | if (isset($this->ISSQNtot)) { |
3326 | - $texto = ! empty($this->ISSQNtot->getElementsByTagName("vBC")->item(0)->nodeValue) ? |
|
3326 | + $texto = !empty($this->ISSQNtot->getElementsByTagName("vBC")->item(0)->nodeValue) ? |
|
3327 | 3327 | $this->ISSQNtot->getElementsByTagName("vBC")->item(0)->nodeValue : ''; |
3328 | - $texto = ! empty($texto) ? number_format($texto, 2, ",", ".") : ''; |
|
3328 | + $texto = !empty($texto) ? number_format($texto, 2, ",", ".") : ''; |
|
3329 | 3329 | } else { |
3330 | 3330 | $texto = ''; |
3331 | 3331 | } |
@@ -3342,9 +3342,9 @@ discard block |
||
3342 | 3342 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
3343 | 3343 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, ''); |
3344 | 3344 | if (isset($this->ISSQNtot)) { |
3345 | - $texto = ! empty($this->ISSQNtot->getElementsByTagName("vISS")->item(0)->nodeValue) ? |
|
3345 | + $texto = !empty($this->ISSQNtot->getElementsByTagName("vISS")->item(0)->nodeValue) ? |
|
3346 | 3346 | $this->ISSQNtot->getElementsByTagName("vISS")->item(0)->nodeValue : ''; |
3347 | - $texto = ! empty($texto) ? number_format($texto, 2, ",", ".") : ''; |
|
3347 | + $texto = !empty($texto) ? number_format($texto, 2, ",", ".") : ''; |
|
3348 | 3348 | } else { |
3349 | 3349 | $texto = ''; |
3350 | 3350 | } |
@@ -3383,13 +3383,13 @@ discard block |
||
3383 | 3383 | |
3384 | 3384 | //INFORMAÇÕES COMPLEMENTARES |
3385 | 3385 | $texto = "INFORMAÇÕES COMPLEMENTARES"; |
3386 | - $y += 3; |
|
3386 | + $y += 3; |
|
3387 | 3387 | $w = $this->wAdic; |
3388 | 3388 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => 'B']; |
3389 | 3389 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, ''); |
3390 | 3390 | //o texto com os dados adicionais foi obtido na função montaDANFE |
3391 | 3391 | //e carregado em uma propriedade privada da classe |
3392 | - $y += 1; |
|
3392 | + $y += 1; |
|
3393 | 3393 | $aFont = ['font' => $this->fontePadrao, 'size' => $this->textadicfontsize * $this->pdf->k, 'style' => '']; |
3394 | 3394 | //$aFont = ['font'=>$this->fontePadrao, 'size'=> 5, 'style'=>'']; |
3395 | 3395 | $this->pdf->textBox($x, $y + 2, $w - 2, $h, $this->textoAdic, $aFont, 'T', 'L', 0, '', false); |
@@ -3434,7 +3434,7 @@ discard block |
||
3434 | 3434 | $texto = "CONTINGÊNCIA SVC-RS\n" . $dhCont . "\n" . $xJust; |
3435 | 3435 | break; |
3436 | 3436 | } |
3437 | - $y += 2; |
|
3437 | + $y += 2; |
|
3438 | 3438 | $aFont = ['font' => $this->fontePadrao, 'size' => 7, 'style' => '']; |
3439 | 3439 | $this->pdf->textBox($x, $y, $w - 2, $h, $texto, $aFont, 'T', 'L', 0, '', false); |
3440 | 3440 | |
@@ -3489,7 +3489,7 @@ discard block |
||
3489 | 3489 | $tpNF = $this->ide->getElementsByTagName('tpNF')->item(0)->nodeValue; |
3490 | 3490 | if ($tpNF == '0') { |
3491 | 3491 | //NFe de Entrada |
3492 | - $emitente = ''; |
|
3492 | + $emitente = ''; |
|
3493 | 3493 | $emitente .= $this->dest->getElementsByTagName("xNome")->item(0)->nodeValue . " - "; |
3494 | 3494 | $emitente .= $this->enderDest->getElementsByTagName("xLgr")->item(0)->nodeValue . ", "; |
3495 | 3495 | $emitente .= $this->enderDest->getElementsByTagName("nro")->item(0)->nodeValue . " - "; |
@@ -3542,10 +3542,10 @@ discard block |
||
3542 | 3542 | $texto .= "AO LADO"; |
3543 | 3543 | } |
3544 | 3544 | $texto .= ". EMISSÃO: "; |
3545 | - $dEmi = ! empty($this->ide->getElementsByTagName("dEmi")->item(0)->nodeValue) ? |
|
3545 | + $dEmi = !empty($this->ide->getElementsByTagName("dEmi")->item(0)->nodeValue) ? |
|
3546 | 3546 | $this->ide->getElementsByTagName("dEmi")->item(0)->nodeValue : ''; |
3547 | 3547 | if ($dEmi == '') { |
3548 | - $dEmi = ! empty($this->ide->getElementsByTagName("dhEmi")->item(0)->nodeValue) ? |
|
3548 | + $dEmi = !empty($this->ide->getElementsByTagName("dhEmi")->item(0)->nodeValue) ? |
|
3549 | 3549 | $this->ide->getElementsByTagName("dhEmi")->item(0)->nodeValue : ''; |
3550 | 3550 | $aDemi = explode('T', $dEmi); |
3551 | 3551 | $dEmi = $aDemi[0]; |
@@ -3568,12 +3568,12 @@ discard block |
||
3568 | 3568 | $this->pdf->textBox($x1, $y, $w1, 18, $texto, $aFont, 'C', 'C', 1, ''); |
3569 | 3569 | //DATA DE RECEBIMENTO |
3570 | 3570 | $texto = "DATA DE RECEBIMENTO"; |
3571 | - $y += $h; |
|
3571 | + $y += $h; |
|
3572 | 3572 | $w2 = round($this->wPrint * 0.17, 0); //35; |
3573 | 3573 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
3574 | 3574 | $this->pdf->textBox($x, $y, $w2, 8, $texto, $aFont, 'T', 'L', 1, ''); |
3575 | 3575 | //IDENTIFICAÇÃO E ASSINATURA DO RECEBEDOR |
3576 | - $x += $w2; |
|
3576 | + $x += $w2; |
|
3577 | 3577 | $w3 = $w - $w2; |
3578 | 3578 | $texto = "IDENTIFICAÇÃO E ASSINATURA DO RECEBEDOR"; |
3579 | 3579 | $this->pdf->textBox($x, $y, $w3, 8, $texto, $aFont, 'T', 'L', 1, ''); |
@@ -3584,7 +3584,7 @@ discard block |
||
3584 | 3584 | |
3585 | 3585 | return $y; |
3586 | 3586 | } else { |
3587 | - $x --; |
|
3587 | + $x--; |
|
3588 | 3588 | $x = $this->pdf->textBox90($x, $y, $w - 1, $h, $texto, $aFontSmall, 'C', 'L', 0, '', false); |
3589 | 3589 | //NUMERO DA NOTA FISCAL LOGO NFE |
3590 | 3590 | $w1 = 18; |
@@ -3605,7 +3605,7 @@ discard block |
||
3605 | 3605 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
3606 | 3606 | $this->pdf->textBox90($x, $y, $w2, 8, $texto, $aFont, 'T', 'L', 1, ''); |
3607 | 3607 | //IDENTIFICAÇÃO E ASSINATURA DO RECEBEDOR |
3608 | - $y -= $w2; |
|
3608 | + $y -= $w2; |
|
3609 | 3609 | $w3 = $w - $w2; |
3610 | 3610 | $texto = "IDENTIFICAÇÃO E ASSINATURA DO RECEBEDOR"; |
3611 | 3611 | $aFont = ['font' => $this->fontePadrao, 'size' => 5.7, 'style' => '']; |
@@ -3626,18 +3626,18 @@ discard block |
||
3626 | 3626 | */ |
3627 | 3627 | protected function geraInformacoesDaTagCompra() |
3628 | 3628 | { |
3629 | - if (! $this->gerarInformacoesAutomaticas) { |
|
3629 | + if (!$this->gerarInformacoesAutomaticas) { |
|
3630 | 3630 | return ''; |
3631 | 3631 | } |
3632 | 3632 | $saida = ""; |
3633 | 3633 | if (isset($this->compra)) { |
3634 | - if (! empty($this->compra->getElementsByTagName("xNEmp")->item(0)->nodeValue)) { |
|
3634 | + if (!empty($this->compra->getElementsByTagName("xNEmp")->item(0)->nodeValue)) { |
|
3635 | 3635 | $saida .= " Nota de Empenho: " . $this->compra->getElementsByTagName("xNEmp")->item(0)->nodeValue; |
3636 | 3636 | } |
3637 | - if (! empty($this->compra->getElementsByTagName("xPed")->item(0)->nodeValue)) { |
|
3637 | + if (!empty($this->compra->getElementsByTagName("xPed")->item(0)->nodeValue)) { |
|
3638 | 3638 | $saida .= " Pedido: " . $this->compra->getElementsByTagName("xPed")->item(0)->nodeValue; |
3639 | 3639 | } |
3640 | - if (! empty($this->compra->getElementsByTagName("xCont")->item(0)->nodeValue)) { |
|
3640 | + if (!empty($this->compra->getElementsByTagName("xCont")->item(0)->nodeValue)) { |
|
3641 | 3641 | $saida .= " Contrato: " . $this->compra->getElementsByTagName("xCont")->item(0)->nodeValue; |
3642 | 3642 | } |
3643 | 3643 | } |
@@ -3668,10 +3668,10 @@ discard block |
||
3668 | 3668 | if ($icmss > 0) { |
3669 | 3669 | $icmss = 1; |
3670 | 3670 | } |
3671 | - $dEmi = ! empty($this->ide->getElementsByTagName("dEmi")->item(0)->nodeValue) ? |
|
3671 | + $dEmi = !empty($this->ide->getElementsByTagName("dEmi")->item(0)->nodeValue) ? |
|
3672 | 3672 | $this->ide->getElementsByTagName("dEmi")->item(0)->nodeValue : ''; |
3673 | 3673 | if ($dEmi == '') { |
3674 | - $dEmi = ! empty($this->ide->getElementsByTagName("dhEmi")->item(0)->nodeValue) ? |
|
3674 | + $dEmi = !empty($this->ide->getElementsByTagName("dhEmi")->item(0)->nodeValue) ? |
|
3675 | 3675 | $this->ide->getElementsByTagName("dhEmi")->item(0)->nodeValue : ''; |
3676 | 3676 | $aDemi = explode('T', $dEmi); |
3677 | 3677 | $dEmi = $aDemi[0]; |
@@ -3695,7 +3695,7 @@ discard block |
||
3695 | 3695 | */ |
3696 | 3696 | protected function geraInformacoesDasNotasReferenciadas() |
3697 | 3697 | { |
3698 | - if (! $this->gerarInformacoesAutomaticas) { |
|
3698 | + if (!$this->gerarInformacoesAutomaticas) { |
|
3699 | 3699 | return ''; |
3700 | 3700 | } |
3701 | 3701 | $formaNfeRef = "\r\nNFe Ref.: série:%d número:%d emit:%s em %s [%s]"; |
@@ -3723,7 +3723,7 @@ discard block |
||
3723 | 3723 | $cnpj = $this->formatField(substr($chave_acesso, 6, 14), "##.###.###/####-##"); |
3724 | 3724 | $serie = substr($chave_acesso, 22, 3); |
3725 | 3725 | $numero = substr($chave_acesso, 25, 9); |
3726 | - $saida .= sprintf($formaNfeRef, $serie, $numero, $cnpj, $data, $chave_acessoF); |
|
3726 | + $saida .= sprintf($formaNfeRef, $serie, $numero, $cnpj, $data, $chave_acessoF); |
|
3727 | 3727 | } |
3728 | 3728 | $refNF = $nfRef->getElementsByTagName('refNF'); |
3729 | 3729 | foreach ($refNF as $umaRefNFe) { |
@@ -3734,7 +3734,7 @@ discard block |
||
3734 | 3734 | $numero = $umaRefNFe->getElementsByTagName('nNF')->item(0)->nodeValue; |
3735 | 3735 | $data = substr($data, 2, 2) . "/20" . substr($data, 0, 2); |
3736 | 3736 | $cnpj = $this->formatField($cnpj, "##.###.###/####-##"); |
3737 | - $saida .= sprintf($formaNfRef, $serie, $numero, $cnpj, $data, $mod); |
|
3737 | + $saida .= sprintf($formaNfRef, $serie, $numero, $cnpj, $data, $mod); |
|
3738 | 3738 | } |
3739 | 3739 | $refCTe = $nfRef->getElementsByTagName('refCTe'); |
3740 | 3740 | foreach ($refCTe as $chave_acessoRef) { |
@@ -3744,7 +3744,7 @@ discard block |
||
3744 | 3744 | $cnpj = $this->formatField(substr($chave_acesso, 6, 14), "##.###.###/####-##"); |
3745 | 3745 | $serie = substr($chave_acesso, 22, 3); |
3746 | 3746 | $numero = substr($chave_acesso, 25, 9); |
3747 | - $saida .= sprintf($formaCTeRef, $serie, $numero, $cnpj, $data, $chave_acessoF); |
|
3747 | + $saida .= sprintf($formaCTeRef, $serie, $numero, $cnpj, $data, $chave_acessoF); |
|
3748 | 3748 | } |
3749 | 3749 | $refECF = $nfRef->getElementsByTagName('refECF'); |
3750 | 3750 | foreach ($refECF as $umaRefNFe) { |
@@ -3756,10 +3756,9 @@ discard block |
||
3756 | 3756 | $refNFP = $nfRef->getElementsByTagName('refNFP'); |
3757 | 3757 | foreach ($refNFP as $umaRefNFe) { |
3758 | 3758 | $data = $umaRefNFe->getElementsByTagName('AAMM')->item(0)->nodeValue; |
3759 | - $cnpj = ! empty($umaRefNFe->getElementsByTagName('CNPJ')->item(0)->nodeValue) ? |
|
3760 | - $umaRefNFe->getElementsByTagName('CNPJ')->item(0)->nodeValue : |
|
3761 | - ''; |
|
3762 | - $cpf = ! empty($umaRefNFe->getElementsByTagName('CPF')->item(0)->nodeValue) ? |
|
3759 | + $cnpj = !empty($umaRefNFe->getElementsByTagName('CNPJ')->item(0)->nodeValue) ? |
|
3760 | + $umaRefNFe->getElementsByTagName('CNPJ')->item(0)->nodeValue : ''; |
|
3761 | + $cpf = !empty($umaRefNFe->getElementsByTagName('CPF')->item(0)->nodeValue) ? |
|
3763 | 3762 | $umaRefNFe->getElementsByTagName('CPF')->item(0)->nodeValue : ''; |
3764 | 3763 | $mod = $umaRefNFe->getElementsByTagName('mod')->item(0)->nodeValue; |
3765 | 3764 | $serie = $umaRefNFe->getElementsByTagName('serie')->item(0)->nodeValue; |
@@ -3781,7 +3780,7 @@ discard block |
||
3781 | 3780 | private function loadDoc($xml) |
3782 | 3781 | { |
3783 | 3782 | $this->xml = $xml; |
3784 | - if (! empty($xml)) { |
|
3783 | + if (!empty($xml)) { |
|
3785 | 3784 | $this->dom = new Dom(); |
3786 | 3785 | $this->dom->loadXML($this->xml); |
3787 | 3786 | if (empty($this->dom->getElementsByTagName("infNFe")->item(0))) { |
@@ -3835,7 +3834,7 @@ discard block |
||
3835 | 3834 | $numlinhas = $this->pdf->getNumLines($textoProduto, $w2, $aFont); |
3836 | 3835 | |
3837 | 3836 | if ($mostrarUnidadeTributavel && $numlinhas == 1) { |
3838 | - $numlinhas ++; |
|
3837 | + $numlinhas++; |
|
3839 | 3838 | } |
3840 | 3839 | |
3841 | 3840 | return round(($numlinhas * $this->pdf->fontSize) + ($numlinhas * 0.5), 2); |