Passed
Push — master ( d3f5b9...393546 )
by Roberto
03:36 queued 01:07
created
src/CTe/Dacte.php 1 patch
Spacing   +64 added lines, -66 removed lines patch added patch discarded remove patch
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
             $this->toma4 = $this->dom->getElementsByTagName("toma4")->item(0);
213 213
             $this->toma03 = $this->dom->getElementsByTagName("toma3")->item(0);
214 214
             //Tag tomador é identificado por toma03 na versão 2.00
215
-            if ($this->infCte->getAttribute("versao")=="2.00") {
215
+            if ($this->infCte->getAttribute("versao") == "2.00") {
216 216
                 $this->toma03 = $this->dom->getElementsByTagName("toma03")->item(0);
217 217
             }
218 218
             //modal aquaviário
@@ -430,7 +430,7 @@  discard block
 block discarded – undo
430 430
             }
431 431
             $x = $xInic;
432 432
             $r = $this->observacao($x, $y);
433
-            $y = $y-6;
433
+            $y = $y - 6;
434 434
             switch ($this->modal) {
435 435
                 case '1':
436 436
                     $y += 25.9;
@@ -632,7 +632,7 @@  discard block
 block discarded – undo
632 632
             'font' => $this->fontePadrao,
633 633
             'size' => 7,
634 634
             'style' => '');
635
-        $fone = $this->getTagValue($this->enderEmit, "fone")!=""? $this->formatFone($this->enderEmit):'';
635
+        $fone = $this->getTagValue($this->enderEmit, "fone") != "" ? $this->formatFone($this->enderEmit) : '';
636 636
         $lgr = $this->getTagValue($this->enderEmit, "xLgr");
637 637
         $nro = $this->getTagValue($this->enderEmit, "nro");
638 638
         $cpl = $this->getTagValue($this->enderEmit, "xCpl");
@@ -726,30 +726,30 @@  discard block
 block discarded – undo
726 726
         $this->pdf->line($x, $y1 + 8, $w + 3, $y1 + 8);
727 727
         $toma = $this->getTagValue($this->ide, "indGlobalizado");
728 728
         //0-Remetente;1-Expedidor;2-Recebedor;3-Destinatário;4 - Outros
729
-        if ($toma==1) {
729
+        if ($toma == 1) {
730 730
             $aFont = array(
731 731
             'font' => $this->fontePadrao,
732 732
             'size' => 11,
733 733
             'style' => '');
734
-            $this->pdf->textBox($x-14.5, $y2 + 3.5, $w * 0.5, $h1, 'X', $aFont, 'T', 'C', 0, '', false);
734
+            $this->pdf->textBox($x - 14.5, $y2 + 3.5, $w * 0.5, $h1, 'X', $aFont, 'T', 'C', 0, '', false);
735 735
         } else {
736 736
             $aFont = array(
737 737
             'font' => $this->fontePadrao,
738 738
             'size' => 11,
739 739
             'style' => '');
740
-            $this->pdf->textBox($x+3.5, $y2 + 3.5, $w * 0.5, $h1, 'X', $aFont, 'T', 'C', 0, '', false);
741
-        }
742
-        $aFont = $this->formatNegrito;
743
-        $this->pdf->line($x+3, $x+71, $x+3, $x+75);
744
-        $this->pdf->line($x+8, $x+71, $x+8, $x+75);
745
-        $this->pdf->line($x+3, $x+71, $x+8, $x+71);
746
-        $this->pdf->line($x+3, $x+75, $x+8, $x+75);
747
-        $this->pdf->textBox($x-6, $y2+1.4 + 3, $w * 0.5, $h1, 'SIM', $aFont, 'T', 'C', 0, '', false);
748
-        $this->pdf->line($x+18, $x+71, $x+18, $x+75);
749
-        $this->pdf->line($x+23, $x+71, $x+23, $x+75);
750
-        $this->pdf->line($x+18, $x+71, $x+23, $x+71);
751
-        $this->pdf->line($x+18, $x+75, $x+23, $x+75);
752
-        $this->pdf->textBox($x+9.8, $y2+1.4 + 3, $w * 0.5, $h1, 'NÃO', $aFont, 'T', 'C', 0, '', false);
740
+            $this->pdf->textBox($x + 3.5, $y2 + 3.5, $w * 0.5, $h1, 'X', $aFont, 'T', 'C', 0, '', false);
741
+        }
742
+        $aFont = $this->formatNegrito;
743
+        $this->pdf->line($x + 3, $x + 71, $x + 3, $x + 75);
744
+        $this->pdf->line($x + 8, $x + 71, $x + 8, $x + 75);
745
+        $this->pdf->line($x + 3, $x + 71, $x + 8, $x + 71);
746
+        $this->pdf->line($x + 3, $x + 75, $x + 8, $x + 75);
747
+        $this->pdf->textBox($x - 6, $y2 + 1.4 + 3, $w * 0.5, $h1, 'SIM', $aFont, 'T', 'C', 0, '', false);
748
+        $this->pdf->line($x + 18, $x + 71, $x + 18, $x + 75);
749
+        $this->pdf->line($x + 23, $x + 71, $x + 23, $x + 75);
750
+        $this->pdf->line($x + 18, $x + 71, $x + 23, $x + 71);
751
+        $this->pdf->line($x + 18, $x + 75, $x + 23, $x + 75);
752
+        $this->pdf->textBox($x + 9.8, $y2 + 1.4 + 3, $w * 0.5, $h1, 'NÃO', $aFont, 'T', 'C', 0, '', false);
753 753
         //FORMA DE PAGAMENTO
754 754
         $texto = 'INF.DO CT-E GLOBALIZADO';
755 755
         $wd = 36;
@@ -757,7 +757,7 @@  discard block
 block discarded – undo
757 757
             'font' => $this->fontePadrao,
758 758
             'size' => 8,
759 759
             'style' => '');
760
-        $this->pdf->textBox($x + $wa, $y2-0.5, $w * 0.5, $h1, $texto, $aFont, 'T', 'C', 0, '');
760
+        $this->pdf->textBox($x + $wa, $y2 - 0.5, $w * 0.5, $h1, $texto, $aFont, 'T', 'C', 0, '');
761 761
         $forma = $this->getTagValue($this->ide, "forPag");
762 762
         //##################################################################
763 763
         //coluna direita
@@ -866,7 +866,7 @@  discard block
 block discarded – undo
866 866
             'style' => '');
867 867
         $this->pdf->textBox($xa, $y + 1, $wa, $h, $texto, $aFont, 'T', 'C', 0, '');
868 868
         //$texto = '1/1';
869
-        $texto = $pag."/".$totPag;
869
+        $texto = $pag . "/" . $totPag;
870 870
         $aFont = $this->formatNegrito;
871 871
         $this->pdf->textBox($xa, $y + 5, $wa, $h, $texto, $aFont, 'T', 'C', 0, '');
872 872
         $this->pdf->line($xa + $wa, $y, $xa + $wa, $y + $h + 1);
@@ -889,7 +889,7 @@  discard block
 block discarded – undo
889 889
         $wa = 30;
890 890
         $texto = 'INSC.SUF.DO DEST';
891 891
         $aFont = $this->formatPadrao;
892
-        $this->pdf->textBox($xa-5, $y + 1, $wa, $h, $texto, $aFont, 'T', 'C', 0, '');
892
+        $this->pdf->textBox($xa - 5, $y + 1, $wa, $h, $texto, $aFont, 'T', 'C', 0, '');
893 893
         $texto = $this->getTagValue($this->dest, "ISUF");
894 894
         $aFont = array(
895 895
             'font' => $this->fontePadrao,
@@ -973,7 +973,7 @@  discard block
 block discarded – undo
973 973
         $aFont = $this->formatNegrito;
974 974
         $this->pdf->textBox($x, $y + 12, $wa, $h, $texto, $aFont, 'T', 'C', 0, '');
975 975
         if ($this->qrCodCTe !== null) {
976
-            $this->qrCodeDacte($y-27);
976
+            $this->qrCodeDacte($y - 27);
977 977
             $w = 45;
978 978
             $x += 92.5;
979 979
             $this->pdf->textBox($x, $y - 34, $w + 0.5, $h + 41.5);
@@ -1072,7 +1072,7 @@  discard block
 block discarded – undo
1072 1072
             $this->pdf->setTextColor(0, 0, 0);
1073 1073
         }
1074 1074
         //indicar sem valor
1075
-        if ($tpAmb != 1 && $this->preVisualizar=='0') { // caso não seja uma DA de produção
1075
+        if ($tpAmb != 1 && $this->preVisualizar == '0') { // caso não seja uma DA de produção
1076 1076
             $x = 10;
1077 1077
             if ($this->orientacao == 'P') {
1078 1078
                 $y = round($this->hPrint * 2 / 3, 0);
@@ -1095,7 +1095,7 @@  discard block
 block discarded – undo
1095 1095
             $texto = "AMBIENTE DE HOMOLOGAÇÃO";
1096 1096
             $this->pdf->textBox($x, $y + 14, $w, $h, $texto, $aFont, 'C', 'C', 0, '');
1097 1097
             $this->pdf->setTextColor(0, 0, 0);
1098
-        } elseif ($this->preVisualizar=='1') { // caso seja uma DA de Pré-Visualização
1098
+        } elseif ($this->preVisualizar == '1') { // caso seja uma DA de Pré-Visualização
1099 1099
             $h = 5;
1100 1100
             $w = $maxW - (2 * 10);
1101 1101
             $x = 55;
@@ -1113,14 +1113,14 @@  discard block
 block discarded – undo
1113 1113
                 'size' => 41,
1114 1114
                 'style' => 'B');
1115 1115
             $texto = "Sem Validade Jurídica";
1116
-            $this->pTextBox90($x+20, $y, $w, $h, $texto, $aFont, 'C', 'C', 0, '');
1116
+            $this->pTextBox90($x + 20, $y, $w, $h, $texto, $aFont, 'C', 'C', 0, '');
1117 1117
             $this->pdf->setTextColor(90, 90, 90);
1118 1118
             $texto = "SEM VALOR FISCAL";
1119 1119
             $aFont = array(
1120 1120
                 'font' => $this->fontePadrao,
1121 1121
                 'size' => 48,
1122 1122
                 'style' => 'B');
1123
-            $this->pTextBox90($x+40, $y, $w, $h, $texto, $aFont, 'C', 'C', 0, '');
1123
+            $this->pTextBox90($x + 40, $y, $w, $h, $texto, $aFont, 'C', 'C', 0, '');
1124 1124
             $this->pdf->setTextColor(0, 0, 0); // voltar a cor default
1125 1125
         } else {
1126 1126
             $x = 10;
@@ -1207,7 +1207,7 @@  discard block
 block discarded – undo
1207 1207
             'size' => 6,
1208 1208
             'style' => '');
1209 1209
         $this->pdf->textBox($x, $y, $w, 4, $texto, $aFont, 'T', 'L', 0, '');
1210
-        $texto = 'Desenvolvido por '.$this->nomeDesenvolvedor . ' - '. $this->siteDesenvolvedor;
1210
+        $texto = 'Desenvolvido por ' . $this->nomeDesenvolvedor . ' - ' . $this->siteDesenvolvedor;
1211 1211
         $aFont = array(
1212 1212
             'font' => $this->fontePadrao,
1213 1213
             'size' => 6,
@@ -1298,7 +1298,7 @@  discard block
 block discarded – undo
1298 1298
         $aFont = $this->formatPadrao;
1299 1299
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1300 1300
         //$texto = $this->formatFone($this->rem);
1301
-        $texto = $this->getTagValue($this->rem, "fone")!=""? $this->formatFone($this->rem):'';
1301
+        $texto = $this->getTagValue($this->rem, "fone") != "" ? $this->formatFone($this->rem) : '';
1302 1302
         $aFont = $this->formatNegrito;
1303 1303
         $this->pdf->textBox($x + 8, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1304 1304
     }
@@ -1385,7 +1385,7 @@  discard block
 block discarded – undo
1385 1385
         $aFont = $this->formatPadrao;
1386 1386
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1387 1387
         //$texto = $this->formatFone($this->dest);
1388
-        $texto = $this->getTagValue($this->dest, "fone")!=""? $this->formatFone($this->dest):'';
1388
+        $texto = $this->getTagValue($this->dest, "fone") != "" ? $this->formatFone($this->dest) : '';
1389 1389
         $aFont = $this->formatNegrito;
1390 1390
         $this->pdf->textBox($x + 8, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1391 1391
     }
@@ -1425,8 +1425,7 @@  discard block
 block discarded – undo
1425 1425
             $texto = $this->getTagValue($this->enderExped, "xLgr") . ', ';
1426 1426
             $texto .= $this->getTagValue($this->enderExped, "nro");
1427 1427
             $texto .= $this->getTagValue($this->enderExped, "xCpl") != "" ?
1428
-                ' - ' . $this->getTagValue($this->enderExped, "xCpl") :
1429
-                '';
1428
+                ' - ' . $this->getTagValue($this->enderExped, "xCpl") : '';
1430 1429
         } else {
1431 1430
             $texto = '';
1432 1431
         }
@@ -1481,7 +1480,7 @@  discard block
 block discarded – undo
1481 1480
         $aFont = $this->formatPadrao;
1482 1481
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1483 1482
         if (isset($this->exped)) {
1484
-            $texto = $this->getTagValue($this->exped, "fone")!=""? $this->formatFone($this->exped):'';
1483
+            $texto = $this->getTagValue($this->exped, "fone") != "" ? $this->formatFone($this->exped) : '';
1485 1484
             $aFont = $this->formatNegrito;
1486 1485
             $this->pdf->textBox($x + 8, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1487 1486
         }
@@ -1522,8 +1521,7 @@  discard block
 block discarded – undo
1522 1521
             $texto = $this->getTagValue($this->enderReceb, "xLgr") . ', ';
1523 1522
             $texto .= $this->getTagValue($this->enderReceb, "nro");
1524 1523
             $texto .= ($this->getTagValue($this->enderReceb, "xCpl") != "") ?
1525
-                ' - ' . $this->getTagValue($this->enderReceb, "xCpl") :
1526
-                '';
1524
+                ' - ' . $this->getTagValue($this->enderReceb, "xCpl") : '';
1527 1525
         } else {
1528 1526
             $texto = '';
1529 1527
         }
@@ -1578,7 +1576,7 @@  discard block
 block discarded – undo
1578 1576
         $aFont = $this->formatPadrao;
1579 1577
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1580 1578
         if (isset($this->receb)) {
1581
-            $texto = $this->getTagValue($this->receb, "fone")!=""? $this->formatFone($this->receb):'';
1579
+            $texto = $this->getTagValue($this->receb, "fone") != "" ? $this->formatFone($this->receb) : '';
1582 1580
             $aFont = $this->formatNegrito;
1583 1581
             $this->pdf->textBox($x + 8, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1584 1582
         }
@@ -1668,7 +1666,7 @@  discard block
 block discarded – undo
1668 1666
         $texto = 'FONE';
1669 1667
         $aFont = $this->formatPadrao;
1670 1668
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1671
-        $texto = $this->getTagValue($this->toma, "fone")!=""? $this->formatFone($this->toma):'';
1669
+        $texto = $this->getTagValue($this->toma, "fone") != "" ? $this->formatFone($this->toma) : '';
1672 1670
         $aFont = $this->formatNegrito;
1673 1671
         $this->pdf->textBox($x + 8, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1674 1672
     }
@@ -1735,46 +1733,46 @@  discard block
 block discarded – undo
1735 1733
             'font' => $this->fontePadrao,
1736 1734
             'size' => 5,
1737 1735
             'style' => '');
1738
-        $this->pdf->textBox($x+8, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1736
+        $this->pdf->textBox($x + 8, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1739 1737
         $texto = number_format($qCarga, 3, ",", ".");
1740 1738
         $aFont = array(
1741 1739
             'font' => $this->fontePadrao,
1742 1740
             'size' => 7,
1743 1741
             'style' => 'B');
1744
-        $this->pdf->textBox($x+2, $y + 3, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1742
+        $this->pdf->textBox($x + 2, $y + 3, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1745 1743
         $x = $w * 0.12;
1746
-        $this->pdf->line($x+13.5, $y, $x+13.5, $y + 9);
1744
+        $this->pdf->line($x + 13.5, $y, $x + 13.5, $y + 9);
1747 1745
         $texto = 'PESO BASE CÁLCULO (KG)';
1748 1746
         $aFont = array(
1749 1747
             'font' => $this->fontePadrao,
1750 1748
             'size' => 5,
1751 1749
             'style' => '');
1752
-        $this->pdf->textBox($x+20, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1750
+        $this->pdf->textBox($x + 20, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1753 1751
         $texto = number_format($qCarga, 3, ",", ".");
1754 1752
         $aFont = array(
1755 1753
             'font' => $this->fontePadrao,
1756 1754
             'size' => 7,
1757 1755
             'style' => 'B');
1758
-        $this->pdf->textBox($x+17, $y + 3, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1756
+        $this->pdf->textBox($x + 17, $y + 3, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1759 1757
         $x = $w * 0.24;
1760
-        $this->pdf->line($x+25, $y, $x+25, $y + 9);
1758
+        $this->pdf->line($x + 25, $y, $x + 25, $y + 9);
1761 1759
         $texto = 'PESO AFERIDO (KG)';
1762 1760
         $aFont = array(
1763 1761
             'font' => $this->fontePadrao,
1764 1762
             'size' => 5,
1765 1763
             'style' => '');
1766
-        $this->pdf->textBox($x+35, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1764
+        $this->pdf->textBox($x + 35, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1767 1765
         $texto = number_format($qCarga, 3, ",", ".");
1768 1766
         $aFont = array(
1769 1767
             'font' => $this->fontePadrao,
1770 1768
             'size' => 7,
1771 1769
             'style' => 'B');
1772
-        $this->pdf->textBox($x+28, $y + 3, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1770
+        $this->pdf->textBox($x + 28, $y + 3, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1773 1771
         $x = $w * 0.36;
1774
-        $this->pdf->line($x+41.3, $y, $x+41.3, $y + 9);
1772
+        $this->pdf->line($x + 41.3, $y, $x + 41.3, $y + 9);
1775 1773
         $texto = 'CUBAGEM(M3)';
1776 1774
         $aFont = $this->formatPadrao;
1777
-        $this->pdf->textBox($x+60, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1775
+        $this->pdf->textBox($x + 60, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1778 1776
         $qCarga = 0;
1779 1777
         foreach ($this->infQ as $infQ) {
1780 1778
             if ($this->getTagValue($infQ, "cUnid") == '00') {
@@ -1786,12 +1784,12 @@  discard block
 block discarded – undo
1786 1784
             'font' => $this->fontePadrao,
1787 1785
             'size' => 7,
1788 1786
             'style' => 'B');
1789
-        $this->pdf->textBox($x+50, $y + 3, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1787
+        $this->pdf->textBox($x + 50, $y + 3, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1790 1788
         $x = $w * 0.45;
1791 1789
         //$this->pdf->line($x+37, $y, $x+37, $y + 9);
1792 1790
         $texto = 'QTDE(VOL)';
1793 1791
         $aFont = $this->formatPadrao;
1794
-        $this->pdf->textBox($x+85, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1792
+        $this->pdf->textBox($x + 85, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1795 1793
         $qCarga = 0;
1796 1794
         foreach ($this->infQ as $infQ) {
1797 1795
             if ($this->getTagValue($infQ, "cUnid") == '03') {
@@ -1803,9 +1801,9 @@  discard block
 block discarded – undo
1803 1801
             'font' => $this->fontePadrao,
1804 1802
             'size' => 7,
1805 1803
             'style' => 'B');
1806
-        $this->pdf->textBox($x+85, $y + 3, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1804
+        $this->pdf->textBox($x + 85, $y + 3, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1807 1805
         $x = $w * 0.53;
1808
-        $this->pdf->line($x+56, $y, $x+56, $y + 9);
1806
+        $this->pdf->line($x + 56, $y, $x + 56, $y + 9);
1809 1807
         /*$texto = 'NOME DA SEGURADORA';
1810 1808
         $aFont = $this->formatPadrao;
1811 1809
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
@@ -1981,7 +1979,7 @@  discard block
 block discarded – undo
1981 1979
         $texto = 'BASE DE CALCULO';
1982 1980
         $aFont = $this->formatPadrao;
1983 1981
         $this->pdf->textBox($x, $y, $w * 0.14, $h, $texto, $aFont, 'T', 'L', 0, '');
1984
-        $wCol02=0.15;
1982
+        $wCol02 = 0.15;
1985 1983
         $x += $w * $wCol02;
1986 1984
         $this->pdf->line($x, $y, $x, $y + 9.5);
1987 1985
         $texto = 'ALÍQ ICMS';
@@ -2283,7 +2281,7 @@  discard block
 block discarded – undo
2283 2281
             $this->arrayNFe[] = $chaveNFe;
2284 2282
         }
2285 2283
         $qtdeNFe = 1;
2286
-        if (count($this->arrayNFe) >15) {
2284
+        if (count($this->arrayNFe) > 15) {
2287 2285
             $this->flagDocOrigContinuacao = 1;
2288 2286
             $qtdeNFe = count($this->arrayNFe);
2289 2287
         }
@@ -2461,9 +2459,9 @@  discard block
 block discarded – undo
2461 2459
             //$h = 6 + 3; // de altura do texto (primeira linha
2462 2460
             //$h = 9 + 3.5 ;// segunda linha
2463 2461
             //$h = 9 + 3.5+ 3.5 ;// segunda linha
2464
-            $h = (( ( count($this->arrayNFe)/2 ) - 9) * 3.5)+9;
2465
-            if (count($this->arrayNFe)%2 !=0) {
2466
-                $h = $h+3.5;
2462
+            $h = (((count($this->arrayNFe) / 2) - 9) * 3.5) + 9;
2463
+            if (count($this->arrayNFe) % 2 != 0) {
2464
+                $h = $h + 3.5;
2467 2465
             } // Caso tenha apenas 1 registro na ultima linha
2468 2466
             $texto = 'DOCUMENTOS ORIGINÁRIOS - CONTINUACÃO';
2469 2467
             $aFont = $this->formatPadrao;
@@ -2513,7 +2511,7 @@  discard block
 block discarded – undo
2513 2511
             $auxX = $oldX;
2514 2512
             $yIniDados += 3;
2515 2513
             while ($contador < (count($this->arrayNFe))) {
2516
-                if ($contador%(116*($i-1)) == 0) {
2514
+                if ($contador % (116 * ($i - 1)) == 0) {
2517 2515
 //                    $contador++;
2518 2516
                     break;
2519 2517
                 }
@@ -2654,14 +2652,14 @@  discard block
 block discarded – undo
2654 2652
             $texto .= $xObs;
2655 2653
         }
2656 2654
         $textoObs = explode("Motorista:", $texto);
2657
-        $textoObs[1] = isset($textoObs[1]) ? "Motorista: ".$textoObs[1]: '';
2655
+        $textoObs[1] = isset($textoObs[1]) ? "Motorista: " . $textoObs[1] : '';
2658 2656
         $texto .= $this->getTagValue($this->imp, "infAdFisco", "\r\n");
2659 2657
         $aFont = array(
2660 2658
             'font' => $this->fontePadrao,
2661 2659
             'size' => 7.5,
2662 2660
             'style' => '');
2663 2661
         $this->pdf->textBox($x, $y, $w, $h, $textoObs[0], $aFont, 'T', 'L', 0, '', false);
2664
-        $this->pdf->textBox($x, $y+11.5, $w, $h, $textoObs[1], $aFont, 'T', 'L', 0, '', false);
2662
+        $this->pdf->textBox($x, $y + 11.5, $w, $h, $textoObs[1], $aFont, 'T', 'L', 0, '', false);
2665 2663
     }
2666 2664
 
2667 2665
     /**
@@ -2699,10 +2697,10 @@  discard block
 block discarded – undo
2699 2697
         $aFont = $this->formatNegrito;
2700 2698
         $this->pdf->textBox($x, $y + 3, $w * 0.23, $h, $texto, $aFont, 'T', 'L', 0, '');
2701 2699
         $x += $w * 0.23;
2702
-        $this->pdf->line($x-20, $y, $x-20, $y + 6); // LINHA A FRENTE DA RNTRC DA EMPRESA
2700
+        $this->pdf->line($x - 20, $y, $x - 20, $y + 6); // LINHA A FRENTE DA RNTRC DA EMPRESA
2703 2701
         $texto = 'ESTE CONHECIMENTO DE TRANSPORTE ATENDE À LEGISLAÇÃO DE TRANSPORTE RODOVIÁRIO EM VIGOR';
2704 2702
         $aFont = $this->formatPadrao;
2705
-        $this->pdf->textBox($x-20, $y + 3, $w * 0.50, $h, $texto, $aFont, 'T', 'C', 0, '');
2703
+        $this->pdf->textBox($x - 20, $y + 3, $w * 0.50, $h, $texto, $aFont, 'T', 'C', 0, '');
2706 2704
     }
2707 2705
 
2708 2706
     /**
@@ -2735,13 +2733,13 @@  discard block
 block discarded – undo
2735 2733
         $this->pdf->textBox($x, $y, $w * 0.23, $h, $texto, $aFont, 'T', 'L', 0, '');
2736 2734
         $texto = 'CLASSE DA TARIFA';
2737 2735
         $aFont = $this->formatPadrao;
2738
-        $this->pdf->textBox($x+50, $y, $w * 0.23, $h, $texto, $aFont, 'T', 'L', 0, '');
2736
+        $this->pdf->textBox($x + 50, $y, $w * 0.23, $h, $texto, $aFont, 'T', 'L', 0, '');
2739 2737
         $texto = 'CÓDIGO DA TARIFA';
2740 2738
         $aFont = $this->formatPadrao;
2741
-        $this->pdf->textBox($x+80, $y, $w * 0.23, $h, $texto, $aFont, 'T', 'L', 0, '');
2739
+        $this->pdf->textBox($x + 80, $y, $w * 0.23, $h, $texto, $aFont, 'T', 'L', 0, '');
2742 2740
         $texto = 'VALOR DA TARIFA';
2743 2741
         $aFont = $this->formatPadrao;
2744
-        $this->pdf->textBox($x+110, $y, $w * 0.23, $h, $texto, $aFont, 'T', 'L', 0, '');
2742
+        $this->pdf->textBox($x + 110, $y, $w * 0.23, $h, $texto, $aFont, 'T', 'L', 0, '');
2745 2743
         $texto = $this->getTagValue($this->aereo, "nOCA");
2746 2744
         $aFont = $this->formatNegrito;
2747 2745
         $this->pdf->textBox($x, $y + 3, $w * 0.23, $h, $texto, $aFont, 'T', 'L', 0, '');
@@ -3252,7 +3250,7 @@  discard block
 block discarded – undo
3252 3250
         $this->pdf->textBox($x, $y, $w * 0.25, $h - 3.4, $texto, $aFont, 'B', 'C', 0, '');
3253 3251
         $x += $w * 0.25;
3254 3252
         $this->pdf->line($x, $y, $x, $y + 16.5);
3255
-        $texto = 'TÉRMINO DA PRESTAÇÃO - DATA/HORA' . "\r\n" . "\r\n" . "\r\n". "\r\n";
3253
+        $texto = 'TÉRMINO DA PRESTAÇÃO - DATA/HORA' . "\r\n" . "\r\n" . "\r\n" . "\r\n";
3256 3254
         $texto .= ' INÍCIO DA PRESTAÇÃO - DATA/HORA';
3257 3255
         $aFont = array(
3258 3256
             'font' => $this->fontePadrao,
@@ -3261,13 +3259,13 @@  discard block
 block discarded – undo
3261 3259
         $this->pdf->textBox($x + 10, $y, $w * 0.25, $h - 3.4, $texto, $aFont, 'T', 'C', 0, '');
3262 3260
         $x = $oldX;
3263 3261
         $y = $y + 5;
3264
-        $this->pdf->line($x, $y+3, $w * 0.255, $y+3); // LINHA HORIZONTAL ACIMA DO RG ABAIXO DO NOME
3262
+        $this->pdf->line($x, $y + 3, $w * 0.255, $y + 3); // LINHA HORIZONTAL ACIMA DO RG ABAIXO DO NOME
3265 3263
         $texto = 'RG';
3266 3264
         $aFont = array(
3267 3265
             'font' => $this->fontePadrao,
3268 3266
             'size' => 6,
3269 3267
             'style' => '');
3270
-        $this->pdf->textBox($x, $y+3, $w * 0.33, $h, $texto, $aFont, 'T', 'L', 0, '');
3268
+        $this->pdf->textBox($x, $y + 3, $w * 0.33, $h, $texto, $aFont, 'T', 'L', 0, '');
3271 3269
         $x += $w * 0.85;
3272 3270
         $this->pdf->line($x, $y + 11.5, $x, $y - 5); // LINHA VERTICAL PROXIMO AO CT-E
3273 3271
         $texto = "CT-E";
Please login to merge, or discard this patch.