@@ -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'); |
@@ -28,8 +28,8 @@ discard block |
||
28 | 28 | protected $descPercent = 0.38; |
29 | 29 | protected $xml; // string XML NFe |
30 | 30 | protected $dom; |
31 | - protected $logomarca=''; // path para logomarca em jpg |
|
32 | - protected $formatoChave="#### #### #### #### #### #### #### #### #### #### ####"; |
|
31 | + protected $logomarca = ''; // path para logomarca em jpg |
|
32 | + protected $formatoChave = "#### #### #### #### #### #### #### #### #### #### ####"; |
|
33 | 33 | protected $nfeProc; |
34 | 34 | protected $nfe; |
35 | 35 | protected $infNFe; |
@@ -222,10 +222,10 @@ discard block |
||
222 | 222 | //total inicial de paginas |
223 | 223 | $totPag = 1; |
224 | 224 | //largura imprimivel em mm: largura da folha menos as margens esq/direita |
225 | - $this->wPrint = $maxW-($margEsq*2); |
|
225 | + $this->wPrint = $maxW - ($margEsq * 2); |
|
226 | 226 | //comprimento (altura) imprimivel em mm: altura da folha menos as margens |
227 | 227 | //superior e inferior |
228 | - $this->hPrint = $maxH-$margSup-$margInf; |
|
228 | + $this->hPrint = $maxH - $margSup - $margInf; |
|
229 | 229 | // estabelece contagem de paginas |
230 | 230 | $this->pdf->aliasNbPages(); |
231 | 231 | $this->pdf->setMargins($margEsq, $margSup); // fixa as margens |
@@ -249,7 +249,7 @@ discard block |
||
249 | 249 | $y = $this->blocoIX($y); //informações complementares e sobre tributos |
250 | 250 | $y = $this->blocoX($y); //creditos |
251 | 251 | |
252 | - $ymark = $maxH/4; |
|
252 | + $ymark = $maxH / 4; |
|
253 | 253 | if ($this->tpAmb == 2) { |
254 | 254 | $this->pdf->setTextColor(120, 120, 120); |
255 | 255 | $texto = "SEM VALOR FISCAL\nEmitida em ambiente de homologacao"; |
@@ -258,7 +258,7 @@ discard block |
||
258 | 258 | $this->margem, |
259 | 259 | $ymark, |
260 | 260 | $this->wPrint, |
261 | - $maxH/2, |
|
261 | + $maxH / 2, |
|
262 | 262 | $texto, |
263 | 263 | $aFont, |
264 | 264 | 'T', |
@@ -275,9 +275,9 @@ discard block |
||
275 | 275 | $aFont = ['font' => $this->fontePadrao, 'size' => 24, 'style' => 'B']; |
276 | 276 | $this->pdf->textBox( |
277 | 277 | $this->margem, |
278 | - $ymark+4, |
|
278 | + $ymark + 4, |
|
279 | 279 | $this->wPrint, |
280 | - $maxH/2, |
|
280 | + $maxH / 2, |
|
281 | 281 | $texto, |
282 | 282 | $aFont, |
283 | 283 | 'T', |
@@ -289,9 +289,9 @@ discard block |
||
289 | 289 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
290 | 290 | $this->pdf->textBox( |
291 | 291 | $this->margem, |
292 | - $ymark+14, |
|
292 | + $ymark + 14, |
|
293 | 293 | $this->wPrint, |
294 | - $maxH/2, |
|
294 | + $maxH / 2, |
|
295 | 295 | $this->submessage, |
296 | 296 | $aFont, |
297 | 297 | 'T', |
@@ -319,7 +319,7 @@ discard block |
||
319 | 319 | $y = $this->blocoVIII($y); //QRCODE |
320 | 320 | $y = $this->blocoIX($y); //informações sobre tributos |
321 | 321 | $y = $this->blocoX($y); //creditos |
322 | - $ymark = $maxH/4; |
|
322 | + $ymark = $maxH / 4; |
|
323 | 323 | if ($this->tpAmb == 2) { |
324 | 324 | $this->pdf->setTextColor(120, 120, 120); |
325 | 325 | $texto = "SEM VALOR FISCAL\nEmitida em ambiente de homologacao"; |
@@ -328,7 +328,7 @@ discard block |
||
328 | 328 | $this->margem, |
329 | 329 | $ymark, |
330 | 330 | $this->wPrint, |
331 | - $maxH/2, |
|
331 | + $maxH / 2, |
|
332 | 332 | $texto, |
333 | 333 | $aFont, |
334 | 334 | 'T', |
@@ -414,12 +414,12 @@ discard block |
||
414 | 414 | ? $this->dom->getElementsByTagName('urlChave')->item(0)->nodeValue : null; |
415 | 415 | if (!empty($this->infProt)) { |
416 | 416 | $cStat = $this->getTagValue($this->infProt, 'cStat'); |
417 | - if (!in_array($cStat, [100,150])) { |
|
417 | + if (!in_array($cStat, [100, 150])) { |
|
418 | 418 | $this->canceled = true; |
419 | 419 | } elseif (!empty($retEvento = $this->nfeProc->getElementsByTagName('retEvento')->item(0))) { |
420 | 420 | $infEvento = $retEvento->getElementsByTagName('infEvento')->item(0); |
421 | 421 | $cStat = $this->getTagValue($infEvento, "cStat"); |
422 | - $tpEvento= $this->getTagValue($infEvento, "tpEvento"); |
|
422 | + $tpEvento = $this->getTagValue($infEvento, "tpEvento"); |
|
423 | 423 | $dhEvento = date( |
424 | 424 | "d/m/Y H:i:s", |
425 | 425 | $this->toTimestamp( |
@@ -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 | } |