Completed
Push — master ( 5d3f07...54bb63 )
by Roberto
09:04 queued 05:35
created
src/CTe/DacteV3.php 1 patch
Spacing   +60 added lines, -62 removed lines patch added patch discarded remove patch
@@ -441,7 +441,7 @@  discard block
 block discarded – undo
441 441
             }
442 442
             $x = $xInic;
443 443
             $r = $this->zObs($x, $y);
444
-            $y = $y-6;
444
+            $y = $y - 6;
445 445
             switch ($this->modal) {
446 446
                 case '1':
447 447
                     $y += 25.9;
@@ -643,7 +643,7 @@  discard block
 block discarded – undo
643 643
             'font' => $this->fontePadrao,
644 644
             'size' => 7,
645 645
             'style' => '');
646
-        $fone = $this->pSimpleGetValue($this->enderEmit, "fone")!=""? $this->zFormatFone($this->enderEmit):'';
646
+        $fone = $this->pSimpleGetValue($this->enderEmit, "fone") != "" ? $this->zFormatFone($this->enderEmit) : '';
647 647
         $lgr = $this->pSimpleGetValue($this->enderEmit, "xLgr");
648 648
         $nro = $this->pSimpleGetValue($this->enderEmit, "nro");
649 649
         $cpl = $this->pSimpleGetValue($this->enderEmit, "xCpl");
@@ -736,31 +736,31 @@  discard block
 block discarded – undo
736 736
         $this->pdf->Line($x, $y1 + 8, $w + 3, $y1 + 8);
737 737
         $toma = $this->pSimpleGetValue($this->ide, "indGlobalizado");
738 738
         //0-Remetente;1-Expedidor;2-Recebedor;3-Destinatário;4 - Outros
739
-        if ($toma==1) {
739
+        if ($toma == 1) {
740 740
             $aFont = array(
741 741
             'font' => $this->fontePadrao,
742 742
             'size' => 11,
743 743
             'style' => '');
744
-            $this->pTextBox($x-14.5, $y2 + 3.5, $w * 0.5, $h1, 'X', $aFont, 'T', 'C', 0, '', false);
744
+            $this->pTextBox($x - 14.5, $y2 + 3.5, $w * 0.5, $h1, 'X', $aFont, 'T', 'C', 0, '', false);
745 745
         } else {
746 746
             $aFont = array(
747 747
             'font' => $this->fontePadrao,
748 748
             'size' => 11,
749 749
             'style' => '');
750
-            $this->pTextBox($x+3.5, $y2 + 3.5, $w * 0.5, $h1, 'X', $aFont, 'T', 'C', 0, '', false);
750
+            $this->pTextBox($x + 3.5, $y2 + 3.5, $w * 0.5, $h1, 'X', $aFont, 'T', 'C', 0, '', false);
751 751
         }
752 752
         $aFont = $this->formatNegrito;
753
-        $this->pdf->Line($x+5, $x+48, $x+5, $x+52);
754
-        $this->pdf->Line($x+10, $x+48, $x+10, $x+52);
755
-        $this->pdf->Line($x+5, $x+48, $x+10, $x+48);
756
-        $this->pdf->Line($x+5, $x+52, $x+10, $x+52);
757
-        $this->pTextBox($x-9, $y2+1.4 + 3, $w * 0.5, $h1, 'SIM', $aFont, 'T', 'C', 0, '', false);
753
+        $this->pdf->Line($x + 5, $x + 48, $x + 5, $x + 52);
754
+        $this->pdf->Line($x + 10, $x + 48, $x + 10, $x + 52);
755
+        $this->pdf->Line($x + 5, $x + 48, $x + 10, $x + 48);
756
+        $this->pdf->Line($x + 5, $x + 52, $x + 10, $x + 52);
757
+        $this->pTextBox($x - 9, $y2 + 1.4 + 3, $w * 0.5, $h1, 'SIM', $aFont, 'T', 'C', 0, '', false);
758 758
 
759
-        $this->pdf->Line($x+23, $x+48, $x+23, $x+52);
760
-        $this->pdf->Line($x+28, $x+48, $x+28, $x+52);
761
-        $this->pdf->Line($x+23, $x+48, $x+28, $x+48);
762
-        $this->pdf->Line($x+23, $x+52, $x+28, $x+52);
763
-        $this->pTextBox($x+9.8, $y2+1.4 + 3, $w * 0.5, $h1, 'NÃO', $aFont, 'T', 'C', 0, '', false);
759
+        $this->pdf->Line($x + 23, $x + 48, $x + 23, $x + 52);
760
+        $this->pdf->Line($x + 28, $x + 48, $x + 28, $x + 52);
761
+        $this->pdf->Line($x + 23, $x + 48, $x + 28, $x + 48);
762
+        $this->pdf->Line($x + 23, $x + 52, $x + 28, $x + 52);
763
+        $this->pTextBox($x + 9.8, $y2 + 1.4 + 3, $w * 0.5, $h1, 'NÃO', $aFont, 'T', 'C', 0, '', false);
764 764
 
765 765
         //FORMA DE PAGAMENTO
766 766
         $texto = 'NFORMAÇÕES DO CT-E GLOBALIZADO';
@@ -769,7 +769,7 @@  discard block
 block discarded – undo
769 769
             'font' => $this->fontePadrao,
770 770
             'size' => 8,
771 771
             'style' => '');
772
-        $this->pTextBox($x+2 + $wa + 4.5, $y2-0.7, $w * 0.5, $h1, $texto, $aFont, 'T', 'C', 0, '');
772
+        $this->pTextBox($x + 2 + $wa + 4.5, $y2 - 0.7, $w * 0.5, $h1, $texto, $aFont, 'T', 'C', 0, '');
773 773
         $forma = $this->pSimpleGetValue($this->ide, "forPag");
774 774
         //##################################################################
775 775
         //coluna direita
@@ -877,7 +877,7 @@  discard block
 block discarded – undo
877 877
             'style' => '');
878 878
         $this->pTextBox($xa, $y + 1, $wa, $h, $texto, $aFont, 'T', 'C', 0, '');
879 879
         //$texto = '1/1';
880
-        $texto = $pag."/".$totPag;
880
+        $texto = $pag . "/" . $totPag;
881 881
         $aFont = $this->formatNegrito;
882 882
         $this->pTextBox($xa, $y + 5, $wa, $h, $texto, $aFont, 'T', 'C', 0, '');
883 883
         $this->pdf->Line($xa + $wa, $y, $xa + $wa, $y + $h + 1);
@@ -1079,7 +1079,7 @@  discard block
 block discarded – undo
1079 1079
             $this->pdf->SetTextColor(0, 0, 0);
1080 1080
         }
1081 1081
         //indicar sem valor
1082
-        if ($tpAmb != 1 && $this->preVisualizar=='0') { // caso não seja uma DA de produção
1082
+        if ($tpAmb != 1 && $this->preVisualizar == '0') { // caso não seja uma DA de produção
1083 1083
             $x = 10;
1084 1084
             if ($this->orientacao == 'P') {
1085 1085
                 $y = round($this->hPrint * 2 / 3, 0);
@@ -1102,7 +1102,7 @@  discard block
 block discarded – undo
1102 1102
             $texto = "AMBIENTE DE HOMOLOGAÇÃO";
1103 1103
             $this->pTextBox($x, $y + 14, $w, $h, $texto, $aFont, 'C', 'C', 0, '');
1104 1104
             $this->pdf->SetTextColor(0, 0, 0);
1105
-        } elseif ($this->preVisualizar=='1') { // caso seja uma DA de Pré-Visualização
1105
+        } elseif ($this->preVisualizar == '1') { // caso seja uma DA de Pré-Visualização
1106 1106
             $h = 5;
1107 1107
             $w = $maxW - (2 * 10);
1108 1108
             $x = 55;
@@ -1120,14 +1120,14 @@  discard block
 block discarded – undo
1120 1120
                 'size' => 41,
1121 1121
                 'style' => 'B');
1122 1122
             $texto = "Sem Validade Jurídica";
1123
-            $this->pTextBox90($x+20, $y, $w, $h, $texto, $aFont, 'C', 'C', 0, '');
1123
+            $this->pTextBox90($x + 20, $y, $w, $h, $texto, $aFont, 'C', 'C', 0, '');
1124 1124
             $this->pdf->SetTextColor(90, 90, 90);
1125 1125
             $texto = "SEM VALOR FISCAL";
1126 1126
             $aFont = array(
1127 1127
                 'font' => $this->fontePadrao,
1128 1128
                 'size' => 48,
1129 1129
                 'style' => 'B');
1130
-            $this->pTextBox90($x+40, $y, $w, $h, $texto, $aFont, 'C', 'C', 0, '');
1130
+            $this->pTextBox90($x + 40, $y, $w, $h, $texto, $aFont, 'C', 'C', 0, '');
1131 1131
             $this->pdf->SetTextColor(0, 0, 0); // voltar a cor default
1132 1132
         } else {
1133 1133
             $x = 10;
@@ -1213,13 +1213,13 @@  discard block
 block discarded – undo
1213 1213
             'font' => $this->fontePadrao,
1214 1214
             'size' => 6,
1215 1215
             'style' => '');
1216
-        $this->pTextBox($x-1, $y+2, $w, 4, $texto, $aFont, 'T', 'L', 0, '');
1217
-        $texto = $this->nomeDesenvolvedor . ' - '. $this->siteDesenvolvedor;
1216
+        $this->pTextBox($x - 1, $y + 2, $w, 4, $texto, $aFont, 'T', 'L', 0, '');
1217
+        $texto = $this->nomeDesenvolvedor . ' - ' . $this->siteDesenvolvedor;
1218 1218
         $aFont = array(
1219 1219
             'font' => $this->fontePadrao,
1220 1220
             'size' => 6,
1221 1221
             'style' => '');
1222
-        $this->pTextBox($x-50, $y+2, $w, 4, $texto, $aFont, 'T', 'R', 0, $this->siteDesenvolvedor);
1222
+        $this->pTextBox($x - 50, $y + 2, $w, 4, $texto, $aFont, 'T', 'R', 0, $this->siteDesenvolvedor);
1223 1223
     } //fim zRodape
1224 1224
 
1225 1225
     /**
@@ -1305,7 +1305,7 @@  discard block
 block discarded – undo
1305 1305
         $aFont = $this->formatPadrao;
1306 1306
         $this->pTextBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1307 1307
         //$texto = $this->zFormatFone($this->rem);
1308
-        $texto = $this->pSimpleGetValue($this->rem, "fone")!=""? $this->zFormatFone($this->rem):'';
1308
+        $texto = $this->pSimpleGetValue($this->rem, "fone") != "" ? $this->zFormatFone($this->rem) : '';
1309 1309
         $aFont = $this->formatNegrito;
1310 1310
         $this->pTextBox($x + 8, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1311 1311
     } //fim da função remetenteDACTE
@@ -1392,7 +1392,7 @@  discard block
 block discarded – undo
1392 1392
         $aFont = $this->formatPadrao;
1393 1393
         $this->pTextBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1394 1394
         //$texto = $this->zFormatFone($this->dest);
1395
-        $texto = $this->pSimpleGetValue($this->dest, "fone")!=""? $this->zFormatFone($this->dest):'';
1395
+        $texto = $this->pSimpleGetValue($this->dest, "fone") != "" ? $this->zFormatFone($this->dest) : '';
1396 1396
         $aFont = $this->formatNegrito;
1397 1397
         $this->pTextBox($x + 8, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1398 1398
     } //fim da função destinatarioDACTE
@@ -1432,8 +1432,7 @@  discard block
 block discarded – undo
1432 1432
             $texto = $this->pSimpleGetValue($this->enderExped, "xLgr") . ', ';
1433 1433
             $texto .= $this->pSimpleGetValue($this->enderExped, "nro");
1434 1434
             $texto .= $this->pSimpleGetValue($this->enderExped, "xCpl") != "" ?
1435
-                ' - ' . $this->pSimpleGetValue($this->enderExped, "xCpl") :
1436
-                '';
1435
+                ' - ' . $this->pSimpleGetValue($this->enderExped, "xCpl") : '';
1437 1436
         } else {
1438 1437
             $texto = '';
1439 1438
         }
@@ -1488,7 +1487,7 @@  discard block
 block discarded – undo
1488 1487
         $aFont = $this->formatPadrao;
1489 1488
         $this->pTextBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1490 1489
         if (isset($this->exped)) {
1491
-            $texto = $this->pSimpleGetValue($this->exped, "fone")!=""? $this->zFormatFone($this->exped):'';
1490
+            $texto = $this->pSimpleGetValue($this->exped, "fone") != "" ? $this->zFormatFone($this->exped) : '';
1492 1491
             $aFont = $this->formatNegrito;
1493 1492
             $this->pTextBox($x + 8, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1494 1493
         }
@@ -1529,8 +1528,7 @@  discard block
 block discarded – undo
1529 1528
             $texto = $this->pSimpleGetValue($this->enderReceb, "xLgr") . ', ';
1530 1529
             $texto .= $this->pSimpleGetValue($this->enderReceb, "nro");
1531 1530
             $texto .= ($this->pSimpleGetValue($this->enderReceb, "xCpl") != "") ?
1532
-                ' - ' . $this->pSimpleGetValue($this->enderReceb, "xCpl") :
1533
-                '';
1531
+                ' - ' . $this->pSimpleGetValue($this->enderReceb, "xCpl") : '';
1534 1532
         } else {
1535 1533
             $texto = '';
1536 1534
         }
@@ -1585,7 +1583,7 @@  discard block
 block discarded – undo
1585 1583
         $aFont = $this->formatPadrao;
1586 1584
         $this->pTextBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1587 1585
         if (isset($this->receb)) {
1588
-            $texto = $this->pSimpleGetValue($this->receb, "fone")!=""? $this->zFormatFone($this->receb):'';
1586
+            $texto = $this->pSimpleGetValue($this->receb, "fone") != "" ? $this->zFormatFone($this->receb) : '';
1589 1587
             $aFont = $this->formatNegrito;
1590 1588
             $this->pTextBox($x + 8, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1591 1589
         }
@@ -1675,7 +1673,7 @@  discard block
 block discarded – undo
1675 1673
         $texto = 'FONE';
1676 1674
         $aFont = $this->formatPadrao;
1677 1675
         $this->pTextBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1678
-        $texto = $this->pSimpleGetValue($this->toma, "fone")!=""? $this->zFormatFone($this->toma):'';
1676
+        $texto = $this->pSimpleGetValue($this->toma, "fone") != "" ? $this->zFormatFone($this->toma) : '';
1679 1677
         $aFont = $this->formatNegrito;
1680 1678
         $this->pTextBox($x + 8, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1681 1679
     } //fim da função tomadorDACTE
@@ -1734,7 +1732,7 @@  discard block
 block discarded – undo
1734 1732
             'font' => $this->fontePadrao,
1735 1733
             'size' => 5,
1736 1734
             'style' => '');
1737
-        $this->pTextBox($x+8, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1735
+        $this->pTextBox($x + 8, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1738 1736
         //$texto = $this->pSimpleGetValue($this->infQ->item(0), "qCarga") . "\r\n";
1739 1737
         $texto = number_format(
1740 1738
             $this->pSimpleGetValue(
@@ -1750,15 +1748,15 @@  discard block
 block discarded – undo
1750 1748
             'font' => $this->fontePadrao,
1751 1749
             'size' => 7,
1752 1750
             'style' => 'B');
1753
-        $this->pTextBox($x+2, $y + 3, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1751
+        $this->pTextBox($x + 2, $y + 3, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1754 1752
         $x = $w * 0.12;
1755
-        $this->pdf->Line($x+13.5, $y, $x+13.5, $y + 9);
1753
+        $this->pdf->Line($x + 13.5, $y, $x + 13.5, $y + 9);
1756 1754
         $texto = 'PESO BASE CÁLCULO (KG)';
1757 1755
         $aFont = array(
1758 1756
             'font' => $this->fontePadrao,
1759 1757
             'size' => 5,
1760 1758
             'style' => '');
1761
-        $this->pTextBox($x+20, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1759
+        $this->pTextBox($x + 20, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1762 1760
         $texto = number_format(
1763 1761
             $this->pSimpleGetValue(
1764 1762
                 $this->infQ->item(0),
@@ -1772,15 +1770,15 @@  discard block
 block discarded – undo
1772 1770
             'font' => $this->fontePadrao,
1773 1771
             'size' => 7,
1774 1772
             'style' => 'B');
1775
-        $this->pTextBox($x+17, $y + 3, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1773
+        $this->pTextBox($x + 17, $y + 3, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1776 1774
         $x = $w * 0.24;
1777
-        $this->pdf->Line($x+25, $y, $x+25, $y + 9);
1775
+        $this->pdf->Line($x + 25, $y, $x + 25, $y + 9);
1778 1776
         $texto = 'PESO AFERIDO (KG)';
1779 1777
         $aFont = array(
1780 1778
             'font' => $this->fontePadrao,
1781 1779
             'size' => 5,
1782 1780
             'style' => '');
1783
-        $this->pTextBox($x+35, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1781
+        $this->pTextBox($x + 35, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1784 1782
         $texto = number_format(
1785 1783
             $this->pSimpleGetValue(
1786 1784
                 $this->infQ->item(0),
@@ -1794,12 +1792,12 @@  discard block
 block discarded – undo
1794 1792
             'font' => $this->fontePadrao,
1795 1793
             'size' => 7,
1796 1794
             'style' => 'B');
1797
-        $this->pTextBox($x+28, $y + 3, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1795
+        $this->pTextBox($x + 28, $y + 3, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1798 1796
         $x = $w * 0.36;
1799
-        $this->pdf->Line($x+41.3, $y, $x+41.3, $y + 9);
1797
+        $this->pdf->Line($x + 41.3, $y, $x + 41.3, $y + 9);
1800 1798
         $texto = 'CUBAGEM(M3)';
1801 1799
         $aFont = $this->formatPadrao;
1802
-        $this->pTextBox($x+60, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1800
+        $this->pTextBox($x + 60, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1803 1801
         $qCarga = '';
1804 1802
         if ($this->pSimpleGetValue($this->infQ->item(0), "cUnid") == '00') {
1805 1803
             $qCarga = $this->pSimpleGetValue($this->infQ->item(0), "qCarga");
@@ -1813,12 +1811,12 @@  discard block
 block discarded – undo
1813 1811
             'font' => $this->fontePadrao,
1814 1812
             'size' => 7,
1815 1813
             'style' => 'B');
1816
-        $this->pTextBox($x+50, $y + 3, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1814
+        $this->pTextBox($x + 50, $y + 3, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1817 1815
         $x = $w * 0.45;
1818 1816
         //$this->pdf->Line($x+37, $y, $x+37, $y + 9);
1819 1817
         $texto = 'QTDE(VOL)';
1820 1818
         $aFont = $this->formatPadrao;
1821
-        $this->pTextBox($x+85, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1819
+        $this->pTextBox($x + 85, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1822 1820
         $qCarga = '';
1823 1821
         if ($this->pSimpleGetValue($this->infQ->item(2), "cUnid") == 03) {
1824 1822
             $qCarga = $this->pSimpleGetValue($this->infQ->item(2), "qCarga");
@@ -1830,9 +1828,9 @@  discard block
 block discarded – undo
1830 1828
             'font' => $this->fontePadrao,
1831 1829
             'size' => 7,
1832 1830
             'style' => 'B');
1833
-        $this->pTextBox($x+85, $y + 3, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1831
+        $this->pTextBox($x + 85, $y + 3, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1834 1832
         $x = $w * 0.53;
1835
-        $this->pdf->Line($x+56, $y, $x+56, $y + 9);
1833
+        $this->pdf->Line($x + 56, $y, $x + 56, $y + 9);
1836 1834
         /*$texto = 'NOME DA SEGURADORA';
1837 1835
         $aFont = $this->formatPadrao;
1838 1836
         $this->pTextBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
@@ -2011,7 +2009,7 @@  discard block
 block discarded – undo
2011 2009
         $aFont = $this->formatPadrao;
2012 2010
         $this->pTextBox($x, $y, $w * 0.14, $h, $texto, $aFont, 'T', 'L', 0, '');
2013 2011
         
2014
-        $wCol02=0.18;
2012
+        $wCol02 = 0.18;
2015 2013
         $x += $w * $wCol02;
2016 2014
         $this->pdf->Line($x, $y, $x, $y + 9.5);
2017 2015
         $texto = 'ALÍQ ICMS';
@@ -2088,7 +2086,7 @@  discard block
 block discarded – undo
2088 2086
         $x += $w * $wCol02;
2089 2087
         
2090 2088
         $texto = !empty($this->ICMS->getElementsByTagName("pRedBC")->item(0)->nodeValue) ?
2091
-            number_format($this->pSimpleGetValue($this->ICMS, "pRedBC"), 2, ",", ".").'%' :'';
2089
+            number_format($this->pSimpleGetValue($this->ICMS, "pRedBC"), 2, ",", ".") . '%' : '';
2092 2090
         $aFont = $this->formatNegrito;
2093 2091
         $this->pTextBox($x, $y, $w * $wCol02, $h, $texto, $aFont, 'T', 'L', 0, '');
2094 2092
         
@@ -2259,7 +2257,7 @@  discard block
 block discarded – undo
2259 2257
             $this->arrayNFe[] = $chaveNFe;
2260 2258
         }
2261 2259
         $qtdeNFe = 1;
2262
-        if (count($this->arrayNFe) >15) {
2260
+        if (count($this->arrayNFe) > 15) {
2263 2261
             $this->flagDocOrigContinuacao = 1;
2264 2262
             $qtdeNFe = count($this->arrayNFe);
2265 2263
         }
@@ -2439,9 +2437,9 @@  discard block
 block discarded – undo
2439 2437
             //$h = 6 + 3; // de altura do texto (primeira linha
2440 2438
             //$h = 9 + 3.5 ;// segunda linha
2441 2439
             //$h = 9 + 3.5+ 3.5 ;// segunda linha
2442
-            $h = (( ( count($this->arrayNFe)/2 ) - 9) * 3.5)+9;
2443
-            if (count($this->arrayNFe)%2 !=0) {
2444
-                $h = $h+3.5;
2440
+            $h = (((count($this->arrayNFe) / 2) - 9) * 3.5) + 9;
2441
+            if (count($this->arrayNFe) % 2 != 0) {
2442
+                $h = $h + 3.5;
2445 2443
             } // Caso tenha apenas 1 registro na ultima linha
2446 2444
 
2447 2445
             $texto = 'DOCUMENTOS ORIGINÁRIOS - CONTINUACÃO';
@@ -2497,7 +2495,7 @@  discard block
 block discarded – undo
2497 2495
             $yIniDados += 3;
2498 2496
 
2499 2497
             while ($contador < (count($this->arrayNFe))) {
2500
-                if ($contador%(116*($i-1)) == 0) {
2498
+                if ($contador % (116 * ($i - 1)) == 0) {
2501 2499
 //                    $contador++;
2502 2500
                     break;
2503 2501
                 }
@@ -2632,14 +2630,14 @@  discard block
 block discarded – undo
2632 2630
             $texto .= $xObs;
2633 2631
         }
2634 2632
         $textoObs = explode("Motorista:", $texto);
2635
-        $textoObs[1] = isset($textoObs[1]) ? "Motorista: ".$textoObs[1]: '';
2633
+        $textoObs[1] = isset($textoObs[1]) ? "Motorista: " . $textoObs[1] : '';
2636 2634
         $texto .= $this->pSimpleGetValue($this->imp, "infAdFisco", "\r\n");
2637 2635
         $aFont = array(
2638 2636
             'font' => $this->fontePadrao,
2639 2637
             'size' => 7.5,
2640 2638
             'style' => '');
2641 2639
         $this->pTextBox($x, $y, $w, $h, $textoObs[0], $aFont, 'T', 'L', 0, '', false);
2642
-        $this->pTextBox($x, $y+11.5, $w, $h, $textoObs[1], $aFont, 'T', 'L', 0, '', false);
2640
+        $this->pTextBox($x, $y + 11.5, $w, $h, $textoObs[1], $aFont, 'T', 'L', 0, '', false);
2643 2641
     } //fim da função obsDACTE
2644 2642
 
2645 2643
     /**
@@ -2678,11 +2676,11 @@  discard block
 block discarded – undo
2678 2676
         $this->pTextBox($x, $y + 3, $w * 0.23, $h, $texto, $aFont, 'T', 'L', 0, '');
2679 2677
         $x += $w * 0.23;
2680 2678
         
2681
-        $this->pdf->Line($x-20, $y, $x-20, $y + 8.5); // LINHA A FRENTE DA RNTRC DA EMPRESA
2679
+        $this->pdf->Line($x - 20, $y, $x - 20, $y + 8.5); // LINHA A FRENTE DA RNTRC DA EMPRESA
2682 2680
         
2683 2681
         $texto = 'ESTE CONHECIMENTO DE TRANSPORTE ATENDE À LEGISLAÇÃO DE TRANSPORTE RODOVIÁRIO EM VIGOR';
2684 2682
         $aFont = $this->formatPadrao;
2685
-        $this->pTextBox($x-20, $y + 3, $w * 0.50, $h, $texto, $aFont, 'T', 'C', 0, '');
2683
+        $this->pTextBox($x - 20, $y + 3, $w * 0.50, $h, $texto, $aFont, 'T', 'C', 0, '');
2686 2684
     } //fim da função zModalRod
2687 2685
 
2688 2686
     /**
@@ -3143,7 +3141,7 @@  discard block
 block discarded – undo
3143 3141
      */
3144 3142
     protected function zCanhoto($x = 0, $y = 0)
3145 3143
     {
3146
-        $this->zhDashedLine($x, $y+2, $this->wPrint, 0.1, 80);
3144
+        $this->zhDashedLine($x, $y + 2, $this->wPrint, 0.1, 80);
3147 3145
         $y = $y + 2;
3148 3146
         $oldX = $x;
3149 3147
         $oldY = $y;
@@ -3182,7 +3180,7 @@  discard block
 block discarded – undo
3182 3180
         
3183 3181
         $this->pdf->Line($x, $y, $x, $y + 16.5);
3184 3182
         
3185
-        $texto = 'TÉRMINO DA PRESTAÇÃO - DATA/HORA' . "\r\n" . "\r\n" . "\r\n". "\r\n";
3183
+        $texto = 'TÉRMINO DA PRESTAÇÃO - DATA/HORA' . "\r\n" . "\r\n" . "\r\n" . "\r\n";
3186 3184
         $texto .= ' INÍCIO DA PRESTAÇÃO - DATA/HORA';
3187 3185
         $aFont = array(
3188 3186
             'font' => $this->fontePadrao,
@@ -3192,14 +3190,14 @@  discard block
 block discarded – undo
3192 3190
         $x = $oldX;
3193 3191
         $y = $y + 5;
3194 3192
         
3195
-        $this->pdf->Line($x, $y+3, $w * 0.255, $y+3); // LINHA HORIZONTAL ACIMA DO RG ABAIXO DO NOME
3193
+        $this->pdf->Line($x, $y + 3, $w * 0.255, $y + 3); // LINHA HORIZONTAL ACIMA DO RG ABAIXO DO NOME
3196 3194
         
3197 3195
         $texto = 'RG';
3198 3196
         $aFont = array(
3199 3197
             'font' => $this->fontePadrao,
3200 3198
             'size' => 6,
3201 3199
             'style' => '');
3202
-        $this->pTextBox($x, $y+3, $w * 0.33, $h, $texto, $aFont, 'T', 'L', 0, '');
3200
+        $this->pTextBox($x, $y + 3, $w * 0.33, $h, $texto, $aFont, 'T', 'L', 0, '');
3203 3201
         $x += $w * 0.85;
3204 3202
         
3205 3203
         $this->pdf->Line($x, $y + 11.5, $x, $y - 5); // LINHA VERTICAL PROXIMO AO CT-E
Please login to merge, or discard this patch.