@@ -310,39 +310,39 @@ discard block |
||
| 310 | 310 | { |
| 311 | 311 | $this->textoAdic = ''; |
| 312 | 312 | //informações adicionais |
| 313 | - $fontProduto = [ |
|
| 313 | + $fontProduto = [ |
|
| 314 | 314 | 'font' => $this->fontePadrao, |
| 315 | 315 | 'size' => 8, |
| 316 | 316 | 'style' => '' |
| 317 | 317 | ]; |
| 318 | 318 | $k = $this->pdf->k; |
| 319 | 319 | $this->textadicfontsize = $fontProduto['size'] / $k; |
| 320 | - $this->textoAdic .= $this->geraInformacoesDasNotasReferenciadas(); |
|
| 320 | + $this->textoAdic .= $this->geraInformacoesDasNotasReferenciadas(); |
|
| 321 | 321 | if (isset($this->infAdic)) { |
| 322 | 322 | $i = 0; |
| 323 | 323 | if ($this->textoAdic != '') { |
| 324 | 324 | $this->textoAdic .= ". \n"; |
| 325 | 325 | } |
| 326 | - $this->textoAdic .= ! empty($this->getTagValue($this->infAdic, "infCpl")) |
|
| 326 | + $this->textoAdic .= !empty($this->getTagValue($this->infAdic, "infCpl")) |
|
| 327 | 327 | ? 'Inf. Contribuinte: ' . $this->anfaveaDANFE($this->getTagValue($this->infAdic, "infCpl")) |
| 328 | 328 | : ''; |
| 329 | - $infPedido = $this->geraInformacoesDaTagCompra(); |
|
| 329 | + $infPedido = $this->geraInformacoesDaTagCompra(); |
|
| 330 | 330 | if ($infPedido != "") { |
| 331 | 331 | $this->textoAdic .= $infPedido; |
| 332 | 332 | } |
| 333 | 333 | $this->textoAdic .= $this->getTagValue($this->dest, "email", ' Email do Destinatário: '); |
| 334 | - $this->textoAdic .= ! empty($this->getTagValue($this->infAdic, "infAdFisco")) |
|
| 334 | + $this->textoAdic .= !empty($this->getTagValue($this->infAdic, "infAdFisco")) |
|
| 335 | 335 | ? "\n Inf. fisco: " . $this->getTagValue($this->infAdic, "infAdFisco") |
| 336 | 336 | : ''; |
| 337 | - $obsCont = $this->infAdic->getElementsByTagName("obsCont"); |
|
| 337 | + $obsCont = $this->infAdic->getElementsByTagName("obsCont"); |
|
| 338 | 338 | if (isset($obsCont)) { |
| 339 | 339 | foreach ($obsCont as $obs) { |
| 340 | 340 | $campo = $obsCont->item($i)->getAttribute("xCampo"); |
| 341 | - $xTexto = ! empty($obsCont->item($i)->getElementsByTagName("xTexto")->item(0)->nodeValue) |
|
| 341 | + $xTexto = !empty($obsCont->item($i)->getElementsByTagName("xTexto")->item(0)->nodeValue) |
|
| 342 | 342 | ? $obsCont->item($i)->getElementsByTagName("xTexto")->item(0)->nodeValue |
| 343 | 343 | : ''; |
| 344 | 344 | $this->textoAdic .= "\n" . $campo . ': ' . trim($xTexto); |
| 345 | - $i ++; |
|
| 345 | + $i++; |
|
| 346 | 346 | } |
| 347 | 347 | } |
| 348 | 348 | } |
@@ -356,7 +356,7 @@ discard block |
||
| 356 | 356 | $flagVTT = $flagVTT && (strpos(strtolower(trim($this->textoAdic)), 'trib') || |
| 357 | 357 | strpos(strtolower(trim($this->textoAdic)), 'imp')); |
| 358 | 358 | $vTotTrib = $this->getTagValue($this->ICMSTot, 'vTotTrib'); |
| 359 | - if ($vTotTrib != '' && ! $flagVTT) { |
|
| 359 | + if ($vTotTrib != '' && !$flagVTT) { |
|
| 360 | 360 | $this->textoAdic .= "\n Valor Aproximado dos Tributos : R$ " |
| 361 | 361 | . number_format($vTotTrib, 2, ",", "."); |
| 362 | 362 | } |
@@ -367,9 +367,9 @@ discard block |
||
| 367 | 367 | $this->textadicfontsize = $this->pdf->fontSize; |
| 368 | 368 | $hdadosadic = ceil($numlinhasdados * ($this->textadicfontsize)); |
| 369 | 369 | if ($hdadosadic > 70) { |
| 370 | - for ($f = 8; $f > 3; $f --) { |
|
| 370 | + for ($f = 8; $f > 3; $f--) { |
|
| 371 | 371 | $this->pdf->setFont($this->fontePadrao, '', $f); |
| 372 | - $fontProduto = [ |
|
| 372 | + $fontProduto = [ |
|
| 373 | 373 | 'font' => $this->fontePadrao, |
| 374 | 374 | 'size' => $f, |
| 375 | 375 | 'style' => '' |
@@ -497,9 +497,9 @@ discard block |
||
| 497 | 497 | $this->hdadosadic = $this->calculoEspacoVericalDadosAdicionais(); |
| 498 | 498 | |
| 499 | 499 | //altura disponivel para os campos da DANFE |
| 500 | - $hcabecalho = 47;//para cabeçalho |
|
| 501 | - $hdestinatario = 25;//para destinatario |
|
| 502 | - $hduplicatas = 12;//para cada grupo de 7 duplicatas |
|
| 500 | + $hcabecalho = 47; //para cabeçalho |
|
| 501 | + $hdestinatario = 25; //para destinatario |
|
| 502 | + $hduplicatas = 12; //para cada grupo de 7 duplicatas |
|
| 503 | 503 | if (isset($this->entrega)) { |
| 504 | 504 | $hlocalentrega = 25; |
| 505 | 505 | } else { |
@@ -510,11 +510,11 @@ discard block |
||
| 510 | 510 | } else { |
| 511 | 511 | $hlocalretirada = 0; |
| 512 | 512 | } |
| 513 | - $himposto = 18;// para imposto |
|
| 514 | - $htransporte = 25;// para transporte |
|
| 515 | - $hissqn = 11;// para issqn |
|
| 516 | - $hfooter = 5;// para rodape |
|
| 517 | - $hCabecItens = 4;//cabeçalho dos itens |
|
| 513 | + $himposto = 18; // para imposto |
|
| 514 | + $htransporte = 25; // para transporte |
|
| 515 | + $hissqn = 11; // para issqn |
|
| 516 | + $hfooter = 5; // para rodape |
|
| 517 | + $hCabecItens = 4; //cabeçalho dos itens |
|
| 518 | 518 | $hOCUPADA = $hcabecalho |
| 519 | 519 | + $hdestinatario |
| 520 | 520 | + $hlocalentrega |
@@ -537,10 +537,10 @@ discard block |
||
| 537 | 537 | $this->sizeExtraTextoFatura());*/ |
| 538 | 538 | |
| 539 | 539 | if ($this->orientacao == 'P') { |
| 540 | - $hDispo1 -= 24 * $this->qCanhoto;//para canhoto |
|
| 541 | - $w = $this->wPrint; |
|
| 540 | + $hDispo1 -= 24 * $this->qCanhoto; //para canhoto |
|
| 541 | + $w = $this->wPrint; |
|
| 542 | 542 | } else { |
| 543 | - $hcanhoto = $this->hPrint;//para canhoto |
|
| 543 | + $hcanhoto = $this->hPrint; //para canhoto |
|
| 544 | 544 | $w = $this->wPrint - $this->wCanhoto; |
| 545 | 545 | } |
| 546 | 546 | //$hDispo1 += 14; |
@@ -561,18 +561,18 @@ discard block |
||
| 561 | 561 | $prod = $itemProd->getElementsByTagName('prod')->item(0); |
| 562 | 562 | $uCom = $prod->getElementsByTagName("uCom")->item(0)->nodeValue; |
| 563 | 563 | $uTrib = $prod->getElementsByTagName("uTrib")->item(0); |
| 564 | - if (! empty($uTrib) && strcmp($uCom, $uTrib->nodeValue) != 0) { |
|
| 564 | + if (!empty($uTrib) && strcmp($uCom, $uTrib->nodeValue) != 0) { |
|
| 565 | 565 | $mostrarUnidadeTributavel = true; |
| 566 | 566 | } |
| 567 | 567 | |
| 568 | 568 | $hUsado += $this->calculeHeight($itemProd, $mostrarUnidadeTributavel); |
| 569 | 569 | if ($hUsado > $hDispo) { |
| 570 | - $totPag ++; |
|
| 570 | + $totPag++; |
|
| 571 | 571 | $hDispo = $hDispo2; |
| 572 | 572 | $hUsado = $hCabecItens; |
| 573 | - $i --; // decrementa para readicionar o item que não coube nessa pagina na outra. |
|
| 573 | + $i--; // decrementa para readicionar o item que não coube nessa pagina na outra. |
|
| 574 | 574 | } |
| 575 | - $i ++; |
|
| 575 | + $i++; |
|
| 576 | 576 | } //fim da soma das areas de itens usadas |
| 577 | 577 | $qtdeItens = $i; //controle da quantidade de itens no DANFE |
| 578 | 578 | //montagem da primeira página |
@@ -604,7 +604,7 @@ discard block |
||
| 604 | 604 | $formaPag = []; |
| 605 | 605 | if (isset($this->detPag) && $this->detPag->length > 0) { |
| 606 | 606 | foreach ($this->detPag as $k => $d) { |
| 607 | - $fPag = ! empty($this->detPag->item($k)->getElementsByTagName('tPag')->item(0)->nodeValue) |
|
| 607 | + $fPag = !empty($this->detPag->item($k)->getElementsByTagName('tPag')->item(0)->nodeValue) |
|
| 608 | 608 | ? $this->detPag->item($k)->getElementsByTagName('tPag')->item(0)->nodeValue |
| 609 | 609 | : '0'; |
| 610 | 610 | $formaPag[$fPag] = $fPag; |
@@ -648,7 +648,7 @@ discard block |
||
| 648 | 648 | } |
| 649 | 649 | |
| 650 | 650 | //loop para páginas seguintes |
| 651 | - for ($n = 2; $n <= $totPag; $n ++) { |
|
| 651 | + for ($n = 2; $n <= $totPag; $n++) { |
|
| 652 | 652 | // fixa as margens |
| 653 | 653 | $this->pdf->setMargins($this->margesq, $this->margsup); |
| 654 | 654 | //adiciona nova página |
@@ -672,7 +672,7 @@ discard block |
||
| 672 | 672 | } |
| 673 | 673 | //se estiver na última página e ainda restar itens para inserir, adiciona mais uma página |
| 674 | 674 | if ($n == $totPag && $this->qtdeItensProc < $qtdeItens) { |
| 675 | - $totPag ++; |
|
| 675 | + $totPag++; |
|
| 676 | 676 | } |
| 677 | 677 | } |
| 678 | 678 | } |
@@ -701,7 +701,7 @@ discard block |
||
| 701 | 701 | if ($startPos === false) { |
| 702 | 702 | return $cdata; |
| 703 | 703 | } |
| 704 | - for ($x = $len; $x > 0; $x --) { |
|
| 704 | + for ($x = $len; $x > 0; $x--) { |
|
| 705 | 705 | if (substr($cdata, $x, 1) == '>') { |
| 706 | 706 | $endPos = $x; |
| 707 | 707 | break; |
@@ -794,15 +794,15 @@ discard block |
||
| 794 | 794 | //grupo CADATA infCpl |
| 795 | 795 | $t = $dom->getElementsByTagName('transmissor')->item(0); |
| 796 | 796 | $r = $dom->getElementsByTagName('receptor')->item(0); |
| 797 | - $versao = ! empty($dom->getElementsByTagName('versao')->item(0)->nodeValue) ? |
|
| 797 | + $versao = !empty($dom->getElementsByTagName('versao')->item(0)->nodeValue) ? |
|
| 798 | 798 | 'Versao:' . $dom->getElementsByTagName('versao')->item(0)->nodeValue . ' ' : ''; |
| 799 | - $especieNF = ! empty($dom->getElementsByTagName('especieNF')->item(0)->nodeValue) ? |
|
| 799 | + $especieNF = !empty($dom->getElementsByTagName('especieNF')->item(0)->nodeValue) ? |
|
| 800 | 800 | 'Especie:' . $dom->getElementsByTagName('especieNF')->item(0)->nodeValue . ' ' : ''; |
| 801 | - $fabEntrega = ! empty($dom->getElementsByTagName('fabEntrega')->item(0)->nodeValue) ? |
|
| 801 | + $fabEntrega = !empty($dom->getElementsByTagName('fabEntrega')->item(0)->nodeValue) ? |
|
| 802 | 802 | 'Entrega:' . $dom->getElementsByTagName('fabEntrega')->item(0)->nodeValue . ' ' : ''; |
| 803 | - $dca = ! empty($dom->getElementsByTagName('dca')->item(0)->nodeValue) ? |
|
| 803 | + $dca = !empty($dom->getElementsByTagName('dca')->item(0)->nodeValue) ? |
|
| 804 | 804 | 'dca:' . $dom->getElementsByTagName('dca')->item(0)->nodeValue . ' ' : ''; |
| 805 | - $texto .= "" . $versao . $especieNF . $fabEntrega . $dca; |
|
| 805 | + $texto .= "" . $versao . $especieNF . $fabEntrega . $dca; |
|
| 806 | 806 | if (isset($t)) { |
| 807 | 807 | if ($t->hasAttributes()) { |
| 808 | 808 | $texto .= " Transmissor "; |
@@ -834,7 +834,7 @@ discard block |
||
| 834 | 834 | */ |
| 835 | 835 | protected function statusNFe() |
| 836 | 836 | { |
| 837 | - if (! isset($this->nfeProc)) { |
|
| 837 | + if (!isset($this->nfeProc)) { |
|
| 838 | 838 | return ['status' => false, 'message' => 'NFe NÃO PROTOCOLADA']; |
| 839 | 839 | } |
| 840 | 840 | if ($this->getTagValue($this->ide, "tpAmb") == '2') { |
@@ -863,7 +863,7 @@ discard block |
||
| 863 | 863 | |
| 864 | 864 | protected function notaDPEC() |
| 865 | 865 | { |
| 866 | - return ! empty($this->numdepec); |
|
| 866 | + return !empty($this->numdepec); |
|
| 867 | 867 | } |
| 868 | 868 | |
| 869 | 869 | /** |
@@ -912,7 +912,7 @@ discard block |
||
| 912 | 912 | //se for right separa 2/3 para os dados e o terço seguinte para o logo |
| 913 | 913 | //se não houver logo centraliza dos dados do emitente |
| 914 | 914 | // coloca o logo |
| 915 | - if (! empty($this->logomarca)) { |
|
| 915 | + if (!empty($this->logomarca)) { |
|
| 916 | 916 | $logoInfo = getimagesize($this->logomarca); |
| 917 | 917 | //largura da imagem em mm |
| 918 | 918 | $logoWmm = ($logoInfo[0] / 72) * 25.4; |
@@ -968,7 +968,7 @@ discard block |
||
| 968 | 968 | //endereço |
| 969 | 969 | $y1 = $y1 + 5; |
| 970 | 970 | $aFont = ['font' => $this->fontePadrao, 'size' => 8, 'style' => '']; |
| 971 | - $fone = ! empty($this->enderEmit->getElementsByTagName("fone")->item(0)->nodeValue) |
|
| 971 | + $fone = !empty($this->enderEmit->getElementsByTagName("fone")->item(0)->nodeValue) |
|
| 972 | 972 | ? $this->enderEmit->getElementsByTagName("fone")->item(0)->nodeValue |
| 973 | 973 | : ''; |
| 974 | 974 | $lgr = $this->getTagValue($this->enderEmit, "xLgr"); |
@@ -987,8 +987,8 @@ discard block |
||
| 987 | 987 | |
| 988 | 988 | //#################################################################################### |
| 989 | 989 | //coluna central Danfe |
| 990 | - $x += $w; |
|
| 991 | - $w = round($maxW * 0.17, 0);//35; |
|
| 990 | + $x += $w; |
|
| 991 | + $w = round($maxW * 0.17, 0); //35; |
|
| 992 | 992 | $w2 = $w; |
| 993 | 993 | $h = 32; |
| 994 | 994 | $this->pdf->textBox($x, $y, $w, $h); |
@@ -1045,8 +1045,8 @@ discard block |
||
| 1045 | 1045 | |
| 1046 | 1046 | //#################################################################################### |
| 1047 | 1047 | //coluna codigo de barras |
| 1048 | - $x += $w; |
|
| 1049 | - $w = ($maxW - $w1 - $w2);//85; |
|
| 1048 | + $x += $w; |
|
| 1049 | + $w = ($maxW - $w1 - $w2); //85; |
|
| 1050 | 1050 | $w3 = $w; |
| 1051 | 1051 | $h = 32; |
| 1052 | 1052 | $this->pdf->textBox($x, $y, $w, $h); |
@@ -1076,7 +1076,7 @@ discard block |
||
| 1076 | 1076 | } else { |
| 1077 | 1077 | $cabecalhoProtoAutorizacao = 'PROTOCOLO DE AUTORIZAÇÃO DE USO'; |
| 1078 | 1078 | } |
| 1079 | - if (($this->tpEmis == 2 || $this->tpEmis == 5) && ! $this->notaDpec()) { |
|
| 1079 | + if (($this->tpEmis == 2 || $this->tpEmis == 5) && !$this->notaDpec()) { |
|
| 1080 | 1080 | $cabecalhoProtoAutorizacao = "DADOS DA NF-E"; |
| 1081 | 1081 | $chaveContingencia = $this->geraChaveAdicionalDeContingencia(); |
| 1082 | 1082 | $this->pdf->setFillColor(0, 0, 0); |
@@ -1108,7 +1108,7 @@ discard block |
||
| 1108 | 1108 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
| 1109 | 1109 | $w = $w1 + $w2; |
| 1110 | 1110 | $y = $oldY; |
| 1111 | - $oldY += $h; |
|
| 1111 | + $oldY += $h; |
|
| 1112 | 1112 | $x = $oldX; |
| 1113 | 1113 | $h = 7; |
| 1114 | 1114 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, ''); |
@@ -1125,7 +1125,7 @@ discard block |
||
| 1125 | 1125 | // NOTA : DANFE sem protocolo deve existir somente no caso de contingência !!! |
| 1126 | 1126 | // Além disso, existem várias NFes em contingência que eu recebo com protocolo de autorização. |
| 1127 | 1127 | // Na minha opinião, deveríamos mostra-lo, mas o manual da NFe v4.01 diz outra coisa... |
| 1128 | - if (($this->tpEmis == 2 || $this->tpEmis == 5) && ! $this->notaDpec()) { |
|
| 1128 | + if (($this->tpEmis == 2 || $this->tpEmis == 5) && !$this->notaDpec()) { |
|
| 1129 | 1129 | $aFont = ['font' => $this->fontePadrao, 'size' => 8, 'style' => 'B']; |
| 1130 | 1130 | $texto = $this->formatField( |
| 1131 | 1131 | $chaveContingencia, |
@@ -1139,7 +1139,7 @@ discard block |
||
| 1139 | 1139 | $cStat = ''; |
| 1140 | 1140 | } else { |
| 1141 | 1141 | if (isset($this->nfeProc)) { |
| 1142 | - $texto = ! empty($this->nfeProc->getElementsByTagName("nProt")->item(0)->nodeValue) |
|
| 1142 | + $texto = !empty($this->nfeProc->getElementsByTagName("nProt")->item(0)->nodeValue) |
|
| 1143 | 1143 | ? $this->nfeProc->getElementsByTagName("nProt")->item(0)->nodeValue |
| 1144 | 1144 | : ''; |
| 1145 | 1145 | $tsHora = $this->toTimestamp( |
@@ -1169,7 +1169,7 @@ discard block |
||
| 1169 | 1169 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
| 1170 | 1170 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, ''); |
| 1171 | 1171 | //INSCRIÇÃO MUNICIPAL |
| 1172 | - $x += $w; |
|
| 1172 | + $x += $w; |
|
| 1173 | 1173 | $texto = 'INSCRIÇÃO MUNICIPAL'; |
| 1174 | 1174 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
| 1175 | 1175 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, ''); |
@@ -1177,29 +1177,29 @@ discard block |
||
| 1177 | 1177 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
| 1178 | 1178 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, ''); |
| 1179 | 1179 | //INSCRIÇÃO ESTADUAL DO SUBST. TRIBUT. |
| 1180 | - $x += $w; |
|
| 1180 | + $x += $w; |
|
| 1181 | 1181 | $texto = 'INSCRIÇÃO ESTADUAL DO SUBST. TRIBUT.'; |
| 1182 | 1182 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
| 1183 | 1183 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, ''); |
| 1184 | - $texto = ! empty($this->emit->getElementsByTagName("IEST")->item(0)->nodeValue) |
|
| 1184 | + $texto = !empty($this->emit->getElementsByTagName("IEST")->item(0)->nodeValue) |
|
| 1185 | 1185 | ? $this->emit->getElementsByTagName("IEST")->item(0)->nodeValue |
| 1186 | 1186 | : ''; |
| 1187 | 1187 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
| 1188 | 1188 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, ''); |
| 1189 | 1189 | //CNPJ |
| 1190 | - $x += $w; |
|
| 1190 | + $x += $w; |
|
| 1191 | 1191 | $w = ($maxW - (3 * $w)); |
| 1192 | 1192 | $texto = 'CNPJ'; |
| 1193 | 1193 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
| 1194 | 1194 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, ''); |
| 1195 | 1195 | //Pegando valor do CPF/CNPJ |
| 1196 | - if (! empty($this->emit->getElementsByTagName("CNPJ")->item(0)->nodeValue)) { |
|
| 1196 | + if (!empty($this->emit->getElementsByTagName("CNPJ")->item(0)->nodeValue)) { |
|
| 1197 | 1197 | $texto = $this->formatField( |
| 1198 | 1198 | $this->emit->getElementsByTagName("CNPJ")->item(0)->nodeValue, |
| 1199 | 1199 | "###.###.###/####-##" |
| 1200 | 1200 | ); |
| 1201 | 1201 | } else { |
| 1202 | - $texto = ! empty($this->emit->getElementsByTagName("CPF")->item(0)->nodeValue) |
|
| 1202 | + $texto = !empty($this->emit->getElementsByTagName("CPF")->item(0)->nodeValue) |
|
| 1203 | 1203 | ? $this->formatField( |
| 1204 | 1204 | $this->emit->getElementsByTagName("CPF")->item(0)->nodeValue, |
| 1205 | 1205 | "###.###.###-##" |
@@ -1214,7 +1214,7 @@ discard block |
||
| 1214 | 1214 | $tpAmb = $this->ide->getElementsByTagName('tpAmb')->item(0)->nodeValue; |
| 1215 | 1215 | //indicar cancelamento |
| 1216 | 1216 | $resp = $this->statusNFe(); |
| 1217 | - if (! $resp['status']) { |
|
| 1217 | + if (!$resp['status']) { |
|
| 1218 | 1218 | $x = 10; |
| 1219 | 1219 | $y = $this->hPrint - 130; |
| 1220 | 1220 | $h = 25; |
@@ -1284,7 +1284,7 @@ discard block |
||
| 1284 | 1284 | //NOME / RAZÃO SOCIAL |
| 1285 | 1285 | $w = round($maxW * 0.61, 0); |
| 1286 | 1286 | $w1 = $w; |
| 1287 | - $y += 3; |
|
| 1287 | + $y += 3; |
|
| 1288 | 1288 | $texto = 'NOME / RAZÃO SOCIAL'; |
| 1289 | 1289 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
| 1290 | 1290 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, ''); |
@@ -1296,20 +1296,20 @@ discard block |
||
| 1296 | 1296 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'L', 1, ''); |
| 1297 | 1297 | } |
| 1298 | 1298 | //CNPJ / CPF |
| 1299 | - $x += $w; |
|
| 1299 | + $x += $w; |
|
| 1300 | 1300 | $w = round($maxW * 0.23, 0); |
| 1301 | 1301 | $w2 = $w; |
| 1302 | 1302 | $texto = 'CNPJ / CPF'; |
| 1303 | 1303 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
| 1304 | 1304 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, ''); |
| 1305 | 1305 | //Pegando valor do CPF/CNPJ |
| 1306 | - if (! empty($this->dest->getElementsByTagName("CNPJ")->item(0)->nodeValue)) { |
|
| 1306 | + if (!empty($this->dest->getElementsByTagName("CNPJ")->item(0)->nodeValue)) { |
|
| 1307 | 1307 | $texto = $this->formatField( |
| 1308 | 1308 | $this->dest->getElementsByTagName("CNPJ")->item(0)->nodeValue, |
| 1309 | 1309 | "###.###.###/####-##" |
| 1310 | 1310 | ); |
| 1311 | 1311 | } else { |
| 1312 | - $texto = ! empty($this->dest->getElementsByTagName("CPF")->item(0)->nodeValue) |
|
| 1312 | + $texto = !empty($this->dest->getElementsByTagName("CPF")->item(0)->nodeValue) |
|
| 1313 | 1313 | ? $this->formatField( |
| 1314 | 1314 | $this->dest->getElementsByTagName("CPF")->item(0)->nodeValue, |
| 1315 | 1315 | "###.###.###-##" |
@@ -1319,17 +1319,17 @@ discard block |
||
| 1319 | 1319 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
| 1320 | 1320 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, ''); |
| 1321 | 1321 | //DATA DA EMISSÃO |
| 1322 | - $x += $w; |
|
| 1322 | + $x += $w; |
|
| 1323 | 1323 | $w = $maxW - ($w1 + $w2); |
| 1324 | 1324 | $wx = $w; |
| 1325 | 1325 | $texto = 'DATA DA EMISSÃO'; |
| 1326 | 1326 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
| 1327 | 1327 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, ''); |
| 1328 | - $dEmi = ! empty($this->ide->getElementsByTagName("dEmi")->item(0)->nodeValue) |
|
| 1328 | + $dEmi = !empty($this->ide->getElementsByTagName("dEmi")->item(0)->nodeValue) |
|
| 1329 | 1329 | ? $this->ide->getElementsByTagName("dEmi")->item(0)->nodeValue |
| 1330 | 1330 | : ''; |
| 1331 | 1331 | if ($dEmi == '') { |
| 1332 | - $dEmi = ! empty($this->ide->getElementsByTagName("dhEmi")->item(0)->nodeValue) |
|
| 1332 | + $dEmi = !empty($this->ide->getElementsByTagName("dhEmi")->item(0)->nodeValue) |
|
| 1333 | 1333 | ? $this->ide->getElementsByTagName("dhEmi")->item(0)->nodeValue |
| 1334 | 1334 | : ''; |
| 1335 | 1335 | $aDemi = explode('T', $dEmi); |
@@ -1345,7 +1345,7 @@ discard block |
||
| 1345 | 1345 | //ENDEREÇO |
| 1346 | 1346 | $w = round($maxW * 0.47, 0); |
| 1347 | 1347 | $w1 = $w; |
| 1348 | - $y += $h; |
|
| 1348 | + $y += $h; |
|
| 1349 | 1349 | $x = $oldX; |
| 1350 | 1350 | $texto = 'ENDEREÇO'; |
| 1351 | 1351 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
@@ -1357,7 +1357,7 @@ discard block |
||
| 1357 | 1357 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
| 1358 | 1358 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'L', 0, '', true); |
| 1359 | 1359 | //BAIRRO / DISTRITO |
| 1360 | - $x += $w; |
|
| 1360 | + $x += $w; |
|
| 1361 | 1361 | $w = round($maxW * 0.21, 0); |
| 1362 | 1362 | $w2 = $w; |
| 1363 | 1363 | $texto = 'BAIRRO / DISTRITO'; |
@@ -1367,29 +1367,29 @@ discard block |
||
| 1367 | 1367 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
| 1368 | 1368 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, ''); |
| 1369 | 1369 | //CEP |
| 1370 | - $x += $w; |
|
| 1370 | + $x += $w; |
|
| 1371 | 1371 | $w = $maxW - $w1 - $w2 - $wx; |
| 1372 | 1372 | $w2 = $w; |
| 1373 | 1373 | $texto = 'CEP'; |
| 1374 | 1374 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
| 1375 | 1375 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, ''); |
| 1376 | - $texto = ! empty($this->dest->getElementsByTagName("CEP")->item(0)->nodeValue) |
|
| 1376 | + $texto = !empty($this->dest->getElementsByTagName("CEP")->item(0)->nodeValue) |
|
| 1377 | 1377 | ? $this->dest->getElementsByTagName("CEP")->item(0)->nodeValue |
| 1378 | 1378 | : ''; |
| 1379 | 1379 | $texto = $this->formatField($texto, "#####-###"); |
| 1380 | 1380 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
| 1381 | 1381 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, ''); |
| 1382 | 1382 | //DATA DA SAÍDA |
| 1383 | - $x += $w; |
|
| 1383 | + $x += $w; |
|
| 1384 | 1384 | $w = $wx; |
| 1385 | 1385 | $texto = 'DATA DA SAÍDA/ENTRADA'; |
| 1386 | 1386 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
| 1387 | 1387 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, ''); |
| 1388 | - $dSaiEnt = ! empty($this->ide->getElementsByTagName("dSaiEnt")->item(0)->nodeValue) |
|
| 1388 | + $dSaiEnt = !empty($this->ide->getElementsByTagName("dSaiEnt")->item(0)->nodeValue) |
|
| 1389 | 1389 | ? $this->ide->getElementsByTagName("dSaiEnt")->item(0)->nodeValue |
| 1390 | 1390 | : ''; |
| 1391 | 1391 | if ($dSaiEnt == '') { |
| 1392 | - $dSaiEnt = ! empty($this->ide->getElementsByTagName("dhSaiEnt")->item(0)->nodeValue) |
|
| 1392 | + $dSaiEnt = !empty($this->ide->getElementsByTagName("dhSaiEnt")->item(0)->nodeValue) |
|
| 1393 | 1393 | ? $this->ide->getElementsByTagName("dhSaiEnt")->item(0)->nodeValue |
| 1394 | 1394 | : ''; |
| 1395 | 1395 | $aDsaient = explode('T', $dSaiEnt); |
@@ -1400,7 +1400,7 @@ discard block |
||
| 1400 | 1400 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, ''); |
| 1401 | 1401 | //MUNICÍPIO |
| 1402 | 1402 | $w = $w1; |
| 1403 | - $y += $h; |
|
| 1403 | + $y += $h; |
|
| 1404 | 1404 | $x = $oldX; |
| 1405 | 1405 | $texto = 'MUNICÍPIO'; |
| 1406 | 1406 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
@@ -1414,7 +1414,7 @@ discard block |
||
| 1414 | 1414 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
| 1415 | 1415 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'L', 0, ''); |
| 1416 | 1416 | //UF |
| 1417 | - $x += $w; |
|
| 1417 | + $x += $w; |
|
| 1418 | 1418 | $w = 8; |
| 1419 | 1419 | $texto = 'UF'; |
| 1420 | 1420 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
@@ -1423,19 +1423,19 @@ discard block |
||
| 1423 | 1423 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
| 1424 | 1424 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, ''); |
| 1425 | 1425 | //FONE / FAX |
| 1426 | - $x += $w; |
|
| 1426 | + $x += $w; |
|
| 1427 | 1427 | $w = round(($maxW - $w1 - $wx - 8) / 2, 0); |
| 1428 | 1428 | $w3 = $w; |
| 1429 | 1429 | $texto = 'FONE / FAX'; |
| 1430 | 1430 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
| 1431 | 1431 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, ''); |
| 1432 | - $texto = ! empty($this->dest->getElementsByTagName("fone")->item(0)->nodeValue) |
|
| 1432 | + $texto = !empty($this->dest->getElementsByTagName("fone")->item(0)->nodeValue) |
|
| 1433 | 1433 | ? $this->dest->getElementsByTagName("fone")->item(0)->nodeValue |
| 1434 | 1434 | : ''; |
| 1435 | 1435 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
| 1436 | 1436 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, ''); |
| 1437 | 1437 | //INSCRIÇÃO ESTADUAL |
| 1438 | - $x += $w; |
|
| 1438 | + $x += $w; |
|
| 1439 | 1439 | $w = $maxW - $w1 - $wx - 8 - $w3; |
| 1440 | 1440 | $texto = 'INSCRIÇÃO ESTADUAL'; |
| 1441 | 1441 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
@@ -1445,16 +1445,16 @@ discard block |
||
| 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 | //HORA DA SAÍDA |
| 1448 | - $x += $w; |
|
| 1448 | + $x += $w; |
|
| 1449 | 1449 | $w = $wx; |
| 1450 | 1450 | $texto = 'HORA 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 | - $hSaiEnt = ! empty($this->ide->getElementsByTagName("hSaiEnt")->item(0)->nodeValue) |
|
| 1453 | + $hSaiEnt = !empty($this->ide->getElementsByTagName("hSaiEnt")->item(0)->nodeValue) |
|
| 1454 | 1454 | ? $this->ide->getElementsByTagName("hSaiEnt")->item(0)->nodeValue |
| 1455 | 1455 | : ''; |
| 1456 | 1456 | if ($hSaiEnt == '') { |
| 1457 | - $dhSaiEnt = ! empty($this->ide->getElementsByTagName("dhSaiEnt")->item(0)->nodeValue) |
|
| 1457 | + $dhSaiEnt = !empty($this->ide->getElementsByTagName("dhSaiEnt")->item(0)->nodeValue) |
|
| 1458 | 1458 | ? $this->ide->getElementsByTagName("dhSaiEnt")->item(0)->nodeValue |
| 1459 | 1459 | : ''; |
| 1460 | 1460 | $tsDhSaiEnt = $this->toTimestamp($dhSaiEnt); |
@@ -1498,7 +1498,7 @@ discard block |
||
| 1498 | 1498 | //NOME / RAZÃO SOCIAL |
| 1499 | 1499 | $w = round($maxW * 0.61, 0); |
| 1500 | 1500 | $w1 = $w; |
| 1501 | - $y += 3; |
|
| 1501 | + $y += 3; |
|
| 1502 | 1502 | $texto = 'NOME / RAZÃO SOCIAL'; |
| 1503 | 1503 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
| 1504 | 1504 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, ''); |
@@ -1513,20 +1513,20 @@ discard block |
||
| 1513 | 1513 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'L', 1, ''); |
| 1514 | 1514 | } |
| 1515 | 1515 | //CNPJ / CPF |
| 1516 | - $x += $w; |
|
| 1516 | + $x += $w; |
|
| 1517 | 1517 | $w = round($maxW * 0.23, 0); |
| 1518 | 1518 | $w2 = $w; |
| 1519 | 1519 | $texto = 'CNPJ / CPF'; |
| 1520 | 1520 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
| 1521 | 1521 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, ''); |
| 1522 | 1522 | //Pegando valor do CPF/CNPJ |
| 1523 | - if (! empty($this->entrega->getElementsByTagName("CNPJ")->item(0)->nodeValue)) { |
|
| 1523 | + if (!empty($this->entrega->getElementsByTagName("CNPJ")->item(0)->nodeValue)) { |
|
| 1524 | 1524 | $texto = $this->formatField( |
| 1525 | 1525 | $this->entrega->getElementsByTagName("CNPJ")->item(0)->nodeValue, |
| 1526 | 1526 | "###.###.###/####-##" |
| 1527 | 1527 | ); |
| 1528 | 1528 | } else { |
| 1529 | - $texto = ! empty($this->entrega->getElementsByTagName("CPF")->item(0)->nodeValue) ? |
|
| 1529 | + $texto = !empty($this->entrega->getElementsByTagName("CPF")->item(0)->nodeValue) ? |
|
| 1530 | 1530 | $this->formatField( |
| 1531 | 1531 | $this->entrega->getElementsByTagName("CPF")->item(0)->nodeValue, |
| 1532 | 1532 | "###.###.###-##" |
@@ -1535,7 +1535,7 @@ discard block |
||
| 1535 | 1535 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
| 1536 | 1536 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, ''); |
| 1537 | 1537 | //INSCRIÇÃO ESTADUAL |
| 1538 | - $x += $w; |
|
| 1538 | + $x += $w; |
|
| 1539 | 1539 | $w = $maxW - ($w1 + $w2); |
| 1540 | 1540 | $wx = $w; |
| 1541 | 1541 | $texto = 'INSCRIÇÃO ESTADUAL'; |
@@ -1554,7 +1554,7 @@ discard block |
||
| 1554 | 1554 | //ENDEREÇO |
| 1555 | 1555 | $w = round($maxW * 0.355, 0) + $wx; |
| 1556 | 1556 | $w1 = $w; |
| 1557 | - $y += $h; |
|
| 1557 | + $y += $h; |
|
| 1558 | 1558 | $x = $oldX; |
| 1559 | 1559 | $texto = 'ENDEREÇO'; |
| 1560 | 1560 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
@@ -1565,7 +1565,7 @@ discard block |
||
| 1565 | 1565 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
| 1566 | 1566 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'L', 0, '', true); |
| 1567 | 1567 | //BAIRRO / DISTRITO |
| 1568 | - $x += $w; |
|
| 1568 | + $x += $w; |
|
| 1569 | 1569 | $w = round($maxW * 0.335, 0); |
| 1570 | 1570 | $w2 = $w; |
| 1571 | 1571 | $texto = 'BAIRRO / DISTRITO'; |
@@ -1575,12 +1575,12 @@ discard block |
||
| 1575 | 1575 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
| 1576 | 1576 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, ''); |
| 1577 | 1577 | //CEP |
| 1578 | - $x += $w; |
|
| 1578 | + $x += $w; |
|
| 1579 | 1579 | $w = $maxW - ($w1 + $w2); |
| 1580 | 1580 | $texto = 'CEP'; |
| 1581 | 1581 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
| 1582 | 1582 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, ''); |
| 1583 | - $texto = ! empty($this->entrega->getElementsByTagName("CEP")->item(0)->nodeValue) ? |
|
| 1583 | + $texto = !empty($this->entrega->getElementsByTagName("CEP")->item(0)->nodeValue) ? |
|
| 1584 | 1584 | $this->entrega->getElementsByTagName("CEP")->item(0)->nodeValue : ''; |
| 1585 | 1585 | $texto = $this->formatField($texto, "#####-###"); |
| 1586 | 1586 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
@@ -1588,7 +1588,7 @@ discard block |
||
| 1588 | 1588 | //MUNICÍPIO |
| 1589 | 1589 | $w = round($maxW * 0.805, 0); |
| 1590 | 1590 | $w1 = $w; |
| 1591 | - $y += $h; |
|
| 1591 | + $y += $h; |
|
| 1592 | 1592 | $x = $oldX; |
| 1593 | 1593 | $texto = 'MUNICÍPIO'; |
| 1594 | 1594 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
@@ -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', 'L', 0, ''); |
| 1602 | 1602 | //UF |
| 1603 | - $x += $w; |
|
| 1603 | + $x += $w; |
|
| 1604 | 1604 | $w = 8; |
| 1605 | 1605 | $texto = 'UF'; |
| 1606 | 1606 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
@@ -1609,12 +1609,12 @@ discard block |
||
| 1609 | 1609 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
| 1610 | 1610 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, ''); |
| 1611 | 1611 | //FONE / FAX |
| 1612 | - $x += $w; |
|
| 1612 | + $x += $w; |
|
| 1613 | 1613 | $w = $maxW - $w - $w1; |
| 1614 | 1614 | $texto = 'FONE / FAX'; |
| 1615 | 1615 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
| 1616 | 1616 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, ''); |
| 1617 | - $texto = ! empty($this->entrega->getElementsByTagName("fone")->item(0)->nodeValue) ? |
|
| 1617 | + $texto = !empty($this->entrega->getElementsByTagName("fone")->item(0)->nodeValue) ? |
|
| 1618 | 1618 | $this->entrega->getElementsByTagName("fone")->item(0)->nodeValue : ''; |
| 1619 | 1619 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
| 1620 | 1620 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, ''); |
@@ -1651,7 +1651,7 @@ discard block |
||
| 1651 | 1651 | //NOME / RAZÃO SOCIAL |
| 1652 | 1652 | $w = round($maxW * 0.61, 0); |
| 1653 | 1653 | $w1 = $w; |
| 1654 | - $y += 3; |
|
| 1654 | + $y += 3; |
|
| 1655 | 1655 | $texto = 'NOME / RAZÃO SOCIAL'; |
| 1656 | 1656 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
| 1657 | 1657 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, ''); |
@@ -1666,20 +1666,20 @@ discard block |
||
| 1666 | 1666 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'L', 1, ''); |
| 1667 | 1667 | } |
| 1668 | 1668 | //CNPJ / CPF |
| 1669 | - $x += $w; |
|
| 1669 | + $x += $w; |
|
| 1670 | 1670 | $w = round($maxW * 0.23, 0); |
| 1671 | 1671 | $w2 = $w; |
| 1672 | 1672 | $texto = 'CNPJ / CPF'; |
| 1673 | 1673 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
| 1674 | 1674 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, ''); |
| 1675 | 1675 | //Pegando valor do CPF/CNPJ |
| 1676 | - if (! empty($this->retirada->getElementsByTagName("CNPJ")->item(0)->nodeValue)) { |
|
| 1676 | + if (!empty($this->retirada->getElementsByTagName("CNPJ")->item(0)->nodeValue)) { |
|
| 1677 | 1677 | $texto = $this->formatField( |
| 1678 | 1678 | $this->retirada->getElementsByTagName("CNPJ")->item(0)->nodeValue, |
| 1679 | 1679 | "###.###.###/####-##" |
| 1680 | 1680 | ); |
| 1681 | 1681 | } else { |
| 1682 | - $texto = ! empty($this->retirada->getElementsByTagName("CPF")->item(0)->nodeValue) ? |
|
| 1682 | + $texto = !empty($this->retirada->getElementsByTagName("CPF")->item(0)->nodeValue) ? |
|
| 1683 | 1683 | $this->formatField( |
| 1684 | 1684 | $this->retirada->getElementsByTagName("CPF")->item(0)->nodeValue, |
| 1685 | 1685 | "###.###.###-##" |
@@ -1688,7 +1688,7 @@ discard block |
||
| 1688 | 1688 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
| 1689 | 1689 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, ''); |
| 1690 | 1690 | //INSCRIÇÃO ESTADUAL |
| 1691 | - $x += $w; |
|
| 1691 | + $x += $w; |
|
| 1692 | 1692 | $w = $maxW - ($w1 + $w2); |
| 1693 | 1693 | $wx = $w; |
| 1694 | 1694 | $texto = 'INSCRIÇÃO ESTADUAL'; |
@@ -1707,7 +1707,7 @@ discard block |
||
| 1707 | 1707 | //ENDEREÇO |
| 1708 | 1708 | $w = round($maxW * 0.355, 0) + $wx; |
| 1709 | 1709 | $w1 = $w; |
| 1710 | - $y += $h; |
|
| 1710 | + $y += $h; |
|
| 1711 | 1711 | $x = $oldX; |
| 1712 | 1712 | $texto = 'ENDEREÇO'; |
| 1713 | 1713 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
@@ -1718,7 +1718,7 @@ discard block |
||
| 1718 | 1718 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
| 1719 | 1719 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'L', 0, '', true); |
| 1720 | 1720 | //BAIRRO / DISTRITO |
| 1721 | - $x += $w; |
|
| 1721 | + $x += $w; |
|
| 1722 | 1722 | $w = round($maxW * 0.335, 0); |
| 1723 | 1723 | $w2 = $w; |
| 1724 | 1724 | $texto = 'BAIRRO / DISTRITO'; |
@@ -1728,12 +1728,12 @@ discard block |
||
| 1728 | 1728 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
| 1729 | 1729 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, ''); |
| 1730 | 1730 | //CEP |
| 1731 | - $x += $w; |
|
| 1731 | + $x += $w; |
|
| 1732 | 1732 | $w = $maxW - ($w1 + $w2); |
| 1733 | 1733 | $texto = 'CEP'; |
| 1734 | 1734 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
| 1735 | 1735 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, ''); |
| 1736 | - $texto = ! empty($this->retirada->getElementsByTagName("CEP")->item(0)->nodeValue) ? |
|
| 1736 | + $texto = !empty($this->retirada->getElementsByTagName("CEP")->item(0)->nodeValue) ? |
|
| 1737 | 1737 | $this->retirada->getElementsByTagName("CEP")->item(0)->nodeValue : ''; |
| 1738 | 1738 | $texto = $this->formatField($texto, "#####-###"); |
| 1739 | 1739 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
@@ -1741,7 +1741,7 @@ discard block |
||
| 1741 | 1741 | //MUNICÍPIO |
| 1742 | 1742 | $w = round($maxW * 0.805, 0); |
| 1743 | 1743 | $w1 = $w; |
| 1744 | - $y += $h; |
|
| 1744 | + $y += $h; |
|
| 1745 | 1745 | $x = $oldX; |
| 1746 | 1746 | $texto = 'MUNICÍPIO'; |
| 1747 | 1747 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
@@ -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', 'L', 0, ''); |
| 1755 | 1755 | //UF |
| 1756 | - $x += $w; |
|
| 1756 | + $x += $w; |
|
| 1757 | 1757 | $w = 8; |
| 1758 | 1758 | $texto = 'UF'; |
| 1759 | 1759 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
@@ -1762,12 +1762,12 @@ discard block |
||
| 1762 | 1762 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
| 1763 | 1763 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, ''); |
| 1764 | 1764 | //FONE / FAX |
| 1765 | - $x += $w; |
|
| 1765 | + $x += $w; |
|
| 1766 | 1766 | $w = $maxW - $w - $w1; |
| 1767 | 1767 | $texto = 'FONE / FAX'; |
| 1768 | 1768 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
| 1769 | 1769 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, ''); |
| 1770 | - $texto = ! empty($this->retirada->getElementsByTagName("fone")->item(0)->nodeValue) ? |
|
| 1770 | + $texto = !empty($this->retirada->getElementsByTagName("fone")->item(0)->nodeValue) ? |
|
| 1771 | 1771 | $this->retirada->getElementsByTagName("fone")->item(0)->nodeValue : ''; |
| 1772 | 1772 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
| 1773 | 1773 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, ''); |
@@ -1787,7 +1787,7 @@ discard block |
||
| 1787 | 1787 | if (isset($this->cobr)) { |
| 1788 | 1788 | $fat = $this->cobr->getElementsByTagName("fat")->item(0); |
| 1789 | 1789 | if (isset($fat)) { |
| 1790 | - if (! empty($this->getTagValue($this->ide, "indPag"))) { |
|
| 1790 | + if (!empty($this->getTagValue($this->ide, "indPag"))) { |
|
| 1791 | 1791 | $textoIndPag = ""; |
| 1792 | 1792 | $indPag = $this->getTagValue($this->ide, "indPag"); |
| 1793 | 1793 | if ($indPag === "0") { |
@@ -1862,7 +1862,7 @@ discard block |
||
| 1862 | 1862 | $h = 8; |
| 1863 | 1863 | $aFont = ['font' => $this->fontePadrao, 'size' => 7, 'style' => 'B']; |
| 1864 | 1864 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, ''); |
| 1865 | - $y += 3; |
|
| 1865 | + $y += 3; |
|
| 1866 | 1866 | $dups = ""; |
| 1867 | 1867 | $dupcont = 0; |
| 1868 | 1868 | $nFat = $this->dup->length; |
@@ -1896,13 +1896,13 @@ discard block |
||
| 1896 | 1896 | } |
| 1897 | 1897 | $increm = 1; |
| 1898 | 1898 | foreach ($this->dup as $k => $d) { |
| 1899 | - $nDup = ! empty($this->dup->item($k)->getElementsByTagName('nDup')->item(0)->nodeValue) |
|
| 1899 | + $nDup = !empty($this->dup->item($k)->getElementsByTagName('nDup')->item(0)->nodeValue) |
|
| 1900 | 1900 | ? $this->dup->item($k)->getElementsByTagName('nDup')->item(0)->nodeValue |
| 1901 | 1901 | : ''; |
| 1902 | - $dDup = ! empty($this->dup->item($k)->getElementsByTagName('dVenc')->item(0)->nodeValue) |
|
| 1902 | + $dDup = !empty($this->dup->item($k)->getElementsByTagName('dVenc')->item(0)->nodeValue) |
|
| 1903 | 1903 | ? $this->ymdTodmy($this->dup->item($k)->getElementsByTagName('dVenc')->item(0)->nodeValue) |
| 1904 | 1904 | : ''; |
| 1905 | - $vDup = ! empty($this->dup->item($k)->getElementsByTagName('vDup')->item(0)->nodeValue) |
|
| 1905 | + $vDup = !empty($this->dup->item($k)->getElementsByTagName('vDup')->item(0)->nodeValue) |
|
| 1906 | 1906 | ? 'R$ ' . number_format( |
| 1907 | 1907 | $this->dup->item($k)->getElementsByTagName('vDup')->item(0)->nodeValue, |
| 1908 | 1908 | 2, |
@@ -1949,7 +1949,7 @@ discard block |
||
| 1949 | 1949 | } |
| 1950 | 1950 | if ($dupcont == 0) { |
| 1951 | 1951 | $y -= 9; |
| 1952 | - $linha --; |
|
| 1952 | + $linha--; |
|
| 1953 | 1953 | } |
| 1954 | 1954 | |
| 1955 | 1955 | return ($y + $h); |
@@ -1989,7 +1989,7 @@ discard block |
||
| 1989 | 1989 | $h = 8; |
| 1990 | 1990 | $aFont = ['font' => $this->fontePadrao, 'size' => 7, 'style' => 'B']; |
| 1991 | 1991 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, ''); |
| 1992 | - $y += 3; |
|
| 1992 | + $y += 3; |
|
| 1993 | 1993 | $dups = ""; |
| 1994 | 1994 | $dupcont = 0; |
| 1995 | 1995 | if ($this->orientacao == 'P') { |
@@ -2018,7 +2018,7 @@ discard block |
||
| 2018 | 2018 | '90' => 'Sem pagamento', |
| 2019 | 2019 | '99' => 'Outros' |
| 2020 | 2020 | ]; |
| 2021 | - $bandeira = [ |
|
| 2021 | + $bandeira = [ |
|
| 2022 | 2022 | '01' => 'Visa', |
| 2023 | 2023 | '02' => 'Mastercard', |
| 2024 | 2024 | '03' => 'American', |
@@ -2031,10 +2031,10 @@ discard block |
||
| 2031 | 2031 | '99' => 'Outros' |
| 2032 | 2032 | ]; |
| 2033 | 2033 | foreach ($this->detPag as $k => $d) { |
| 2034 | - $fPag = ! empty($this->detPag->item($k)->getElementsByTagName('tPag')->item(0)->nodeValue) |
|
| 2034 | + $fPag = !empty($this->detPag->item($k)->getElementsByTagName('tPag')->item(0)->nodeValue) |
|
| 2035 | 2035 | ? $this->detPag->item($k)->getElementsByTagName('tPag')->item(0)->nodeValue |
| 2036 | 2036 | : '0'; |
| 2037 | - $vPag = ! empty($this->detPag->item($k)->getElementsByTagName('vPag')->item(0)->nodeValue) |
|
| 2037 | + $vPag = !empty($this->detPag->item($k)->getElementsByTagName('vPag')->item(0)->nodeValue) |
|
| 2038 | 2038 | ? 'R$ ' . number_format( |
| 2039 | 2039 | $this->detPag->item($k)->getElementsByTagName('vPag')->item(0)->nodeValue, |
| 2040 | 2040 | 2, |
@@ -2077,7 +2077,7 @@ discard block |
||
| 2077 | 2077 | } |
| 2078 | 2078 | if ($dupcont == 0) { |
| 2079 | 2079 | $y -= 9; |
| 2080 | - $linha --; |
|
| 2080 | + $linha--; |
|
| 2081 | 2081 | } |
| 2082 | 2082 | |
| 2083 | 2083 | return ($y + $h); |
@@ -2109,7 +2109,7 @@ discard block |
||
| 2109 | 2109 | $the_field = $this->ICMSTot->getElementsByTagName($campoImposto)->item(0); |
| 2110 | 2110 | if (isset($the_field)) { |
| 2111 | 2111 | $the_value = $the_field->nodeValue; |
| 2112 | - if (! empty($the_value)) { |
|
| 2112 | + if (!empty($the_value)) { |
|
| 2113 | 2113 | $valorImposto = number_format($the_value, 2, ",", "."); |
| 2114 | 2114 | } |
| 2115 | 2115 | } |
@@ -2138,10 +2138,10 @@ discard block |
||
| 2138 | 2138 | $x_inicial = $x; |
| 2139 | 2139 | //##################################################################### |
| 2140 | 2140 | $campos_por_linha = 9; |
| 2141 | - if (! $this->exibirPIS) { |
|
| 2142 | - $campos_por_linha --; |
|
| 2141 | + if (!$this->exibirPIS) { |
|
| 2142 | + $campos_por_linha--; |
|
| 2143 | 2143 | } |
| 2144 | - if (! $this->exibirIcmsInterestadual) { |
|
| 2144 | + if (!$this->exibirIcmsInterestadual) { |
|
| 2145 | 2145 | $campos_por_linha -= 2; |
| 2146 | 2146 | } |
| 2147 | 2147 | |
@@ -2228,12 +2228,12 @@ discard block |
||
| 2228 | 2228 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, ''); |
| 2229 | 2229 | //NOME / RAZÃO SOCIAL |
| 2230 | 2230 | $w1 = $maxW * 0.29; |
| 2231 | - $y += 3; |
|
| 2231 | + $y += 3; |
|
| 2232 | 2232 | $texto = 'NOME / RAZÃO SOCIAL'; |
| 2233 | 2233 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
| 2234 | 2234 | $this->pdf->textBox($x, $y, $w1, $h, $texto, $aFont, 'T', 'L', 1, ''); |
| 2235 | 2235 | if (isset($this->transporta)) { |
| 2236 | - $texto = ! empty($this->transporta->getElementsByTagName("xNome")->item(0)->nodeValue) |
|
| 2236 | + $texto = !empty($this->transporta->getElementsByTagName("xNome")->item(0)->nodeValue) |
|
| 2237 | 2237 | ? $this->transporta->getElementsByTagName("xNome")->item(0)->nodeValue |
| 2238 | 2238 | : ''; |
| 2239 | 2239 | } else { |
@@ -2242,12 +2242,12 @@ discard block |
||
| 2242 | 2242 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
| 2243 | 2243 | $this->pdf->textBox($x, $y, $w1, $h, $texto, $aFont, 'B', 'L', 0, ''); |
| 2244 | 2244 | //FRETE POR CONTA |
| 2245 | - $x += $w1; |
|
| 2245 | + $x += $w1; |
|
| 2246 | 2246 | $w2 = $maxW * 0.15; |
| 2247 | 2247 | $texto = 'FRETE'; |
| 2248 | 2248 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
| 2249 | 2249 | $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'T', 'L', 1, ''); |
| 2250 | - $tipoFrete = ! empty($this->transp->getElementsByTagName("modFrete")->item(0)->nodeValue) |
|
| 2250 | + $tipoFrete = !empty($this->transp->getElementsByTagName("modFrete")->item(0)->nodeValue) |
|
| 2251 | 2251 | ? $this->transp->getElementsByTagName("modFrete")->item(0)->nodeValue |
| 2252 | 2252 | : '0'; |
| 2253 | 2253 | switch ($tipoFrete) { |
@@ -2273,12 +2273,12 @@ discard block |
||
| 2273 | 2273 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
| 2274 | 2274 | $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'C', 'C', 1, ''); |
| 2275 | 2275 | //CÓDIGO ANTT |
| 2276 | - $x += $w2; |
|
| 2276 | + $x += $w2; |
|
| 2277 | 2277 | $texto = 'CÓDIGO ANTT'; |
| 2278 | 2278 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
| 2279 | 2279 | $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'T', 'L', 1, ''); |
| 2280 | 2280 | if (isset($this->veicTransp)) { |
| 2281 | - $texto = ! empty($this->veicTransp->getElementsByTagName("RNTC")->item(0)->nodeValue) |
|
| 2281 | + $texto = !empty($this->veicTransp->getElementsByTagName("RNTC")->item(0)->nodeValue) |
|
| 2282 | 2282 | ? $this->veicTransp->getElementsByTagName("RNTC")->item(0)->nodeValue |
| 2283 | 2283 | : ''; |
| 2284 | 2284 | } else { |
@@ -2287,16 +2287,16 @@ discard block |
||
| 2287 | 2287 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
| 2288 | 2288 | $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'B', 'C', 0, ''); |
| 2289 | 2289 | //PLACA DO VEÍC |
| 2290 | - $x += $w2; |
|
| 2290 | + $x += $w2; |
|
| 2291 | 2291 | $texto = 'PLACA DO VEÍCULO'; |
| 2292 | 2292 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
| 2293 | 2293 | $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'T', 'L', 1, ''); |
| 2294 | 2294 | if (isset($this->veicTransp)) { |
| 2295 | - $texto = ! empty($this->veicTransp->getElementsByTagName("placa")->item(0)->nodeValue) |
|
| 2295 | + $texto = !empty($this->veicTransp->getElementsByTagName("placa")->item(0)->nodeValue) |
|
| 2296 | 2296 | ? $this->veicTransp->getElementsByTagName("placa")->item(0)->nodeValue |
| 2297 | 2297 | : ''; |
| 2298 | 2298 | } elseif (isset($this->reboque)) { |
| 2299 | - $texto = ! empty($this->reboque->getElementsByTagName("placa")->item(0)->nodeValue) |
|
| 2299 | + $texto = !empty($this->reboque->getElementsByTagName("placa")->item(0)->nodeValue) |
|
| 2300 | 2300 | ? $this->reboque->getElementsByTagName("placa")->item(0)->nodeValue |
| 2301 | 2301 | : ''; |
| 2302 | 2302 | } else { |
@@ -2305,17 +2305,17 @@ discard block |
||
| 2305 | 2305 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
| 2306 | 2306 | $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'B', 'C', 0, ''); |
| 2307 | 2307 | //UF |
| 2308 | - $x += $w2; |
|
| 2308 | + $x += $w2; |
|
| 2309 | 2309 | $w3 = round($maxW * 0.04, 0); |
| 2310 | 2310 | $texto = 'UF'; |
| 2311 | 2311 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
| 2312 | 2312 | $this->pdf->textBox($x, $y, $w3, $h, $texto, $aFont, 'T', 'L', 1, ''); |
| 2313 | 2313 | if (isset($this->veicTransp)) { |
| 2314 | - $texto = ! empty($this->veicTransp->getElementsByTagName("UF")->item(0)->nodeValue) |
|
| 2314 | + $texto = !empty($this->veicTransp->getElementsByTagName("UF")->item(0)->nodeValue) |
|
| 2315 | 2315 | ? $this->veicTransp->getElementsByTagName("UF")->item(0)->nodeValue |
| 2316 | 2316 | : ''; |
| 2317 | 2317 | } elseif (isset($this->reboque)) { |
| 2318 | - $texto = ! empty($this->reboque->getElementsByTagName("UF")->item(0)->nodeValue) |
|
| 2318 | + $texto = !empty($this->reboque->getElementsByTagName("UF")->item(0)->nodeValue) |
|
| 2319 | 2319 | ? $this->reboque->getElementsByTagName("UF")->item(0)->nodeValue |
| 2320 | 2320 | : ''; |
| 2321 | 2321 | } else { |
@@ -2324,20 +2324,20 @@ discard block |
||
| 2324 | 2324 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
| 2325 | 2325 | $this->pdf->textBox($x, $y, $w3, $h, $texto, $aFont, 'B', 'C', 0, ''); |
| 2326 | 2326 | //CNPJ / CPF |
| 2327 | - $x += $w3; |
|
| 2327 | + $x += $w3; |
|
| 2328 | 2328 | $w = $maxW - ($w1 + 3 * $w2 + $w3); |
| 2329 | 2329 | $texto = 'CNPJ / CPF'; |
| 2330 | 2330 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
| 2331 | 2331 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, ''); |
| 2332 | 2332 | if (isset($this->transporta)) { |
| 2333 | - $texto = ! empty($this->transporta->getElementsByTagName("CNPJ")->item(0)->nodeValue) |
|
| 2333 | + $texto = !empty($this->transporta->getElementsByTagName("CNPJ")->item(0)->nodeValue) |
|
| 2334 | 2334 | ? $this->formatField( |
| 2335 | 2335 | $this->transporta->getElementsByTagName("CNPJ")->item(0)->nodeValue, |
| 2336 | 2336 | "##.###.###/####-##" |
| 2337 | 2337 | ) |
| 2338 | 2338 | : ''; |
| 2339 | 2339 | if ($texto == '') { |
| 2340 | - $texto = ! empty($this->transporta->getElementsByTagName("CPF")->item(0)->nodeValue) |
|
| 2340 | + $texto = !empty($this->transporta->getElementsByTagName("CPF")->item(0)->nodeValue) |
|
| 2341 | 2341 | ? $this->formatField( |
| 2342 | 2342 | $this->transporta->getElementsByTagName("CPF")->item(0)->nodeValue, |
| 2343 | 2343 | "###.###.###-##" |
@@ -2351,7 +2351,7 @@ discard block |
||
| 2351 | 2351 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, ''); |
| 2352 | 2352 | //##################################################################### |
| 2353 | 2353 | //ENDEREÇO |
| 2354 | - $y += $h; |
|
| 2354 | + $y += $h; |
|
| 2355 | 2355 | $x = $oldX; |
| 2356 | 2356 | $h = 7; |
| 2357 | 2357 | $w1 = $maxW * 0.44; |
@@ -2359,7 +2359,7 @@ discard block |
||
| 2359 | 2359 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
| 2360 | 2360 | $this->pdf->textBox($x, $y, $w1, $h, $texto, $aFont, 'T', 'L', 1, ''); |
| 2361 | 2361 | if (isset($this->transporta)) { |
| 2362 | - $texto = ! empty($this->transporta->getElementsByTagName("xEnder")->item(0)->nodeValue) |
|
| 2362 | + $texto = !empty($this->transporta->getElementsByTagName("xEnder")->item(0)->nodeValue) |
|
| 2363 | 2363 | ? $this->transporta->getElementsByTagName("xEnder")->item(0)->nodeValue |
| 2364 | 2364 | : ''; |
| 2365 | 2365 | } else { |
@@ -2368,13 +2368,13 @@ discard block |
||
| 2368 | 2368 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
| 2369 | 2369 | $this->pdf->textBox($x, $y, $w1, $h, $texto, $aFont, 'B', 'L', 0, ''); |
| 2370 | 2370 | //MUNICÍPIO |
| 2371 | - $x += $w1; |
|
| 2371 | + $x += $w1; |
|
| 2372 | 2372 | $w2 = round($maxW * 0.30, 0); |
| 2373 | 2373 | $texto = 'MUNICÍPIO'; |
| 2374 | 2374 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
| 2375 | 2375 | $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'T', 'L', 1, ''); |
| 2376 | 2376 | if (isset($this->transporta)) { |
| 2377 | - $texto = ! empty($this->transporta->getElementsByTagName("xMun")->item(0)->nodeValue) |
|
| 2377 | + $texto = !empty($this->transporta->getElementsByTagName("xMun")->item(0)->nodeValue) |
|
| 2378 | 2378 | ? $this->transporta->getElementsByTagName("xMun")->item(0)->nodeValue |
| 2379 | 2379 | : ''; |
| 2380 | 2380 | } else { |
@@ -2383,13 +2383,13 @@ discard block |
||
| 2383 | 2383 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
| 2384 | 2384 | $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'B', 'C', 0, ''); |
| 2385 | 2385 | //UF |
| 2386 | - $x += $w2; |
|
| 2386 | + $x += $w2; |
|
| 2387 | 2387 | $w3 = round($maxW * 0.04, 0); |
| 2388 | 2388 | $texto = 'UF'; |
| 2389 | 2389 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
| 2390 | 2390 | $this->pdf->textBox($x, $y, $w3, $h, $texto, $aFont, 'T', 'L', 1, ''); |
| 2391 | 2391 | if (isset($this->transporta)) { |
| 2392 | - $texto = ! empty($this->transporta->getElementsByTagName("UF")->item(0)->nodeValue) |
|
| 2392 | + $texto = !empty($this->transporta->getElementsByTagName("UF")->item(0)->nodeValue) |
|
| 2393 | 2393 | ? $this->transporta->getElementsByTagName("UF")->item(0)->nodeValue |
| 2394 | 2394 | : ''; |
| 2395 | 2395 | } else { |
@@ -2398,14 +2398,14 @@ discard block |
||
| 2398 | 2398 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
| 2399 | 2399 | $this->pdf->textBox($x, $y, $w3, $h, $texto, $aFont, 'B', 'C', 0, ''); |
| 2400 | 2400 | //INSCRIÇÃO ESTADUAL |
| 2401 | - $x += $w3; |
|
| 2401 | + $x += $w3; |
|
| 2402 | 2402 | $w = $maxW - ($w1 + $w2 + $w3); |
| 2403 | 2403 | $texto = 'INSCRIÇÃO ESTADUAL'; |
| 2404 | 2404 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
| 2405 | 2405 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, ''); |
| 2406 | 2406 | $texto = ''; |
| 2407 | 2407 | if (isset($this->transporta)) { |
| 2408 | - if (! empty($this->transporta->getElementsByTagName("IE")->item(0)->nodeValue)) { |
|
| 2408 | + if (!empty($this->transporta->getElementsByTagName("IE")->item(0)->nodeValue)) { |
|
| 2409 | 2409 | $texto = $this->transporta->getElementsByTagName("IE")->item(0)->nodeValue; |
| 2410 | 2410 | } |
| 2411 | 2411 | } |
@@ -2421,13 +2421,13 @@ discard block |
||
| 2421 | 2421 | $pesoBruto = 0; |
| 2422 | 2422 | $pesoLiquido = 0; |
| 2423 | 2423 | foreach ($volumes as $volume) { |
| 2424 | - $quantidade += ! empty($volume->getElementsByTagName("qVol")->item(0)->nodeValue) ? |
|
| 2424 | + $quantidade += !empty($volume->getElementsByTagName("qVol")->item(0)->nodeValue) ? |
|
| 2425 | 2425 | $volume->getElementsByTagName("qVol")->item(0)->nodeValue : 0; |
| 2426 | - $pesoBruto += ! empty($volume->getElementsByTagName("pesoB")->item(0)->nodeValue) ? |
|
| 2426 | + $pesoBruto += !empty($volume->getElementsByTagName("pesoB")->item(0)->nodeValue) ? |
|
| 2427 | 2427 | $volume->getElementsByTagName("pesoB")->item(0)->nodeValue : 0; |
| 2428 | - $pesoLiquido += ! empty($volume->getElementsByTagName("pesoL")->item(0)->nodeValue) ? |
|
| 2428 | + $pesoLiquido += !empty($volume->getElementsByTagName("pesoL")->item(0)->nodeValue) ? |
|
| 2429 | 2429 | $volume->getElementsByTagName("pesoL")->item(0)->nodeValue : 0; |
| 2430 | - $texto = ! empty($this->transp->getElementsByTagName("esp")->item(0)->nodeValue) ? |
|
| 2430 | + $texto = !empty($this->transp->getElementsByTagName("esp")->item(0)->nodeValue) ? |
|
| 2431 | 2431 | $this->transp->getElementsByTagName("esp")->item(0)->nodeValue : ''; |
| 2432 | 2432 | if ($texto != $especie && $especie != '') { |
| 2433 | 2433 | //tem várias especies |
@@ -2435,7 +2435,7 @@ discard block |
||
| 2435 | 2435 | } else { |
| 2436 | 2436 | $especie = $texto; |
| 2437 | 2437 | } |
| 2438 | - $texto = ! empty($this->transp->getElementsByTagName("marca")->item(0)->nodeValue) |
|
| 2438 | + $texto = !empty($this->transp->getElementsByTagName("marca")->item(0)->nodeValue) |
|
| 2439 | 2439 | ? $this->transp->getElementsByTagName("marca")->item(0)->nodeValue |
| 2440 | 2440 | : ''; |
| 2441 | 2441 | if ($texto != $marca && $marca != '') { |
@@ -2444,7 +2444,7 @@ discard block |
||
| 2444 | 2444 | } else { |
| 2445 | 2445 | $marca = $texto; |
| 2446 | 2446 | } |
| 2447 | - $texto = ! empty($this->transp->getElementsByTagName("nVol")->item(0)->nodeValue) |
|
| 2447 | + $texto = !empty($this->transp->getElementsByTagName("nVol")->item(0)->nodeValue) |
|
| 2448 | 2448 | ? $this->transp->getElementsByTagName("nVol")->item(0)->nodeValue |
| 2449 | 2449 | : ''; |
| 2450 | 2450 | if ($texto != $numero && $numero != '') { |
@@ -2457,20 +2457,20 @@ discard block |
||
| 2457 | 2457 | |
| 2458 | 2458 | //##################################################################### |
| 2459 | 2459 | //QUANTIDADE |
| 2460 | - $y += $h; |
|
| 2460 | + $y += $h; |
|
| 2461 | 2461 | $x = $oldX; |
| 2462 | 2462 | $h = 7; |
| 2463 | 2463 | $w1 = round($maxW * 0.10, 0); |
| 2464 | 2464 | $texto = 'QUANTIDADE'; |
| 2465 | 2465 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
| 2466 | 2466 | $this->pdf->textBox($x, $y, $w1, $h, $texto, $aFont, 'T', 'L', 1, ''); |
| 2467 | - if (! empty($quantidade)) { |
|
| 2467 | + if (!empty($quantidade)) { |
|
| 2468 | 2468 | $texto = $quantidade; |
| 2469 | 2469 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
| 2470 | 2470 | $this->pdf->textBox($x, $y, $w1, $h, $texto, $aFont, 'B', 'C', 0, ''); |
| 2471 | 2471 | } |
| 2472 | 2472 | //ESPÉCIE |
| 2473 | - $x += $w1; |
|
| 2473 | + $x += $w1; |
|
| 2474 | 2474 | $w2 = round($maxW * 0.17, 0); |
| 2475 | 2475 | $texto = 'ESPÉCIE'; |
| 2476 | 2476 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
@@ -2479,16 +2479,16 @@ discard block |
||
| 2479 | 2479 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
| 2480 | 2480 | $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'B', 'C', 0, ''); |
| 2481 | 2481 | //MARCA |
| 2482 | - $x += $w2; |
|
| 2482 | + $x += $w2; |
|
| 2483 | 2483 | $texto = 'MARCA'; |
| 2484 | 2484 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
| 2485 | 2485 | $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'T', 'L', 1, ''); |
| 2486 | - $texto = ! empty($this->transp->getElementsByTagName("marca")->item(0)->nodeValue) ? |
|
| 2486 | + $texto = !empty($this->transp->getElementsByTagName("marca")->item(0)->nodeValue) ? |
|
| 2487 | 2487 | $this->transp->getElementsByTagName("marca")->item(0)->nodeValue : ''; |
| 2488 | 2488 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
| 2489 | 2489 | $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'B', 'C', 0, ''); |
| 2490 | 2490 | //NUMERAÇÃO |
| 2491 | - $x += $w2; |
|
| 2491 | + $x += $w2; |
|
| 2492 | 2492 | $texto = 'NUMERAÇÃO'; |
| 2493 | 2493 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
| 2494 | 2494 | $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'T', 'L', 1, ''); |
@@ -2496,7 +2496,7 @@ discard block |
||
| 2496 | 2496 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
| 2497 | 2497 | $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'B', 'C', 0, ''); |
| 2498 | 2498 | //PESO BRUTO |
| 2499 | - $x += $w2; |
|
| 2499 | + $x += $w2; |
|
| 2500 | 2500 | $w3 = round($maxW * 0.20, 0); |
| 2501 | 2501 | $texto = 'PESO BRUTO'; |
| 2502 | 2502 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
@@ -2509,7 +2509,7 @@ discard block |
||
| 2509 | 2509 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
| 2510 | 2510 | $this->pdf->textBox($x, $y, $w3, $h, $texto, $aFont, 'B', 'R', 0, ''); |
| 2511 | 2511 | //PESO LÍQUIDO |
| 2512 | - $x += $w3; |
|
| 2512 | + $x += $w3; |
|
| 2513 | 2513 | $w = $maxW - ($w1 + 3 * $w2 + $w3); |
| 2514 | 2514 | $texto = 'PESO LÍQUIDO'; |
| 2515 | 2515 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
@@ -2529,11 +2529,11 @@ discard block |
||
| 2529 | 2529 | protected function descricaoProdutoHelper($origem, $campo, $formato) |
| 2530 | 2530 | { |
| 2531 | 2531 | $valor_original = $origem->getElementsByTagName($campo)->item(0); |
| 2532 | - if (! isset($valor_original)) { |
|
| 2532 | + if (!isset($valor_original)) { |
|
| 2533 | 2533 | return ""; |
| 2534 | 2534 | } |
| 2535 | 2535 | $valor_original = $valor_original->nodeValue; |
| 2536 | - $valor = ! empty($valor_original) ? number_format($valor_original, 2, ",", ".") : ''; |
|
| 2536 | + $valor = !empty($valor_original) ? number_format($valor_original, 2, ",", ".") : ''; |
|
| 2537 | 2537 | |
| 2538 | 2538 | if ($valor != "") { |
| 2539 | 2539 | return sprintf($formato, $valor); |
@@ -2559,7 +2559,7 @@ discard block |
||
| 2559 | 2559 | $ICMSUFDest = $itemProd->getElementsByTagName("ICMSUFDest")->item(0); |
| 2560 | 2560 | $impostos = ''; |
| 2561 | 2561 | |
| 2562 | - if (! empty($ICMS)) { |
|
| 2562 | + if (!empty($ICMS)) { |
|
| 2563 | 2563 | $impostos .= $this->descricaoProdutoHelper($ICMS, "vBCFCP", " BcFcp=%s"); |
| 2564 | 2564 | $impostos .= $this->descricaoProdutoHelper($ICMS, "pFCP", " pFcp=%s%%"); |
| 2565 | 2565 | $impostos .= $this->descricaoProdutoHelper($ICMS, "vFCP", " vFcp=%s"); |
@@ -2575,7 +2575,7 @@ discard block |
||
| 2575 | 2575 | $impostos .= $this->descricaoProdutoHelper($ICMS, "pST", " pSt=%s"); |
| 2576 | 2576 | $impostos .= $this->descricaoProdutoHelper($ICMS, "vICMSSTRet", " VALOR ICMS ST=%s"); |
| 2577 | 2577 | } |
| 2578 | - if (! empty($ICMSUFDest)) { |
|
| 2578 | + if (!empty($ICMSUFDest)) { |
|
| 2579 | 2579 | $impostos .= $this->descricaoProdutoHelper($ICMSUFDest, "pFCPUFDest", " pFCPUFDest=%s%%"); |
| 2580 | 2580 | $impostos .= $this->descricaoProdutoHelper($ICMSUFDest, "pICMSUFDest", " pICMSUFDest=%s%%"); |
| 2581 | 2581 | $impostos .= $this->descricaoProdutoHelper($ICMSUFDest, "pICMSInterPart", " pICMSInterPart=%s%%"); |
@@ -2583,20 +2583,20 @@ discard block |
||
| 2583 | 2583 | $impostos .= $this->descricaoProdutoHelper($ICMSUFDest, "vICMSUFDest", " vICMSUFDest=%s"); |
| 2584 | 2584 | $impostos .= $this->descricaoProdutoHelper($ICMSUFDest, "vICMSUFRemet", " vICMSUFRemet=%s"); |
| 2585 | 2585 | } |
| 2586 | - $infAdProd = ! empty($itemProd->getElementsByTagName('infAdProd')->item(0)->nodeValue) |
|
| 2586 | + $infAdProd = !empty($itemProd->getElementsByTagName('infAdProd')->item(0)->nodeValue) |
|
| 2587 | 2587 | ? substr( |
| 2588 | 2588 | $this->anfaveaDANFE($itemProd->getElementsByTagName('infAdProd')->item(0)->nodeValue), |
| 2589 | 2589 | 0, |
| 2590 | 2590 | 500 |
| 2591 | 2591 | ) |
| 2592 | 2592 | : ''; |
| 2593 | - if (! empty($infAdProd)) { |
|
| 2593 | + if (!empty($infAdProd)) { |
|
| 2594 | 2594 | $infAdProd = trim($infAdProd); |
| 2595 | 2595 | $infAdProd .= ' '; |
| 2596 | 2596 | } |
| 2597 | 2597 | $loteTxt = ''; |
| 2598 | 2598 | $rastro = $prod->getElementsByTagName("med"); |
| 2599 | - if (! empty($prod->getElementsByTagName("rastro"))) { |
|
| 2599 | + if (!empty($prod->getElementsByTagName("rastro"))) { |
|
| 2600 | 2600 | $rastro = $prod->getElementsByTagName("rastro"); |
| 2601 | 2601 | $i = 0; |
| 2602 | 2602 | while ($i < $rastro->length) { |
@@ -2605,14 +2605,14 @@ discard block |
||
| 2605 | 2605 | $loteTxt .= $this->getTagDate($rastro->item($i), 'dFab', ' Fab: '); |
| 2606 | 2606 | $loteTxt .= $this->getTagDate($rastro->item($i), 'dVal', ' Val: '); |
| 2607 | 2607 | $loteTxt .= $this->getTagValue($rastro->item($i), 'vPMC', ' PMC: '); |
| 2608 | - $i ++; |
|
| 2608 | + $i++; |
|
| 2609 | 2609 | } |
| 2610 | 2610 | if ($loteTxt != '') { |
| 2611 | 2611 | $loteTxt .= ' '; |
| 2612 | 2612 | } |
| 2613 | 2613 | } |
| 2614 | 2614 | //NT2013.006 FCI |
| 2615 | - $nFCI = (! empty($itemProd->getElementsByTagName('nFCI')->item(0)->nodeValue)) ? |
|
| 2615 | + $nFCI = (!empty($itemProd->getElementsByTagName('nFCI')->item(0)->nodeValue)) ? |
|
| 2616 | 2616 | ' FCI:' . $itemProd->getElementsByTagName('nFCI')->item(0)->nodeValue : ''; |
| 2617 | 2617 | $tmp_ad = $infAdProd . ($this->descProdInfoComplemento ? $loteTxt . $impostos . $nFCI : ''); |
| 2618 | 2618 | $texto = $prod->getElementsByTagName("xProd")->item(0)->nodeValue |
@@ -2662,7 +2662,7 @@ discard block |
||
| 2662 | 2662 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, ''); |
| 2663 | 2663 | $y += 3; |
| 2664 | 2664 | //desenha a caixa dos dados dos itens da NF |
| 2665 | - $hmax += 1; |
|
| 2665 | + $hmax += 1; |
|
| 2666 | 2666 | $texto = ''; |
| 2667 | 2667 | $this->pdf->textBox($x, $y, $w, $hmax); |
| 2668 | 2668 | //################################################################################## |
@@ -2675,101 +2675,101 @@ discard block |
||
| 2675 | 2675 | $this->pdf->textBox($x, $y, $w1, $h, $texto, $aFont, 'C', 'C', 0, '', false); |
| 2676 | 2676 | $this->pdf->line($x + $w1, $y, $x + $w1, $y + $hmax); |
| 2677 | 2677 | //DESCRIÇÃO DO PRODUTO / SERVIÇO |
| 2678 | - $x += $w1; |
|
| 2678 | + $x += $w1; |
|
| 2679 | 2679 | $w2 = round($w * 0.25, 0); |
| 2680 | 2680 | $texto = 'DESCRIÇÃO DO PRODUTO / SERVIÇO'; |
| 2681 | 2681 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
| 2682 | 2682 | $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'C', 'C', 0, '', false); |
| 2683 | 2683 | $this->pdf->line($x + $w2, $y, $x + $w2, $y + $hmax); |
| 2684 | 2684 | //NCM/SH |
| 2685 | - $x += $w2; |
|
| 2685 | + $x += $w2; |
|
| 2686 | 2686 | $w3 = round($w * 0.06, 0); |
| 2687 | 2687 | $texto = 'NCM/SH'; |
| 2688 | 2688 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
| 2689 | 2689 | $this->pdf->textBox($x, $y, $w3, $h, $texto, $aFont, 'C', 'C', 0, '', false); |
| 2690 | 2690 | $this->pdf->line($x + $w3, $y, $x + $w3, $y + $hmax); |
| 2691 | 2691 | //O/CST ou O/CSOSN |
| 2692 | - $x += $w3; |
|
| 2692 | + $x += $w3; |
|
| 2693 | 2693 | $w4 = round($w * 0.05, 0); |
| 2694 | - $texto = 'O/CSOSN';//Regime do Simples CRT = 1 ou CRT = 2 |
|
| 2694 | + $texto = 'O/CSOSN'; //Regime do Simples CRT = 1 ou CRT = 2 |
|
| 2695 | 2695 | if ($this->getTagValue($this->emit, 'CRT') == '3') { |
| 2696 | - $texto = 'O/CST';//Regime Normal |
|
| 2696 | + $texto = 'O/CST'; //Regime Normal |
|
| 2697 | 2697 | } |
| 2698 | 2698 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
| 2699 | 2699 | $this->pdf->textBox($x, $y, $w4, $h, $texto, $aFont, 'C', 'C', 0, '', false); |
| 2700 | 2700 | $this->pdf->line($x + $w4, $y, $x + $w4, $y + $hmax); |
| 2701 | 2701 | //CFOP |
| 2702 | - $x += $w4; |
|
| 2702 | + $x += $w4; |
|
| 2703 | 2703 | $w5 = round($w * 0.04, 0); |
| 2704 | 2704 | $texto = 'CFOP'; |
| 2705 | 2705 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
| 2706 | 2706 | $this->pdf->textBox($x, $y, $w5, $h, $texto, $aFont, 'C', 'C', 0, '', false); |
| 2707 | 2707 | $this->pdf->line($x + $w5, $y, $x + $w5, $y + $hmax); |
| 2708 | 2708 | //UN |
| 2709 | - $x += $w5; |
|
| 2709 | + $x += $w5; |
|
| 2710 | 2710 | $w6 = round($w * 0.03, 0); |
| 2711 | 2711 | $texto = 'UN'; |
| 2712 | 2712 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
| 2713 | 2713 | $this->pdf->textBox($x, $y, $w6, $h, $texto, $aFont, 'C', 'C', 0, '', false); |
| 2714 | 2714 | $this->pdf->line($x + $w6, $y, $x + $w6, $y + $hmax); |
| 2715 | 2715 | //QUANT |
| 2716 | - $x += $w6; |
|
| 2716 | + $x += $w6; |
|
| 2717 | 2717 | $w7 = round($w * 0.08, 0); |
| 2718 | 2718 | $texto = 'QUANT'; |
| 2719 | 2719 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
| 2720 | 2720 | $this->pdf->textBox($x, $y, $w7, $h, $texto, $aFont, 'C', 'C', 0, '', false); |
| 2721 | 2721 | $this->pdf->line($x + $w7, $y, $x + $w7, $y + $hmax); |
| 2722 | 2722 | //VALOR UNIT |
| 2723 | - $x += $w7; |
|
| 2723 | + $x += $w7; |
|
| 2724 | 2724 | $w8 = round($w * 0.06, 0); |
| 2725 | 2725 | $texto = 'VALOR UNIT'; |
| 2726 | 2726 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
| 2727 | 2727 | $this->pdf->textBox($x, $y, $w8, $h, $texto, $aFont, 'C', 'C', 0, '', false); |
| 2728 | 2728 | $this->pdf->line($x + $w8, $y, $x + $w8, $y + $hmax); |
| 2729 | 2729 | //VALOR TOTAL |
| 2730 | - $x += $w8; |
|
| 2730 | + $x += $w8; |
|
| 2731 | 2731 | $w9 = round($w * 0.06, 0); |
| 2732 | 2732 | $texto = 'VALOR TOTAL'; |
| 2733 | 2733 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
| 2734 | 2734 | $this->pdf->textBox($x, $y, $w9, $h, $texto, $aFont, 'C', 'C', 0, '', false); |
| 2735 | 2735 | $this->pdf->line($x + $w9, $y, $x + $w9, $y + $hmax); |
| 2736 | 2736 | //VALOR DESCONTO |
| 2737 | - $x += $w9; |
|
| 2737 | + $x += $w9; |
|
| 2738 | 2738 | $w10 = round($w * 0.05, 0); |
| 2739 | 2739 | $texto = 'VALOR DESC'; |
| 2740 | 2740 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
| 2741 | 2741 | $this->pdf->textBox($x, $y, $w10, $h, $texto, $aFont, 'C', 'C', 0, '', false); |
| 2742 | 2742 | $this->pdf->line($x + $w10, $y, $x + $w10, $y + $hmax); |
| 2743 | 2743 | //B.CÁLC ICMS |
| 2744 | - $x += $w10; |
|
| 2744 | + $x += $w10; |
|
| 2745 | 2745 | $w11 = round($w * 0.06, 0); |
| 2746 | 2746 | $texto = 'B.CÁLC ICMS'; |
| 2747 | 2747 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
| 2748 | 2748 | $this->pdf->textBox($x, $y, $w11, $h, $texto, $aFont, 'C', 'C', 0, '', false); |
| 2749 | 2749 | $this->pdf->line($x + $w11, $y, $x + $w11, $y + $hmax); |
| 2750 | 2750 | //VALOR ICMS |
| 2751 | - $x += $w11; |
|
| 2751 | + $x += $w11; |
|
| 2752 | 2752 | $w12 = round($w * 0.06, 0); |
| 2753 | 2753 | $texto = 'VALOR ICMS'; |
| 2754 | 2754 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
| 2755 | 2755 | $this->pdf->textBox($x, $y, $w12, $h, $texto, $aFont, 'C', 'C', 0, '', false); |
| 2756 | 2756 | $this->pdf->line($x + $w12, $y, $x + $w12, $y + $hmax); |
| 2757 | 2757 | //VALOR IPI |
| 2758 | - $x += $w12; |
|
| 2758 | + $x += $w12; |
|
| 2759 | 2759 | $w13 = round($w * 0.05, 0); |
| 2760 | 2760 | $texto = 'VALOR IPI'; |
| 2761 | 2761 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
| 2762 | 2762 | $this->pdf->textBox($x, $y, $w13, $h, $texto, $aFont, 'C', 'C', 0, '', false); |
| 2763 | 2763 | $this->pdf->line($x + $w13, $y, $x + $w13, $y + $hmax); |
| 2764 | 2764 | //ALÍQ. ICMS |
| 2765 | - $x += $w13; |
|
| 2765 | + $x += $w13; |
|
| 2766 | 2766 | $w14 = round($w * 0.04, 0); |
| 2767 | 2767 | $texto = 'ALÍQ. ICMS'; |
| 2768 | 2768 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
| 2769 | 2769 | $this->pdf->textBox($x, $y, $w14, $h, $texto, $aFont, 'C', 'C', 0, '', false); |
| 2770 | 2770 | $this->pdf->line($x + $w14, $y, $x + $w14, $y + $hmax); |
| 2771 | 2771 | //ALÍQ. IPI |
| 2772 | - $x += $w14; |
|
| 2772 | + $x += $w14; |
|
| 2773 | 2773 | $w15 = $w - ($w1 + $w2 + $w3 + $w4 + $w5 + $w6 + $w7 + $w8 + $w9 + $w10 + $w11 + $w12 + $w13 + $w14); |
| 2774 | 2774 | $texto = 'ALÍQ. IPI'; |
| 2775 | 2775 | $this->pdf->textBox($x, $y, $w15, $h, $texto, $aFont, 'C', 'C', 0, '', false); |
@@ -2806,12 +2806,12 @@ discard block |
||
| 2806 | 2806 | // ambas as informações deverão estar expressas e identificadas no DANFE, podendo ser |
| 2807 | 2807 | // utilizada uma das linhas adicionais previstas, ou o campo de informações adicionais." |
| 2808 | 2808 | // > Manual Integração - Contribuinte 4.01 - NT2009.006, Item 7.1.5, página 91. |
| 2809 | - $mostrarUnidadeTributavel = (! empty($uTrib) && strcmp($uCom, $uTrib->nodeValue)); |
|
| 2809 | + $mostrarUnidadeTributavel = (!empty($uTrib) && strcmp($uCom, $uTrib->nodeValue)); |
|
| 2810 | 2810 | |
| 2811 | 2811 | // Informação sobre unidade de medida tributavel. |
| 2812 | 2812 | // Se não for para exibir a unidade de medida tributavel, então |
| 2813 | 2813 | // A Escrita irá começar em 0. |
| 2814 | - if (! $mostrarUnidadeTributavel) { |
|
| 2814 | + if (!$mostrarUnidadeTributavel) { |
|
| 2815 | 2815 | $yTrib = 0; |
| 2816 | 2816 | } |
| 2817 | 2817 | $h = $this->calculeHeight($thisItem, $mostrarUnidadeTributavel); |
@@ -2846,7 +2846,7 @@ discard block |
||
| 2846 | 2846 | } |
| 2847 | 2847 | $x += $w2; |
| 2848 | 2848 | //NCM |
| 2849 | - $texto = ! empty($prod->getElementsByTagName("NCM")->item(0)->nodeValue) ? |
|
| 2849 | + $texto = !empty($prod->getElementsByTagName("NCM")->item(0)->nodeValue) ? |
|
| 2850 | 2850 | $prod->getElementsByTagName("NCM")->item(0)->nodeValue : ''; |
| 2851 | 2851 | $this->pdf->textBox($x, $y, $w3, $h, $texto, $aFont, 'T', 'C', 0, ''); |
| 2852 | 2852 | $x += $w3; |
@@ -2859,11 +2859,11 @@ discard block |
||
| 2859 | 2859 | $this->pdf->textBox($x, $y, $w4, $h, $texto, $aFont, 'T', 'C', 0, ''); |
| 2860 | 2860 | } |
| 2861 | 2861 | //CFOP |
| 2862 | - $x += $w4; |
|
| 2862 | + $x += $w4; |
|
| 2863 | 2863 | $texto = $prod->getElementsByTagName("CFOP")->item(0)->nodeValue; |
| 2864 | 2864 | $this->pdf->textBox($x, $y, $w5, $h, $texto, $aFont, 'T', 'C', 0, ''); |
| 2865 | 2865 | //Unidade |
| 2866 | - $x += $w5; |
|
| 2866 | + $x += $w5; |
|
| 2867 | 2867 | $texto = $uCom; |
| 2868 | 2868 | $this->pdf->textBox($x, $y, $w6, $h, $texto, $aFont, 'T', 'C', 0, ''); |
| 2869 | 2869 | //Unidade de medida tributável |
@@ -2884,7 +2884,7 @@ discard block |
||
| 2884 | 2884 | // QTDADE Tributável |
| 2885 | 2885 | if ($mostrarUnidadeTributavel) { |
| 2886 | 2886 | $qTrib = $prod->getElementsByTagName("qTrib")->item(0); |
| 2887 | - if (! empty($qTrib)) { |
|
| 2887 | + if (!empty($qTrib)) { |
|
| 2888 | 2888 | $texto = number_format($qTrib->nodeValue, $this->qComCasasDec, ",", "."); |
| 2889 | 2889 | $this->pdf->textBox($x, $yTrib, $w7, $h, $texto, $aFont, 'T', $alinhamento, 0, ''); |
| 2890 | 2890 | } |
@@ -2897,7 +2897,7 @@ discard block |
||
| 2897 | 2897 | // Valor Unitário Tributável |
| 2898 | 2898 | if ($mostrarUnidadeTributavel) { |
| 2899 | 2899 | $vUnTrib = $prod->getElementsByTagName("vUnTrib")->item(0); |
| 2900 | - if (! empty($vUnTrib)) { |
|
| 2900 | + if (!empty($vUnTrib)) { |
|
| 2901 | 2901 | $texto = number_format($vUnTrib->nodeValue, $this->vUnComCasasDec, ",", "."); |
| 2902 | 2902 | $this->pdf->textBox($x, $yTrib, $w8, $h, $texto, $aFont, 'T', $alinhamento, 0, ''); |
| 2903 | 2903 | } |
@@ -2911,7 +2911,7 @@ discard block |
||
| 2911 | 2911 | $this->pdf->textBox($x, $y, $w9, $h, $texto, $aFont, 'T', $alinhamento, 0, ''); |
| 2912 | 2912 | $x += $w9; |
| 2913 | 2913 | //Valor do Desconto |
| 2914 | - $vdesc = ! empty($prod->getElementsByTagName("vDesc")->item(0)->nodeValue) |
|
| 2914 | + $vdesc = !empty($prod->getElementsByTagName("vDesc")->item(0)->nodeValue) |
|
| 2915 | 2915 | ? $prod->getElementsByTagName("vDesc")->item(0)->nodeValue : 0; |
| 2916 | 2916 | |
| 2917 | 2917 | $texto = number_format($vdesc, 2, ",", "."); |
@@ -2919,7 +2919,7 @@ discard block |
||
| 2919 | 2919 | //Valor da Base de calculo |
| 2920 | 2920 | $x += $w10; |
| 2921 | 2921 | if (isset($ICMS)) { |
| 2922 | - $texto = ! empty($ICMS->getElementsByTagName("vBC")->item(0)->nodeValue) |
|
| 2922 | + $texto = !empty($ICMS->getElementsByTagName("vBC")->item(0)->nodeValue) |
|
| 2923 | 2923 | ? number_format( |
| 2924 | 2924 | $ICMS->getElementsByTagName("vBC")->item(0)->nodeValue, |
| 2925 | 2925 | 2, |
@@ -2932,7 +2932,7 @@ discard block |
||
| 2932 | 2932 | //Valor do ICMS |
| 2933 | 2933 | $x += $w11; |
| 2934 | 2934 | if (isset($ICMS)) { |
| 2935 | - $texto = ! empty($ICMS->getElementsByTagName("vICMS")->item(0)->nodeValue) |
|
| 2935 | + $texto = !empty($ICMS->getElementsByTagName("vICMS")->item(0)->nodeValue) |
|
| 2936 | 2936 | ? number_format( |
| 2937 | 2937 | $ICMS->getElementsByTagName("vICMS")->item(0)->nodeValue, |
| 2938 | 2938 | 2, |
@@ -2945,7 +2945,7 @@ discard block |
||
| 2945 | 2945 | //Valor do IPI |
| 2946 | 2946 | $x += $w12; |
| 2947 | 2947 | if (isset($IPI)) { |
| 2948 | - $texto = ! empty($IPI->getElementsByTagName("vIPI")->item(0)->nodeValue) |
|
| 2948 | + $texto = !empty($IPI->getElementsByTagName("vIPI")->item(0)->nodeValue) |
|
| 2949 | 2949 | ? number_format( |
| 2950 | 2950 | $IPI->getElementsByTagName("vIPI")->item(0)->nodeValue, |
| 2951 | 2951 | 2, |
@@ -2960,7 +2960,7 @@ discard block |
||
| 2960 | 2960 | // %ICMS |
| 2961 | 2961 | $x += $w13; |
| 2962 | 2962 | if (isset($ICMS)) { |
| 2963 | - $texto = ! empty($ICMS->getElementsByTagName("pICMS")->item(0)->nodeValue) |
|
| 2963 | + $texto = !empty($ICMS->getElementsByTagName("pICMS")->item(0)->nodeValue) |
|
| 2964 | 2964 | ? number_format( |
| 2965 | 2965 | $ICMS->getElementsByTagName("pICMS")->item(0)->nodeValue, |
| 2966 | 2966 | 2, |
@@ -2973,7 +2973,7 @@ discard block |
||
| 2973 | 2973 | //%IPI |
| 2974 | 2974 | $x += $w14; |
| 2975 | 2975 | if (isset($IPI)) { |
| 2976 | - $texto = ! empty($IPI->getElementsByTagName("pIPI")->item(0)->nodeValue) |
|
| 2976 | + $texto = !empty($IPI->getElementsByTagName("pIPI")->item(0)->nodeValue) |
|
| 2977 | 2977 | ? number_format( |
| 2978 | 2978 | $IPI->getElementsByTagName("pIPI")->item(0)->nodeValue, |
| 2979 | 2979 | 2, |
@@ -2991,17 +2991,17 @@ discard block |
||
| 2991 | 2991 | $veicProd = $prod->getElementsByTagName("veicProd")->item(0); |
| 2992 | 2992 | // Tag somente é gerada para veiculo 0k, e só é permitido um veiculo por NF-e por conta do detran |
| 2993 | 2993 | // Verifica se a Tag existe |
| 2994 | - if (! empty($veicProd)) { |
|
| 2994 | + if (!empty($veicProd)) { |
|
| 2995 | 2995 | $this->dadosItenVeiculoDANFE($oldX, $y, $nInicio, $h, $prod); |
| 2996 | 2996 | } |
| 2997 | 2997 | |
| 2998 | 2998 | |
| 2999 | 2999 | $y += $h; |
| 3000 | - $i ++; |
|
| 3000 | + $i++; |
|
| 3001 | 3001 | //incrementa o controle dos itens processados. |
| 3002 | - $this->qtdeItensProc ++; |
|
| 3002 | + $this->qtdeItensProc++; |
|
| 3003 | 3003 | } else { |
| 3004 | - $i ++; |
|
| 3004 | + $i++; |
|
| 3005 | 3005 | } |
| 3006 | 3006 | } |
| 3007 | 3007 | |
@@ -3206,23 +3206,23 @@ discard block |
||
| 3206 | 3206 | $aFont = ['font' => $this->fontePadrao, 'size' => 7, 'style' => 'B']; |
| 3207 | 3207 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, ''); |
| 3208 | 3208 | //INSCRIÇÃO MUNICIPAL |
| 3209 | - $y += 3; |
|
| 3209 | + $y += 3; |
|
| 3210 | 3210 | $w = round($this->wPrint * 0.23, 0); |
| 3211 | 3211 | $texto = 'INSCRIÇÃO MUNICIPAL'; |
| 3212 | 3212 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
| 3213 | 3213 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, ''); |
| 3214 | 3214 | //inscrição municipal |
| 3215 | - $texto = ! empty($this->emit->getElementsByTagName("IM")->item(0)->nodeValue) ? |
|
| 3215 | + $texto = !empty($this->emit->getElementsByTagName("IM")->item(0)->nodeValue) ? |
|
| 3216 | 3216 | $this->emit->getElementsByTagName("IM")->item(0)->nodeValue : ''; |
| 3217 | 3217 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
| 3218 | 3218 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'L', 0, ''); |
| 3219 | 3219 | //VALOR TOTAL DOS SERVIÇOS |
| 3220 | - $x += $w; |
|
| 3220 | + $x += $w; |
|
| 3221 | 3221 | $texto = 'VALOR TOTAL DOS SERVIÇOS'; |
| 3222 | 3222 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
| 3223 | 3223 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, ''); |
| 3224 | 3224 | if (isset($this->ISSQNtot)) { |
| 3225 | - $texto = ! empty($this->ISSQNtot->getElementsByTagName("vServ")->item(0)->nodeValue) ? |
|
| 3225 | + $texto = !empty($this->ISSQNtot->getElementsByTagName("vServ")->item(0)->nodeValue) ? |
|
| 3226 | 3226 | $this->ISSQNtot->getElementsByTagName("vServ")->item(0)->nodeValue : ''; |
| 3227 | 3227 | $texto = number_format($texto, 2, ",", "."); |
| 3228 | 3228 | } else { |
@@ -3231,14 +3231,14 @@ discard block |
||
| 3231 | 3231 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
| 3232 | 3232 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'R', 0, ''); |
| 3233 | 3233 | //BASE DE CÁLCULO DO ISSQN |
| 3234 | - $x += $w; |
|
| 3234 | + $x += $w; |
|
| 3235 | 3235 | $texto = 'BASE DE CÁLCULO DO ISSQN'; |
| 3236 | 3236 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
| 3237 | 3237 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, ''); |
| 3238 | 3238 | if (isset($this->ISSQNtot)) { |
| 3239 | - $texto = ! empty($this->ISSQNtot->getElementsByTagName("vBC")->item(0)->nodeValue) ? |
|
| 3239 | + $texto = !empty($this->ISSQNtot->getElementsByTagName("vBC")->item(0)->nodeValue) ? |
|
| 3240 | 3240 | $this->ISSQNtot->getElementsByTagName("vBC")->item(0)->nodeValue : ''; |
| 3241 | - $texto = ! empty($texto) ? number_format($texto, 2, ",", ".") : ''; |
|
| 3241 | + $texto = !empty($texto) ? number_format($texto, 2, ",", ".") : ''; |
|
| 3242 | 3242 | } else { |
| 3243 | 3243 | $texto = ''; |
| 3244 | 3244 | } |
@@ -3255,9 +3255,9 @@ discard block |
||
| 3255 | 3255 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
| 3256 | 3256 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, ''); |
| 3257 | 3257 | if (isset($this->ISSQNtot)) { |
| 3258 | - $texto = ! empty($this->ISSQNtot->getElementsByTagName("vISS")->item(0)->nodeValue) ? |
|
| 3258 | + $texto = !empty($this->ISSQNtot->getElementsByTagName("vISS")->item(0)->nodeValue) ? |
|
| 3259 | 3259 | $this->ISSQNtot->getElementsByTagName("vISS")->item(0)->nodeValue : ''; |
| 3260 | - $texto = ! empty($texto) ? number_format($texto, 2, ",", ".") : ''; |
|
| 3260 | + $texto = !empty($texto) ? number_format($texto, 2, ",", ".") : ''; |
|
| 3261 | 3261 | } else { |
| 3262 | 3262 | $texto = ''; |
| 3263 | 3263 | } |
@@ -3296,7 +3296,7 @@ discard block |
||
| 3296 | 3296 | |
| 3297 | 3297 | //INFORMAÇÕES COMPLEMENTARES |
| 3298 | 3298 | $texto = "INFORMAÇÕES COMPLEMENTARES"; |
| 3299 | - $y += 3; |
|
| 3299 | + $y += 3; |
|
| 3300 | 3300 | $w = $this->wAdic; |
| 3301 | 3301 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => 'B']; |
| 3302 | 3302 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, ''); |
@@ -3306,7 +3306,7 @@ discard block |
||
| 3306 | 3306 | //$this->textoAdic com o texto completo do campo |
| 3307 | 3307 | //echo str_replace("\n", "<br>",$this->textoAdic); |
| 3308 | 3308 | //die; |
| 3309 | - $y += 1; |
|
| 3309 | + $y += 1; |
|
| 3310 | 3310 | $aFont = ['font' => $this->fontePadrao, 'size' => $this->textadicfontsize * $this->pdf->k, 'style' => '']; |
| 3311 | 3311 | //$aFont = ['font'=>$this->fontePadrao, 'size'=> 5, 'style'=>'']; |
| 3312 | 3312 | $this->pdf->textBox($x, $y + 2, $w - 2, $h, $this->textoAdic, $aFont, 'T', 'L', 0, '', false); |
@@ -3357,7 +3357,7 @@ discard block |
||
| 3357 | 3357 | $texto = 'CONTINGÊNCIA SVC-RS' . $dhCont . $xJust; |
| 3358 | 3358 | break; |
| 3359 | 3359 | } |
| 3360 | - $y += 2; |
|
| 3360 | + $y += 2; |
|
| 3361 | 3361 | $aFont = ['font' => $this->fontePadrao, 'size' => 7, 'style' => '']; |
| 3362 | 3362 | $this->pdf->textBox($x, $y, $w - 2, $h, $texto, $aFont, 'T', 'L', 0, '', false); |
| 3363 | 3363 | |
@@ -3412,7 +3412,7 @@ discard block |
||
| 3412 | 3412 | $tpNF = $this->ide->getElementsByTagName('tpNF')->item(0)->nodeValue; |
| 3413 | 3413 | if ($tpNF == '0') { |
| 3414 | 3414 | //NFe de Entrada |
| 3415 | - $emitente = ''; |
|
| 3415 | + $emitente = ''; |
|
| 3416 | 3416 | $emitente .= $this->dest->getElementsByTagName("xNome")->item(0)->nodeValue . " - "; |
| 3417 | 3417 | $emitente .= $this->enderDest->getElementsByTagName("xLgr")->item(0)->nodeValue . ", "; |
| 3418 | 3418 | $emitente .= $this->enderDest->getElementsByTagName("nro")->item(0)->nodeValue . " - "; |
@@ -3465,10 +3465,10 @@ discard block |
||
| 3465 | 3465 | $texto .= "AO LADO"; |
| 3466 | 3466 | } |
| 3467 | 3467 | $texto .= ". EMISSÃO: "; |
| 3468 | - $dEmi = ! empty($this->ide->getElementsByTagName("dEmi")->item(0)->nodeValue) ? |
|
| 3468 | + $dEmi = !empty($this->ide->getElementsByTagName("dEmi")->item(0)->nodeValue) ? |
|
| 3469 | 3469 | $this->ide->getElementsByTagName("dEmi")->item(0)->nodeValue : ''; |
| 3470 | 3470 | if ($dEmi == '') { |
| 3471 | - $dEmi = ! empty($this->ide->getElementsByTagName("dhEmi")->item(0)->nodeValue) ? |
|
| 3471 | + $dEmi = !empty($this->ide->getElementsByTagName("dhEmi")->item(0)->nodeValue) ? |
|
| 3472 | 3472 | $this->ide->getElementsByTagName("dhEmi")->item(0)->nodeValue : ''; |
| 3473 | 3473 | $aDemi = explode('T', $dEmi); |
| 3474 | 3474 | $dEmi = $aDemi[0]; |
@@ -3491,12 +3491,12 @@ discard block |
||
| 3491 | 3491 | $this->pdf->textBox($x1, $y, $w1, 18, $texto, $aFont, 'C', 'C', 1, ''); |
| 3492 | 3492 | //DATA DE RECEBIMENTO |
| 3493 | 3493 | $texto = "DATA DE RECEBIMENTO"; |
| 3494 | - $y += $h; |
|
| 3494 | + $y += $h; |
|
| 3495 | 3495 | $w2 = round($this->wPrint * 0.17, 0); //35; |
| 3496 | 3496 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
| 3497 | 3497 | $this->pdf->textBox($x, $y, $w2, 8, $texto, $aFont, 'T', 'L', 1, ''); |
| 3498 | 3498 | //IDENTIFICAÇÃO E ASSINATURA DO RECEBEDOR |
| 3499 | - $x += $w2; |
|
| 3499 | + $x += $w2; |
|
| 3500 | 3500 | $w3 = $w - $w2; |
| 3501 | 3501 | $texto = "IDENTIFICAÇÃO E ASSINATURA DO RECEBEDOR"; |
| 3502 | 3502 | $this->pdf->textBox($x, $y, $w3, 8, $texto, $aFont, 'T', 'L', 1, ''); |
@@ -3507,7 +3507,7 @@ discard block |
||
| 3507 | 3507 | |
| 3508 | 3508 | return $y; |
| 3509 | 3509 | } else { |
| 3510 | - $x --; |
|
| 3510 | + $x--; |
|
| 3511 | 3511 | $x = $this->pdf->textBox90($x, $y, $w - 1, $h, $texto, $aFontSmall, 'C', 'L', 0, '', false); |
| 3512 | 3512 | //NUMERO DA NOTA FISCAL LOGO NFE |
| 3513 | 3513 | $w1 = 18; |
@@ -3528,7 +3528,7 @@ discard block |
||
| 3528 | 3528 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
| 3529 | 3529 | $this->pdf->textBox90($x, $y, $w2, 8, $texto, $aFont, 'T', 'L', 1, ''); |
| 3530 | 3530 | //IDENTIFICAÇÃO E ASSINATURA DO RECEBEDOR |
| 3531 | - $y -= $w2; |
|
| 3531 | + $y -= $w2; |
|
| 3532 | 3532 | $w3 = $w - $w2; |
| 3533 | 3533 | $texto = "IDENTIFICAÇÃO E ASSINATURA DO RECEBEDOR"; |
| 3534 | 3534 | $aFont = ['font' => $this->fontePadrao, 'size' => 5.7, 'style' => '']; |
@@ -3549,18 +3549,18 @@ discard block |
||
| 3549 | 3549 | */ |
| 3550 | 3550 | protected function geraInformacoesDaTagCompra() |
| 3551 | 3551 | { |
| 3552 | - if (! $this->gerarInformacoesAutomaticas) { |
|
| 3552 | + if (!$this->gerarInformacoesAutomaticas) { |
|
| 3553 | 3553 | return ''; |
| 3554 | 3554 | } |
| 3555 | 3555 | $saida = ""; |
| 3556 | 3556 | if (isset($this->compra)) { |
| 3557 | - if (! empty($this->compra->getElementsByTagName("xNEmp")->item(0)->nodeValue)) { |
|
| 3557 | + if (!empty($this->compra->getElementsByTagName("xNEmp")->item(0)->nodeValue)) { |
|
| 3558 | 3558 | $saida .= " Nota de Empenho: " . $this->compra->getElementsByTagName("xNEmp")->item(0)->nodeValue; |
| 3559 | 3559 | } |
| 3560 | - if (! empty($this->compra->getElementsByTagName("xPed")->item(0)->nodeValue)) { |
|
| 3560 | + if (!empty($this->compra->getElementsByTagName("xPed")->item(0)->nodeValue)) { |
|
| 3561 | 3561 | $saida .= " Pedido: " . $this->compra->getElementsByTagName("xPed")->item(0)->nodeValue; |
| 3562 | 3562 | } |
| 3563 | - if (! empty($this->compra->getElementsByTagName("xCont")->item(0)->nodeValue)) { |
|
| 3563 | + if (!empty($this->compra->getElementsByTagName("xCont")->item(0)->nodeValue)) { |
|
| 3564 | 3564 | $saida .= " Contrato: " . $this->compra->getElementsByTagName("xCont")->item(0)->nodeValue; |
| 3565 | 3565 | } |
| 3566 | 3566 | } |
@@ -3591,10 +3591,10 @@ discard block |
||
| 3591 | 3591 | if ($icmss > 0) { |
| 3592 | 3592 | $icmss = 1; |
| 3593 | 3593 | } |
| 3594 | - $dEmi = ! empty($this->ide->getElementsByTagName("dEmi")->item(0)->nodeValue) ? |
|
| 3594 | + $dEmi = !empty($this->ide->getElementsByTagName("dEmi")->item(0)->nodeValue) ? |
|
| 3595 | 3595 | $this->ide->getElementsByTagName("dEmi")->item(0)->nodeValue : ''; |
| 3596 | 3596 | if ($dEmi == '') { |
| 3597 | - $dEmi = ! empty($this->ide->getElementsByTagName("dhEmi")->item(0)->nodeValue) ? |
|
| 3597 | + $dEmi = !empty($this->ide->getElementsByTagName("dhEmi")->item(0)->nodeValue) ? |
|
| 3598 | 3598 | $this->ide->getElementsByTagName("dhEmi")->item(0)->nodeValue : ''; |
| 3599 | 3599 | $aDemi = explode('T', $dEmi); |
| 3600 | 3600 | $dEmi = $aDemi[0]; |
@@ -3618,7 +3618,7 @@ discard block |
||
| 3618 | 3618 | */ |
| 3619 | 3619 | protected function geraInformacoesDasNotasReferenciadas() |
| 3620 | 3620 | { |
| 3621 | - if (! $this->gerarInformacoesAutomaticas) { |
|
| 3621 | + if (!$this->gerarInformacoesAutomaticas) { |
|
| 3622 | 3622 | return ''; |
| 3623 | 3623 | } |
| 3624 | 3624 | $formaNfeRef = "\r\nNFe Ref.: série:%d número:%d emit:%s em %s [%s]"; |
@@ -3646,7 +3646,7 @@ discard block |
||
| 3646 | 3646 | $cnpj = $this->formatField(substr($chave_acesso, 6, 14), "##.###.###/####-##"); |
| 3647 | 3647 | $serie = substr($chave_acesso, 22, 3); |
| 3648 | 3648 | $numero = substr($chave_acesso, 25, 9); |
| 3649 | - $saida .= sprintf($formaNfeRef, $serie, $numero, $cnpj, $data, $chave_acessoF); |
|
| 3649 | + $saida .= sprintf($formaNfeRef, $serie, $numero, $cnpj, $data, $chave_acessoF); |
|
| 3650 | 3650 | } |
| 3651 | 3651 | $refNF = $nfRef->getElementsByTagName('refNF'); |
| 3652 | 3652 | foreach ($refNF as $umaRefNFe) { |
@@ -3657,7 +3657,7 @@ discard block |
||
| 3657 | 3657 | $numero = $umaRefNFe->getElementsByTagName('nNF')->item(0)->nodeValue; |
| 3658 | 3658 | $data = substr($data, 2, 2) . "/20" . substr($data, 0, 2); |
| 3659 | 3659 | $cnpj = $this->formatField($cnpj, "##.###.###/####-##"); |
| 3660 | - $saida .= sprintf($formaNfRef, $serie, $numero, $cnpj, $data, $mod); |
|
| 3660 | + $saida .= sprintf($formaNfRef, $serie, $numero, $cnpj, $data, $mod); |
|
| 3661 | 3661 | } |
| 3662 | 3662 | $refCTe = $nfRef->getElementsByTagName('refCTe'); |
| 3663 | 3663 | foreach ($refCTe as $chave_acessoRef) { |
@@ -3667,7 +3667,7 @@ discard block |
||
| 3667 | 3667 | $cnpj = $this->formatField(substr($chave_acesso, 6, 14), "##.###.###/####-##"); |
| 3668 | 3668 | $serie = substr($chave_acesso, 22, 3); |
| 3669 | 3669 | $numero = substr($chave_acesso, 25, 9); |
| 3670 | - $saida .= sprintf($formaCTeRef, $serie, $numero, $cnpj, $data, $chave_acessoF); |
|
| 3670 | + $saida .= sprintf($formaCTeRef, $serie, $numero, $cnpj, $data, $chave_acessoF); |
|
| 3671 | 3671 | } |
| 3672 | 3672 | $refECF = $nfRef->getElementsByTagName('refECF'); |
| 3673 | 3673 | foreach ($refECF as $umaRefNFe) { |
@@ -3679,10 +3679,9 @@ discard block |
||
| 3679 | 3679 | $refNFP = $nfRef->getElementsByTagName('refNFP'); |
| 3680 | 3680 | foreach ($refNFP as $umaRefNFe) { |
| 3681 | 3681 | $data = $umaRefNFe->getElementsByTagName('AAMM')->item(0)->nodeValue; |
| 3682 | - $cnpj = ! empty($umaRefNFe->getElementsByTagName('CNPJ')->item(0)->nodeValue) ? |
|
| 3683 | - $umaRefNFe->getElementsByTagName('CNPJ')->item(0)->nodeValue : |
|
| 3684 | - ''; |
|
| 3685 | - $cpf = ! empty($umaRefNFe->getElementsByTagName('CPF')->item(0)->nodeValue) ? |
|
| 3682 | + $cnpj = !empty($umaRefNFe->getElementsByTagName('CNPJ')->item(0)->nodeValue) ? |
|
| 3683 | + $umaRefNFe->getElementsByTagName('CNPJ')->item(0)->nodeValue : ''; |
|
| 3684 | + $cpf = !empty($umaRefNFe->getElementsByTagName('CPF')->item(0)->nodeValue) ? |
|
| 3686 | 3685 | $umaRefNFe->getElementsByTagName('CPF')->item(0)->nodeValue : ''; |
| 3687 | 3686 | $mod = $umaRefNFe->getElementsByTagName('mod')->item(0)->nodeValue; |
| 3688 | 3687 | $serie = $umaRefNFe->getElementsByTagName('serie')->item(0)->nodeValue; |
@@ -3704,7 +3703,7 @@ discard block |
||
| 3704 | 3703 | private function loadDoc($xml) |
| 3705 | 3704 | { |
| 3706 | 3705 | $this->xml = $xml; |
| 3707 | - if (! empty($xml)) { |
|
| 3706 | + if (!empty($xml)) { |
|
| 3708 | 3707 | $this->dom = new Dom(); |
| 3709 | 3708 | $this->dom->loadXML($this->xml); |
| 3710 | 3709 | if (empty($this->dom->getElementsByTagName("infNFe")->item(0))) { |
@@ -3758,7 +3757,7 @@ discard block |
||
| 3758 | 3757 | $numlinhas = $this->pdf->getNumLines($textoProduto, $w2, $aFont); |
| 3759 | 3758 | |
| 3760 | 3759 | if ($mostrarUnidadeTributavel && $numlinhas == 1) { |
| 3761 | - $numlinhas ++; |
|
| 3760 | + $numlinhas++; |
|
| 3762 | 3761 | } |
| 3763 | 3762 | |
| 3764 | 3763 | return round(($numlinhas * $this->pdf->fontSize) + ($numlinhas * 0.5), 2); |