@@ -305,7 +305,7 @@ discard block |
||
305 | 305 | $c1, |
306 | 306 | 5, |
307 | 307 | "{$this->nfeArray['NFe']['infNFe']['ide']['tpNF']} - " . |
308 | - ($this->nfeArray['NFe']['infNFe']['ide']['tpNF']==1 ? 'Saida':'Entrada'), |
|
308 | + ($this->nfeArray['NFe']['infNFe']['ide']['tpNF']==1 ? 'Saida':'Entrada'), |
|
309 | 309 | 1, |
310 | 310 | 0, |
311 | 311 | 'C', |
@@ -396,8 +396,8 @@ discard block |
||
396 | 396 | ); |
397 | 397 | |
398 | 398 | $enderecoEmit = "{$this->nfeArray['NFe']['infNFe']['emit']['enderEmit']['xMun']}" |
399 | - . " / {$this->nfeArray['NFe']['infNFe']['emit']['enderEmit']['UF']}" |
|
400 | - . " - CEP {$this->nfeArray['NFe']['infNFe']['emit']['enderEmit']['CEP']}"; |
|
399 | + . " / {$this->nfeArray['NFe']['infNFe']['emit']['enderEmit']['UF']}" |
|
400 | + . " - CEP {$this->nfeArray['NFe']['infNFe']['emit']['enderEmit']['CEP']}"; |
|
401 | 401 | |
402 | 402 | // LINHA 9 |
403 | 403 | $this->pdf->setFont('Arial', '', $pequeno ? 9 : 10); |
@@ -443,8 +443,8 @@ discard block |
||
443 | 443 | $enderecoLinha2 .= "{$this->nfeArray['NFe']['infNFe']['entrega']['xCpl']} - "; |
444 | 444 | } |
445 | 445 | $enderecoLinha2 .= "{$this->nfeArray['NFe']['infNFe']['entrega']['xMun']}" |
446 | - . " / {$this->nfeArray['NFe']['infNFe']['entrega']['UF']}" |
|
447 | - . " - CEP {$this->nfeArray['NFe']['infNFe']['entrega']['CEP']}"; |
|
446 | + . " / {$this->nfeArray['NFe']['infNFe']['entrega']['UF']}" |
|
447 | + . " - CEP {$this->nfeArray['NFe']['infNFe']['entrega']['CEP']}"; |
|
448 | 448 | } else { |
449 | 449 | $enderecoLinha1 = "{$this->nfeArray['NFe']['infNFe']['dest']['enderDest']['xLgr']}"; |
450 | 450 | if (!empty($this->nfeArray['NFe']['infNFe']['dest']['enderDest']['nro'])) { |
@@ -455,8 +455,8 @@ discard block |
||
455 | 455 | $enderecoLinha2 .= "{$this->nfeArray['NFe']['infNFe']['dest']['enderDest']['xCpl']} - "; |
456 | 456 | } |
457 | 457 | $enderecoLinha2 .= "{$this->nfeArray['NFe']['infNFe']['dest']['enderDest']['xMun']}" |
458 | - . " / {$this->nfeArray['NFe']['infNFe']['dest']['enderDest']['UF']}" |
|
459 | - . " - CEP {$this->nfeArray['NFe']['infNFe']['dest']['enderDest']['CEP']}"; |
|
458 | + . " / {$this->nfeArray['NFe']['infNFe']['dest']['enderDest']['UF']}" |
|
459 | + . " - CEP {$this->nfeArray['NFe']['infNFe']['dest']['enderDest']['CEP']}"; |
|
460 | 460 | } |
461 | 461 | |
462 | 462 | $this->pdf->setFont('Arial', '', $pequeno ? 9 : 10); |
@@ -276,7 +276,7 @@ discard block |
||
276 | 276 | } |
277 | 277 | |
278 | 278 | foreach ($this->nfeArray['NFe']['infNFe']['transp']['vol'] as $vol) { |
279 | - if(!isset($vol['esp'])){ // Espécie não especificada na transportadora (por erro de preenchimento do XML) |
|
279 | + if (!isset($vol['esp'])) { // Espécie não especificada na transportadora (por erro de preenchimento do XML) |
|
280 | 280 | continue; |
281 | 281 | } |
282 | 282 | if (!isset($volumes[$vol['esp']])) { |
@@ -310,7 +310,7 @@ discard block |
||
310 | 310 | $c1, |
311 | 311 | 5, |
312 | 312 | "{$this->nfeArray['NFe']['infNFe']['ide']['tpNF']} - " . |
313 | - ($this->nfeArray['NFe']['infNFe']['ide']['tpNF']==1 ? 'Saida':'Entrada'), |
|
313 | + ($this->nfeArray['NFe']['infNFe']['ide']['tpNF'] == 1 ? 'Saida' : 'Entrada'), |
|
314 | 314 | 1, |
315 | 315 | 0, |
316 | 316 | 'C', |
@@ -361,7 +361,7 @@ discard block |
||
361 | 361 | //que uma impressora de 203dpi consiga imprimir um código legível |
362 | 362 | $this->pdf->code128($this->margesq * 2, $y, $chave, ($this->maxW - $this->margesq * 4), 15); |
363 | 363 | } else { |
364 | - $this->pdf->code128(($c1/2), $y, $chave, ($c1 * 3), 15); |
|
364 | + $this->pdf->code128(($c1 / 2), $y, $chave, ($c1 * 3), 15); |
|
365 | 365 | } |
366 | 366 | $this->pdf->setFillColor(255, 255, 255); |
367 | 367 | $this->pdf->ln(); |
@@ -400,7 +400,7 @@ discard block |
||
400 | 400 | 1 |
401 | 401 | ); |
402 | 402 | |
403 | - $enderecoEmit = "{$this->nfeArray['NFe']['infNFe']['emit']['enderEmit']['xMun']}" |
|
403 | + $enderecoEmit = "{$this->nfeArray['NFe']['infNFe']['emit']['enderEmit']['xMun']}" |
|
404 | 404 | . " / {$this->nfeArray['NFe']['infNFe']['emit']['enderEmit']['UF']}" |
405 | 405 | . " - CEP {$this->nfeArray['NFe']['infNFe']['emit']['enderEmit']['CEP']}"; |
406 | 406 | |
@@ -470,7 +470,7 @@ discard block |
||
470 | 470 | $this->pdf->setFont('Arial', '', $pequeno ? 9 : 10); |
471 | 471 | $this->pdf->cell(($c1 * 4), $pequeno ? 4 : 5, "{$enderecoLinha2}", 1, 1, 'C', 1); |
472 | 472 | |
473 | - if($this->nfeArray['NFe']['infNFe']['transp']['modFrete'] != 9){ |
|
473 | + if ($this->nfeArray['NFe']['infNFe']['transp']['modFrete'] != 9) { |
|
474 | 474 | $this->pdf->setFont('Arial', 'B', $pequeno ? 10 : 12); |
475 | 475 | $this->pdf->cell(($c1 * 4), $pequeno ? 5 : 6, "TRANSPORTADORA", 1, 1, 'C', 1); |
476 | 476 | $this->pdf->setFont('Arial', '', $pequeno ? 9 : 10); |
@@ -518,7 +518,7 @@ discard block |
||
518 | 518 | $vNF = number_format($this->nfeArray['NFe']['infNFe']['total']['ICMSTot']['vNF'], 2, ',', '.'); |
519 | 519 | $this->pdf->cell(($c1 * 2), $pequeno ? 5 : 6, "R$ {$vNF}", 1, 1, 'C', 1); |
520 | 520 | |
521 | - if(isset($this->nfeArray['NFe']['infNFe']['infAdic'])){ |
|
521 | + if (isset($this->nfeArray['NFe']['infNFe']['infAdic'])) { |
|
522 | 522 | $this->pdf->setFont('Arial', 'B', $pequeno ? 10 : 12); |
523 | 523 | $this->pdf->cell(($c1 * 4), $pequeno ? 5 : 6, "DADOS ADICIONAIS", 1, 1, 'C', 1); |
524 | 524 | $this->pdf->setFont('Arial', '', $pequeno ? 8 : 10); |
@@ -33,9 +33,9 @@ discard block |
||
33 | 33 | } |
34 | 34 | $this->pdf->textBox( |
35 | 35 | $this->margem, |
36 | - $y+3, |
|
36 | + $y + 3, |
|
37 | 37 | $this->wPrint, |
38 | - $this->bloco9H-4, |
|
38 | + $this->bloco9H - 4, |
|
39 | 39 | str_replace(";", "\n", $this->infCpl), |
40 | 40 | $aFont, |
41 | 41 | 'T', |
@@ -67,8 +67,8 @@ discard block |
||
67 | 67 | $aFont = ['font'=> $this->fontePadrao, 'size' => 5, 'style' => '']; |
68 | 68 | } |
69 | 69 | $linhas = str_replace(';', "\n", $this->infCpl); |
70 | - $hfont = (imagefontheight($fsize)/72)*13; |
|
71 | - $numlinhas = $pdf->getNumLines($linhas, $wprint, $aFont)+2; |
|
70 | + $hfont = (imagefontheight($fsize) / 72) * 13; |
|
71 | + $numlinhas = $pdf->getNumLines($linhas, $wprint, $aFont) + 2; |
|
72 | 72 | return (int) ($numlinhas * $hfont) + 2; |
73 | 73 | } |
74 | 74 | } |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | protected $yDados = 0; |
27 | 27 | protected $xml; // string XML NFe |
28 | 28 | protected $errMsg = ''; // mesagens de erro |
29 | - protected $errStatus = false;// status de erro TRUE um erro ocorreu false sem erros |
|
29 | + protected $errStatus = false; // status de erro TRUE um erro ocorreu false sem erros |
|
30 | 30 | protected $formatoChave = "#### #### #### #### #### #### #### #### #### #### ####"; |
31 | 31 | protected $margemInterna = 2; |
32 | 32 | protected $id; |
@@ -314,7 +314,7 @@ discard block |
||
314 | 314 | $UF = 'UF: ' . $this->UF; |
315 | 315 | $mun = 'Municipio: ' . $this->xMun; |
316 | 316 | |
317 | - $texto = $cpfcnpj . ' - ' . $ie . $rntrc ."\n"; |
|
317 | + $texto = $cpfcnpj . ' - ' . $ie . $rntrc . "\n"; |
|
318 | 318 | $texto .= $lgr . ' - ' . $nro . "\n"; |
319 | 319 | $texto .= $bairro . "\n"; |
320 | 320 | $texto .= $UF . ' - ' . $mun . ' - ' . $CEP; |
@@ -568,7 +568,7 @@ discard block |
||
568 | 568 | $n = count($resp['message']); |
569 | 569 | $alttot = $n * 15; |
570 | 570 | $x = 10; |
571 | - $y = $this->hPrint/2 - $alttot/2; |
|
571 | + $y = $this->hPrint / 2 - $alttot / 2; |
|
572 | 572 | $h = 15; |
573 | 573 | $w = $maxW - (2 * $x); |
574 | 574 | $this->pdf->settextcolor(90, 90, 90); |
@@ -1242,7 +1242,7 @@ discard block |
||
1242 | 1242 | $aFont = array('font' => $this->fontePadrao, 'size' => 8, 'style' => ''); |
1243 | 1243 | $this->pdf->textBox($x, $y, $x2, 8, $texto, $aFont, 'T', 'L', 0, '', false); |
1244 | 1244 | //$y = $this->hPrint - 4; |
1245 | - $y = $this->hPrint+8; |
|
1245 | + $y = $this->hPrint + 8; |
|
1246 | 1246 | $texto = "Impresso em " . date('d/m/Y H:i:s') . ' ' . $this->creditos; |
1247 | 1247 | $w = $this->wPrint - 4; |
1248 | 1248 | $aFont = array('font' => $this->fontePadrao, 'size' => 6, 'style' => 'I'); |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | $emitUF = $this->getTagValue($this->enderEmit, "UF"); |
25 | 25 | |
26 | 26 | $emitFone = $this->getTagValue($this->enderEmit, "fone"); |
27 | - if (strlen($emitFone)>0) { |
|
27 | + if (strlen($emitFone) > 0) { |
|
28 | 28 | if (strlen($emitFone) == 11) { |
29 | 29 | $emitFone = $this->formatField($emitFone, "(##)#####-####"); |
30 | 30 | } else { |
@@ -38,13 +38,13 @@ discard block |
||
38 | 38 | $xImg = $this->margem; |
39 | 39 | $yImg = $this->margem + 1; |
40 | 40 | $logoInfo = getimagesize($this->logomarca); |
41 | - $logoWmm = ($logoInfo[0]/72)*25.4; |
|
42 | - $logoHmm = ($logoInfo[1]/72)*25.4; |
|
43 | - $nImgW = $this->wPrint/4; |
|
44 | - $nImgH = round($logoHmm * ($nImgW/$logoWmm), 0); |
|
41 | + $logoWmm = ($logoInfo[0] / 72) * 25.4; |
|
42 | + $logoHmm = ($logoInfo[1] / 72) * 25.4; |
|
43 | + $nImgW = $this->wPrint / 4; |
|
44 | + $nImgH = round($logoHmm * ($nImgW / $logoWmm), 0); |
|
45 | 45 | if ($nImgH > $maxHimg) { |
46 | 46 | $nImgH = $maxHimg; |
47 | - $nImgW = round($logoWmm * ($nImgH/$logoHmm), 0); |
|
47 | + $nImgW = round($logoWmm * ($nImgH / $logoHmm), 0); |
|
48 | 48 | } |
49 | 49 | $xRs = ($nImgW) + $this->margem; |
50 | 50 | $wRs = ($this->wPrint - $nImgW); |
@@ -59,10 +59,10 @@ discard block |
||
59 | 59 | $aFont = ['font'=>$this->fontePadrao, 'size' => 8, 'style' => '']; |
60 | 60 | $texto = "{$emitRazao}"; |
61 | 61 | $y += $this->pdf->textBox( |
62 | - $xRs+2, |
|
62 | + $xRs + 2, |
|
63 | 63 | $this->margem, |
64 | - $wRs-2, |
|
65 | - $this->bloco1H-$this->margem-1, |
|
64 | + $wRs - 2, |
|
65 | + $this->bloco1H - $this->margem - 1, |
|
66 | 66 | $texto, |
67 | 67 | $aFont, |
68 | 68 | 'T', |
@@ -75,13 +75,13 @@ discard block |
||
75 | 75 | $aFont = ['font'=>$this->fontePadrao, 'size' => $this->pdf->fontSizePt, 'style' => '']; |
76 | 76 | } |
77 | 77 | $texto = "CNPJ: {$emitCnpj} IE: {$emitIE}"; |
78 | - $y += $this->pdf->textBox($xRs+2, $y, $wRs-2, 3, $texto, $aFont, 'T', $alignH, false, '', true); |
|
78 | + $y += $this->pdf->textBox($xRs + 2, $y, $wRs - 2, 3, $texto, $aFont, 'T', $alignH, false, '', true); |
|
79 | 79 | $texto = $emitLgr . ", " . $emitNro; |
80 | - $y += $this->pdf->textBox($xRs+2, $y, $wRs-2, 3, $texto, $aFont, 'T', $alignH, false, '', true); |
|
80 | + $y += $this->pdf->textBox($xRs + 2, $y, $wRs - 2, 3, $texto, $aFont, 'T', $alignH, false, '', true); |
|
81 | 81 | $texto = $emitBairro; |
82 | - $y += $this->pdf->textBox($xRs+2, $y, $wRs-2, 3, $texto, $aFont, 'T', $alignH, false, '', true); |
|
83 | - $texto = $emitMun . "-" . $emitUF . ($emitFone ? " Fone: ".$emitFone : ""); |
|
84 | - $y += $this->pdf->textBox($xRs+2, $y, $wRs-2, 3, $texto, $aFont, 'T', $alignH, false, '', true); |
|
82 | + $y += $this->pdf->textBox($xRs + 2, $y, $wRs - 2, 3, $texto, $aFont, 'T', $alignH, false, '', true); |
|
83 | + $texto = $emitMun . "-" . $emitUF . ($emitFone ? " Fone: " . $emitFone : ""); |
|
84 | + $y += $this->pdf->textBox($xRs + 2, $y, $wRs - 2, 3, $texto, $aFont, 'T', $alignH, false, '', true); |
|
85 | 85 | $this->pdf->dashedHLine($this->margem, $this->bloco1H, $this->wPrint, 0.1, 30); |
86 | 86 | return $this->bloco1H; |
87 | 87 | } |