@@ -7,64 +7,64 @@ discard block |
||
| 7 | 7 | const FPDF_VERSION = '1.81'; |
| 8 | 8 | const FPDF_FONTPATH = 'font/'; |
| 9 | 9 | |
| 10 | - protected $page; // current page number |
|
| 11 | - protected $n; // current object number |
|
| 12 | - protected $offsets; // array of object offsets |
|
| 13 | - protected $buffer; // buffer holding in-memory PDF |
|
| 14 | - protected $pages; // array containing pages |
|
| 15 | - protected $state; // current document state |
|
| 16 | - protected $compress; // compression flag |
|
| 17 | - public $k; // scale factor (number of points in user unit) |
|
| 18 | - protected $defOrientation; // default orientation |
|
| 19 | - protected $curOrientation; // current orientation |
|
| 20 | - protected $stdPageSizes; // standard page sizes |
|
| 21 | - protected $defPageSize; // default page size |
|
| 22 | - protected $curPageSize; // current page size |
|
| 23 | - protected $curRotation; // current page rotation |
|
| 24 | - protected $pageInfo; // page-related data |
|
| 10 | + protected $page; // current page number |
|
| 11 | + protected $n; // current object number |
|
| 12 | + protected $offsets; // array of object offsets |
|
| 13 | + protected $buffer; // buffer holding in-memory PDF |
|
| 14 | + protected $pages; // array containing pages |
|
| 15 | + protected $state; // current document state |
|
| 16 | + protected $compress; // compression flag |
|
| 17 | + public $k; // scale factor (number of points in user unit) |
|
| 18 | + protected $defOrientation; // default orientation |
|
| 19 | + protected $curOrientation; // current orientation |
|
| 20 | + protected $stdPageSizes; // standard page sizes |
|
| 21 | + protected $defPageSize; // default page size |
|
| 22 | + protected $curPageSize; // current page size |
|
| 23 | + protected $curRotation; // current page rotation |
|
| 24 | + protected $pageInfo; // page-related data |
|
| 25 | 25 | protected $wPt; |
| 26 | - protected $hPt; // dimensions of current page in points |
|
| 26 | + protected $hPt; // dimensions of current page in points |
|
| 27 | 27 | protected $w; |
| 28 | - protected $h; // dimensions of current page in user unit |
|
| 29 | - protected $lMargin; // left margin |
|
| 30 | - protected $tMargin; // top margin |
|
| 31 | - protected $rMargin; // right margin |
|
| 32 | - protected $bMargin; // page break margin |
|
| 33 | - protected $cMargin; // cell margin |
|
| 28 | + protected $h; // dimensions of current page in user unit |
|
| 29 | + protected $lMargin; // left margin |
|
| 30 | + protected $tMargin; // top margin |
|
| 31 | + protected $rMargin; // right margin |
|
| 32 | + protected $bMargin; // page break margin |
|
| 33 | + protected $cMargin; // cell margin |
|
| 34 | 34 | protected $x; |
| 35 | - protected $y; // current position in user unit |
|
| 36 | - protected $lasth; // height of last printed cell |
|
| 37 | - protected $lineWidth; // line width in user unit |
|
| 38 | - protected $fontpath; // path containing fonts |
|
| 39 | - protected $coreFonts; // array of core font names |
|
| 40 | - protected $fonts; // array of used fonts |
|
| 41 | - protected $fontFiles; // array of font files |
|
| 42 | - protected $encodings; // array of encodings |
|
| 43 | - protected $cmaps; // array of ToUnicode CMaps |
|
| 44 | - protected $fontFamily; // current font family |
|
| 45 | - protected $fontStyle; // current font style |
|
| 46 | - protected $underline; // underlining flag |
|
| 47 | - protected $currentFont; // current font info |
|
| 48 | - protected $fontSizePt; // current font size in points |
|
| 49 | - public $fontSize; // current font size in user unit |
|
| 50 | - protected $drawColor; // commands for drawing color |
|
| 51 | - protected $fillColor; // commands for filling color |
|
| 52 | - protected $textColor; // commands for text color |
|
| 53 | - protected $colorFlag; // indicates whether fill and text colors are different |
|
| 54 | - protected $withAlpha; // indicates whether alpha channel is used |
|
| 55 | - protected $ws; // word spacing |
|
| 56 | - protected $images; // array of used images |
|
| 57 | - protected $pageLinks; // array of links in pages |
|
| 58 | - protected $links; // array of internal links |
|
| 59 | - protected $autoPageBreak; // automatic page breaking |
|
| 60 | - protected $pageBreakTrigger; // threshold used to trigger page breaks |
|
| 61 | - protected $inHeader; // flag set when processing header |
|
| 62 | - protected $infooter; // flag set when processing footer |
|
| 63 | - protected $aliasNbPages; // alias for total number of pages |
|
| 64 | - protected $zoomMode; // zoom display mode |
|
| 65 | - protected $layoutMode; // layout display mode |
|
| 66 | - protected $metadata; // document properties |
|
| 67 | - protected $pdfVersion; // PDF version number |
|
| 35 | + protected $y; // current position in user unit |
|
| 36 | + protected $lasth; // height of last printed cell |
|
| 37 | + protected $lineWidth; // line width in user unit |
|
| 38 | + protected $fontpath; // path containing fonts |
|
| 39 | + protected $coreFonts; // array of core font names |
|
| 40 | + protected $fonts; // array of used fonts |
|
| 41 | + protected $fontFiles; // array of font files |
|
| 42 | + protected $encodings; // array of encodings |
|
| 43 | + protected $cmaps; // array of ToUnicode CMaps |
|
| 44 | + protected $fontFamily; // current font family |
|
| 45 | + protected $fontStyle; // current font style |
|
| 46 | + protected $underline; // underlining flag |
|
| 47 | + protected $currentFont; // current font info |
|
| 48 | + protected $fontSizePt; // current font size in points |
|
| 49 | + public $fontSize; // current font size in user unit |
|
| 50 | + protected $drawColor; // commands for drawing color |
|
| 51 | + protected $fillColor; // commands for filling color |
|
| 52 | + protected $textColor; // commands for text color |
|
| 53 | + protected $colorFlag; // indicates whether fill and text colors are different |
|
| 54 | + protected $withAlpha; // indicates whether alpha channel is used |
|
| 55 | + protected $ws; // word spacing |
|
| 56 | + protected $images; // array of used images |
|
| 57 | + protected $pageLinks; // array of links in pages |
|
| 58 | + protected $links; // array of internal links |
|
| 59 | + protected $autoPageBreak; // automatic page breaking |
|
| 60 | + protected $pageBreakTrigger; // threshold used to trigger page breaks |
|
| 61 | + protected $inHeader; // flag set when processing header |
|
| 62 | + protected $infooter; // flag set when processing footer |
|
| 63 | + protected $aliasNbPages; // alias for total number of pages |
|
| 64 | + protected $zoomMode; // zoom display mode |
|
| 65 | + protected $layoutMode; // layout display mode |
|
| 66 | + protected $metadata; // document properties |
|
| 67 | + protected $pdfVersion; // PDF version number |
|
| 68 | 68 | |
| 69 | 69 | public function __construct($orientation = 'P', $unit = 'mm', $size = 'A4') |
| 70 | 70 | { |
@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | $this->withAlpha = false; |
| 98 | 98 | $this->ws = 0; |
| 99 | 99 | |
| 100 | - $this->fontpath = __DIR__. FPDF_FONTPATH; |
|
| 100 | + $this->fontpath = __DIR__ . FPDF_FONTPATH; |
|
| 101 | 101 | |
| 102 | 102 | // Core fonts |
| 103 | 103 | $this->coreFonts = [ |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | $aFont = ['font'=> $this->fontePadrao, 'size' => 7, 'style' => '']; |
| 35 | 35 | $y1 += $this->pdf->textBox( |
| 36 | 36 | $this->margem, |
| 37 | - $y+$y1, |
|
| 37 | + $y + $y1, |
|
| 38 | 38 | $this->wPrint, |
| 39 | 39 | 2, |
| 40 | 40 | $texto, |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | $aFont = ['font'=> $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
| 51 | 51 | $y2 = $this->pdf->textBox( |
| 52 | 52 | $this->margem, |
| 53 | - $y+$y1, |
|
| 53 | + $y + $y1, |
|
| 54 | 54 | $this->wPrint, |
| 55 | 55 | 4, |
| 56 | 56 | $texto, |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | $aFont = ['font'=> $this->fontePadrao, 'size' => 8, 'style' => 'I']; |
| 67 | 67 | $this->pdf->textBox( |
| 68 | 68 | $this->margem, |
| 69 | - $y+$y1+$y2, |
|
| 69 | + $y + $y1 + $y2, |
|
| 70 | 70 | $this->wPrint, |
| 71 | 71 | 3, |
| 72 | 72 | $texto, |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | $aFont = ['font'=> $this->fontePadrao, 'size' => 7, 'style' => '']; |
| 84 | 84 | $y1 = $this->pdf->textBox( |
| 85 | 85 | $this->margem, |
| 86 | - $this->bloco1H-2, |
|
| 86 | + $this->bloco1H - 2, |
|
| 87 | 87 | $this->wPrint, |
| 88 | 88 | $this->bloco2H, |
| 89 | 89 | $texto, |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | true |
| 96 | 96 | ); |
| 97 | 97 | } |
| 98 | - $this->pdf->dashedHLine($this->margem, $this->bloco2H+$y, $this->wPrint, 0.1, 30); |
|
| 98 | + $this->pdf->dashedHLine($this->margem, $this->bloco2H + $y, $this->wPrint, 0.1, 30); |
|
| 99 | 99 | return $this->bloco2H + $y; |
| 100 | 100 | } |
| 101 | 101 | } |
@@ -30,11 +30,11 @@ discard block |
||
| 30 | 30 | false |
| 31 | 31 | ); |
| 32 | 32 | |
| 33 | - $texto = $this->urlChave; |
|
| 33 | + $texto = $this->urlChave; |
|
| 34 | 34 | $aFont = ['font'=> $this->fontePadrao, 'size' => 7, 'style' => '']; |
| 35 | 35 | $y2 = $this->pdf->textBox( |
| 36 | 36 | $this->margem, |
| 37 | - $y+$y1, |
|
| 37 | + $y + $y1, |
|
| 38 | 38 | $this->wPrint, |
| 39 | 39 | 2, |
| 40 | 40 | $texto, |
@@ -46,12 +46,12 @@ discard block |
||
| 46 | 46 | false |
| 47 | 47 | ); |
| 48 | 48 | |
| 49 | - $chave = str_replace('NFe', '', $this->infNFe->getAttribute("Id")); |
|
| 49 | + $chave = str_replace('NFe', '', $this->infNFe->getAttribute("Id")); |
|
| 50 | 50 | $texto = $this->formatField($chave, $this->formatoChave); |
| 51 | 51 | $aFont = ['font'=> $this->fontePadrao, 'size' => 7, 'style' => '']; |
| 52 | 52 | $y3 = $this->pdf->textBox( |
| 53 | 53 | $this->margem, |
| 54 | - $y+$y1+$y2+1, |
|
| 54 | + $y + $y1 + $y2 + 1, |
|
| 55 | 55 | $this->wPrint, |
| 56 | 56 | 2, |
| 57 | 57 | $texto, |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | '', |
| 63 | 63 | true |
| 64 | 64 | ); |
| 65 | - $this->pdf->dashedHLine($this->margem, $this->bloco6H+$y, $this->wPrint, 0.1, 30); |
|
| 65 | + $this->pdf->dashedHLine($this->margem, $this->bloco6H + $y, $this->wPrint, 0.1, 30); |
|
| 66 | 66 | return $this->bloco6H + $y; |
| 67 | 67 | } |
| 68 | 68 | } |
@@ -19,7 +19,7 @@ discard block |
||
| 19 | 19 | */ |
| 20 | 20 | |
| 21 | 21 | $maxW = $this->wPrint; |
| 22 | - $w = ($maxW*1)+4; |
|
| 22 | + $w = ($maxW * 1) + 4; |
|
| 23 | 23 | $barcode = new Barcode(); |
| 24 | 24 | $bobj = $barcode->getBarcodeObj( |
| 25 | 25 | 'QRCODE,M', |
@@ -33,10 +33,10 @@ discard block |
||
| 33 | 33 | $wQr = 50; |
| 34 | 34 | $hQr = 50; |
| 35 | 35 | $yQr = ($y); |
| 36 | - $xQr = ($w/2) - ($wQr/2); |
|
| 36 | + $xQr = ($w / 2) - ($wQr / 2); |
|
| 37 | 37 | $pic = 'data://text/plain;base64,' . base64_encode($qrcode); |
| 38 | 38 | $info = getimagesize($pic); |
| 39 | 39 | $this->pdf->image($pic, $xQr, $yQr, $wQr, $hQr, 'PNG'); |
| 40 | - return $this->bloco8H+$y; |
|
| 40 | + return $this->bloco8H + $y; |
|
| 41 | 41 | } |
| 42 | 42 | } |
@@ -58,11 +58,11 @@ |
||
| 58 | 58 | |
| 59 | 59 | $texto = "Troco R$"; |
| 60 | 60 | $this->pdf->textBox($this->margem, $z, $this->wPrint, 3, $texto, $aFont, 'T', 'L', false, '', false); |
| 61 | - $texto = !empty($this->vTroco) ? number_format((float) $this->vTroco, 2, ',', '.') : '0,00'; |
|
| 61 | + $texto = !empty($this->vTroco) ? number_format((float) $this->vTroco, 2, ',', '.') : '0,00'; |
|
| 62 | 62 | $y1 = $this->pdf->textBox($this->margem, $z, $this->wPrint, 3, $texto, $aFont, 'T', 'R', false, '', false); |
| 63 | 63 | |
| 64 | 64 | |
| 65 | - $this->pdf->dashedHLine($this->margem, $this->bloco5H+$y, $this->wPrint, 0.1, 30); |
|
| 65 | + $this->pdf->dashedHLine($this->margem, $this->bloco5H + $y, $this->wPrint, 0.1, 30); |
|
| 66 | 66 | return $this->bloco5H + $y; |
| 67 | 67 | } |
| 68 | 68 | |
@@ -131,7 +131,7 @@ discard block |
||
| 131 | 131 | $y2 += $it->height; |
| 132 | 132 | } |
| 133 | 133 | } |
| 134 | - $this->pdf->dashedHLine($this->margem, $this->bloco3H+$y, $this->wPrint, 0.1, 30); |
|
| 134 | + $this->pdf->dashedHLine($this->margem, $this->bloco3H + $y, $this->wPrint, 0.1, 30); |
|
| 135 | 135 | return $this->bloco3H + $y; |
| 136 | 136 | } |
| 137 | 137 | |
@@ -144,7 +144,7 @@ discard block |
||
| 144 | 144 | if ($this->paperwidth < 70) { |
| 145 | 145 | $fsize = 5; |
| 146 | 146 | } |
| 147 | - $hfont = (imagefontheight($fsize)/72)*15; |
|
| 147 | + $hfont = (imagefontheight($fsize) / 72) * 15; |
|
| 148 | 148 | $aFont = ['font'=> $this->fontePadrao, 'size' => $fsize, 'style' => '']; |
| 149 | 149 | $htot = 0; |
| 150 | 150 | if ($this->det->length == 0) { |
@@ -169,7 +169,7 @@ discard block |
||
| 169 | 169 | $p = $xProd; |
| 170 | 170 | $n = $tempPDF->wordWrap($p, $descriptionWidth); |
| 171 | 171 | } |
| 172 | - $h = ($hfont * $n)+0.5; |
|
| 172 | + $h = ($hfont * $n) + 0.5; |
|
| 173 | 173 | $this->itens[] = [ |
| 174 | 174 | "codigo" => $cProd, |
| 175 | 175 | "desc" => $xProd, |
@@ -182,6 +182,6 @@ discard block |
||
| 182 | 182 | $htot += $h; |
| 183 | 183 | } |
| 184 | 184 | } |
| 185 | - return $htot+2; |
|
| 185 | + return $htot + 2; |
|
| 186 | 186 | } |
| 187 | 187 | } |
@@ -286,7 +286,7 @@ discard block |
||
| 286 | 286 | $c1, |
| 287 | 287 | 5, |
| 288 | 288 | "{$this->nfeArray['NFe']['infNFe']['ide']['tpNF']} - " . |
| 289 | - ($this->nfeArray['NFe']['infNFe']['ide']['tpNF']==1 ? 'Saida':'Entrada'), |
|
| 289 | + ($this->nfeArray['NFe']['infNFe']['ide']['tpNF'] == 1 ? 'Saida' : 'Entrada'), |
|
| 290 | 290 | 1, |
| 291 | 291 | 0, |
| 292 | 292 | 'C', |
@@ -337,7 +337,7 @@ discard block |
||
| 337 | 337 | //que uma impressora de 203dpi consiga imprimir um código legível |
| 338 | 338 | $this->pdf->code128($this->margesq * 2, $y, $chave, ($this->maxW - $this->margesq * 4), 15); |
| 339 | 339 | } else { |
| 340 | - $this->pdf->code128(($c1/2), $y, $chave, ($c1 * 3), 15); |
|
| 340 | + $this->pdf->code128(($c1 / 2), $y, $chave, ($c1 * 3), 15); |
|
| 341 | 341 | } |
| 342 | 342 | $this->pdf->setFillColor(255, 255, 255); |
| 343 | 343 | $this->pdf->ln(); |
@@ -369,7 +369,7 @@ discard block |
||
| 369 | 369 | 1 |
| 370 | 370 | ); |
| 371 | 371 | |
| 372 | - $enderecoEmit = "{$this->nfeArray['NFe']['infNFe']['emit']['enderEmit']['xMun']}" |
|
| 372 | + $enderecoEmit = "{$this->nfeArray['NFe']['infNFe']['emit']['enderEmit']['xMun']}" |
|
| 373 | 373 | . " / {$this->nfeArray['NFe']['infNFe']['emit']['enderEmit']['UF']}" |
| 374 | 374 | . " - CEP {$this->nfeArray['NFe']['infNFe']['emit']['enderEmit']['CEP']}"; |
| 375 | 375 | |
@@ -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); |
@@ -64,11 +64,11 @@ |
||
| 64 | 64 | * @var boolean |
| 65 | 65 | */ |
| 66 | 66 | protected $descProdQuebraLinha = true; |
| 67 | - /** |
|
| 68 | - * Parâmetro para ocultar a unidade tributável nos itens |
|
| 69 | - * |
|
| 70 | - * @var boolean |
|
| 71 | - */ |
|
| 67 | + /** |
|
| 68 | + * Parâmetro para ocultar a unidade tributável nos itens |
|
| 69 | + * |
|
| 70 | + * @var boolean |
|
| 71 | + */ |
|
| 72 | 72 | protected $ocultarUnidadeTributavel = false; |
| 73 | 73 | /** |
| 74 | 74 | * XML NFe |
@@ -343,7 +343,7 @@ discard block |
||
| 343 | 343 | { |
| 344 | 344 | $this->textoAdic = ''; |
| 345 | 345 | //informações adicionais |
| 346 | - $fontProduto = [ |
|
| 346 | + $fontProduto = [ |
|
| 347 | 347 | 'font' => $this->fontePadrao, |
| 348 | 348 | 'size' => 8, |
| 349 | 349 | 'style' => '' |
@@ -356,16 +356,16 @@ discard block |
||
| 356 | 356 | if ($this->textoAdic != '') { |
| 357 | 357 | $this->textoAdic .= ". \n"; |
| 358 | 358 | } |
| 359 | - $this->textoAdic .= ! empty($this->getTagValue($this->infAdic, "infCpl")) |
|
| 359 | + $this->textoAdic .= !empty($this->getTagValue($this->infAdic, "infCpl")) |
|
| 360 | 360 | //? 'Inf. Contribuinte: ' . $this->anfaveaDANFE($this->getTagValue($this->infAdic, "infCpl")) |
| 361 | 361 | ? 'Inf. Contribuinte: ' . $this->getTagValue($this->infAdic, "infCpl") |
| 362 | 362 | : ''; |
| 363 | - $infPedido = $this->geraInformacoesDaTagCompra(); |
|
| 363 | + $infPedido = $this->geraInformacoesDaTagCompra(); |
|
| 364 | 364 | if ($infPedido != "") { |
| 365 | 365 | $this->textoAdic .= $infPedido; |
| 366 | 366 | } |
| 367 | 367 | $this->textoAdic .= $this->getTagValue($this->dest, "email", ' Email do Destinatário: '); |
| 368 | - $this->textoAdic .= ! empty($this->getTagValue($this->infAdic, "infAdFisco")) |
|
| 368 | + $this->textoAdic .= !empty($this->getTagValue($this->infAdic, "infAdFisco")) |
|
| 369 | 369 | ? "\n Inf. fisco: " . $this->getTagValue($this->infAdic, "infAdFisco") |
| 370 | 370 | : ''; |
| 371 | 371 | if ($this->obsshow) { |
@@ -373,11 +373,11 @@ discard block |
||
| 373 | 373 | if (isset($obsCont)) { |
| 374 | 374 | foreach ($obsCont as $obs) { |
| 375 | 375 | $campo = $obsCont->item($i)->getAttribute("xCampo"); |
| 376 | - $xTexto = ! empty($obsCont->item($i)->getElementsByTagName("xTexto")->item(0)->nodeValue) |
|
| 376 | + $xTexto = !empty($obsCont->item($i)->getElementsByTagName("xTexto")->item(0)->nodeValue) |
|
| 377 | 377 | ? $obsCont->item($i)->getElementsByTagName("xTexto")->item(0)->nodeValue |
| 378 | 378 | : ''; |
| 379 | 379 | $this->textoAdic .= "\n" . $campo . ': ' . trim($xTexto); |
| 380 | - $i ++; |
|
| 380 | + $i++; |
|
| 381 | 381 | } |
| 382 | 382 | } |
| 383 | 383 | } |
@@ -392,7 +392,7 @@ discard block |
||
| 392 | 392 | $flagVTT = $flagVTT && (strpos(strtolower(trim($this->textoAdic)), 'trib') || |
| 393 | 393 | strpos(strtolower(trim($this->textoAdic)), 'imp')); |
| 394 | 394 | $vTotTrib = $this->getTagValue($this->ICMSTot, 'vTotTrib'); |
| 395 | - if ($vTotTrib != '' && ! $flagVTT) { |
|
| 395 | + if ($vTotTrib != '' && !$flagVTT) { |
|
| 396 | 396 | $this->textoAdic .= "\n Valor Aproximado dos Tributos : R$ " |
| 397 | 397 | . number_format($vTotTrib, 2, ",", "."); |
| 398 | 398 | } |
@@ -403,9 +403,9 @@ discard block |
||
| 403 | 403 | $this->textadicfontsize = $this->pdf->fontSize; |
| 404 | 404 | $hdadosadic = ceil($numlinhasdados * ($this->textadicfontsize)); |
| 405 | 405 | if ($hdadosadic > 70) { |
| 406 | - for ($f = 8; $f > 3; $f --) { |
|
| 406 | + for ($f = 8; $f > 3; $f--) { |
|
| 407 | 407 | $this->pdf->setFont($this->fontePadrao, '', $f); |
| 408 | - $fontProduto = [ |
|
| 408 | + $fontProduto = [ |
|
| 409 | 409 | 'font' => $this->fontePadrao, |
| 410 | 410 | 'size' => $f, |
| 411 | 411 | 'style' => '' |
@@ -528,9 +528,9 @@ discard block |
||
| 528 | 528 | $this->hdadosadic = $this->calculoEspacoVericalDadosAdicionais(); |
| 529 | 529 | |
| 530 | 530 | //altura disponivel para os campos da DANFE |
| 531 | - $hcabecalho = 47;//para cabeçalho |
|
| 532 | - $hdestinatario = 25;//para destinatario |
|
| 533 | - $hduplicatas = 12;//para cada grupo de 7 duplicatas |
|
| 531 | + $hcabecalho = 47; //para cabeçalho |
|
| 532 | + $hdestinatario = 25; //para destinatario |
|
| 533 | + $hduplicatas = 12; //para cada grupo de 7 duplicatas |
|
| 534 | 534 | if (isset($this->entrega)) { |
| 535 | 535 | $hlocalentrega = 25; |
| 536 | 536 | } else { |
@@ -541,11 +541,11 @@ discard block |
||
| 541 | 541 | } else { |
| 542 | 542 | $hlocalretirada = 0; |
| 543 | 543 | } |
| 544 | - $himposto = 18;// para imposto |
|
| 545 | - $htransporte = 25;// para transporte |
|
| 546 | - $hissqn = 11;// para issqn |
|
| 547 | - $hfooter = 5;// para rodape |
|
| 548 | - $hCabecItens = 4;//cabeçalho dos itens |
|
| 544 | + $himposto = 18; // para imposto |
|
| 545 | + $htransporte = 25; // para transporte |
|
| 546 | + $hissqn = 11; // para issqn |
|
| 547 | + $hfooter = 5; // para rodape |
|
| 548 | + $hCabecItens = 4; //cabeçalho dos itens |
|
| 549 | 549 | $hOCUPADA = $hcabecalho |
| 550 | 550 | + $hdestinatario |
| 551 | 551 | + $hlocalentrega |
@@ -568,10 +568,10 @@ discard block |
||
| 568 | 568 | $this->sizeExtraTextoFatura());*/ |
| 569 | 569 | |
| 570 | 570 | if ($this->orientacao == 'P') { |
| 571 | - $hDispo1 -= 24 * $this->qCanhoto;//para canhoto |
|
| 572 | - $w = $this->wPrint; |
|
| 571 | + $hDispo1 -= 24 * $this->qCanhoto; //para canhoto |
|
| 572 | + $w = $this->wPrint; |
|
| 573 | 573 | } else { |
| 574 | - $hcanhoto = $this->hPrint;//para canhoto |
|
| 574 | + $hcanhoto = $this->hPrint; //para canhoto |
|
| 575 | 575 | $w = $this->wPrint - $this->wCanhoto; |
| 576 | 576 | } |
| 577 | 577 | //$hDispo1 += 14; |
@@ -607,12 +607,12 @@ discard block |
||
| 607 | 607 | ); |
| 608 | 608 | $hUsado += $this->calculeHeight($itemProd, $mostrarUnidadeTributavel); |
| 609 | 609 | if ($hUsado > $hDispo) { |
| 610 | - $totPag ++; |
|
| 610 | + $totPag++; |
|
| 611 | 611 | $hDispo = $hDispo2; |
| 612 | 612 | $hUsado = $hCabecItens; |
| 613 | - $i --; // decrementa para readicionar o item que não coube nessa pagina na outra. |
|
| 613 | + $i--; // decrementa para readicionar o item que não coube nessa pagina na outra. |
|
| 614 | 614 | } |
| 615 | - $i ++; |
|
| 615 | + $i++; |
|
| 616 | 616 | } //fim da soma das areas de itens usadas |
| 617 | 617 | $qtdeItens = $i; //controle da quantidade de itens no DANFE |
| 618 | 618 | //montagem da primeira página |
@@ -644,7 +644,7 @@ discard block |
||
| 644 | 644 | $formaPag = []; |
| 645 | 645 | if (isset($this->detPag) && $this->detPag->length > 0) { |
| 646 | 646 | foreach ($this->detPag as $k => $d) { |
| 647 | - $fPag = ! empty($this->detPag->item($k)->getElementsByTagName('tPag')->item(0)->nodeValue) |
|
| 647 | + $fPag = !empty($this->detPag->item($k)->getElementsByTagName('tPag')->item(0)->nodeValue) |
|
| 648 | 648 | ? $this->detPag->item($k)->getElementsByTagName('tPag')->item(0)->nodeValue |
| 649 | 649 | : '0'; |
| 650 | 650 | $formaPag[$fPag] = $fPag; |
@@ -688,7 +688,7 @@ discard block |
||
| 688 | 688 | } |
| 689 | 689 | |
| 690 | 690 | //loop para páginas seguintes |
| 691 | - for ($n = 2; $n <= $totPag; $n ++) { |
|
| 691 | + for ($n = 2; $n <= $totPag; $n++) { |
|
| 692 | 692 | // fixa as margens |
| 693 | 693 | $this->pdf->setMargins($this->margesq, $this->margsup); |
| 694 | 694 | //adiciona nova página |
@@ -712,7 +712,7 @@ discard block |
||
| 712 | 712 | } |
| 713 | 713 | //se estiver na última página e ainda restar itens para inserir, adiciona mais uma página |
| 714 | 714 | if ($n == $totPag && $this->qtdeItensProc < $qtdeItens) { |
| 715 | - $totPag ++; |
|
| 715 | + $totPag++; |
|
| 716 | 716 | } |
| 717 | 717 | } |
| 718 | 718 | } |
@@ -741,7 +741,7 @@ discard block |
||
| 741 | 741 | if ($startPos === false) { |
| 742 | 742 | return $cdata; |
| 743 | 743 | } |
| 744 | - for ($x = $len; $x > 0; $x --) { |
|
| 744 | + for ($x = $len; $x > 0; $x--) { |
|
| 745 | 745 | if (substr($cdata, $x, 1) == '>') { |
| 746 | 746 | $endPos = $x; |
| 747 | 747 | break; |
@@ -837,15 +837,15 @@ discard block |
||
| 837 | 837 | //grupo CADATA infCpl |
| 838 | 838 | $t = $dom->getElementsByTagName('transmissor')->item(0); |
| 839 | 839 | $r = $dom->getElementsByTagName('receptor')->item(0); |
| 840 | - $versao = ! empty($dom->getElementsByTagName('versao')->item(0)->nodeValue) ? |
|
| 840 | + $versao = !empty($dom->getElementsByTagName('versao')->item(0)->nodeValue) ? |
|
| 841 | 841 | 'Versao:' . $dom->getElementsByTagName('versao')->item(0)->nodeValue . ' ' : ''; |
| 842 | - $especieNF = ! empty($dom->getElementsByTagName('especieNF')->item(0)->nodeValue) ? |
|
| 842 | + $especieNF = !empty($dom->getElementsByTagName('especieNF')->item(0)->nodeValue) ? |
|
| 843 | 843 | 'Especie:' . $dom->getElementsByTagName('especieNF')->item(0)->nodeValue . ' ' : ''; |
| 844 | - $fabEntrega = ! empty($dom->getElementsByTagName('fabEntrega')->item(0)->nodeValue) ? |
|
| 844 | + $fabEntrega = !empty($dom->getElementsByTagName('fabEntrega')->item(0)->nodeValue) ? |
|
| 845 | 845 | 'Entrega:' . $dom->getElementsByTagName('fabEntrega')->item(0)->nodeValue . ' ' : ''; |
| 846 | - $dca = ! empty($dom->getElementsByTagName('dca')->item(0)->nodeValue) ? |
|
| 846 | + $dca = !empty($dom->getElementsByTagName('dca')->item(0)->nodeValue) ? |
|
| 847 | 847 | 'dca:' . $dom->getElementsByTagName('dca')->item(0)->nodeValue . ' ' : ''; |
| 848 | - $texto .= "" . $versao . $especieNF . $fabEntrega . $dca; |
|
| 848 | + $texto .= "" . $versao . $especieNF . $fabEntrega . $dca; |
|
| 849 | 849 | if (isset($t)) { |
| 850 | 850 | if ($t->hasAttributes()) { |
| 851 | 851 | $texto .= " Transmissor "; |
@@ -891,14 +891,14 @@ discard block |
||
| 891 | 891 | } else { |
| 892 | 892 | if ($this->getTagValue($this->ide, "tpAmb") == '2') { |
| 893 | 893 | $resp['status'] = false; |
| 894 | - $resp['message'][] = "NFe EMITIDA EM HOMOLOGAÇÃO"; |
|
| 894 | + $resp['message'][] = "NFe EMITIDA EM HOMOLOGAÇÃO"; |
|
| 895 | 895 | } |
| 896 | 896 | $retEvento = $this->nfeProc->getElementsByTagName('retEvento')->item(0); |
| 897 | 897 | $cStat = $this->getTagValue($this->nfeProc, "cStat"); |
| 898 | - if (in_array($cStat, ['110','205','301','302','303'])) { |
|
| 898 | + if (in_array($cStat, ['110', '205', '301', '302', '303'])) { |
|
| 899 | 899 | $resp['status'] = false; |
| 900 | 900 | $resp['message'][] = "NFe DENEGADA"; |
| 901 | - } elseif (in_array($cStat, ['101','151','135','155']) |
|
| 901 | + } elseif (in_array($cStat, ['101', '151', '135', '155']) |
|
| 902 | 902 | || $this->cancelFlag === true |
| 903 | 903 | ) { |
| 904 | 904 | $resp['status'] = false; |
@@ -906,7 +906,7 @@ discard block |
||
| 906 | 906 | } elseif (!empty($retEvento)) { |
| 907 | 907 | $infEvento = $retEvento->getElementsByTagName('infEvento')->item(0); |
| 908 | 908 | $cStat = $this->getTagValue($infEvento, "cStat"); |
| 909 | - $tpEvento= $this->getTagValue($infEvento, "tpEvento"); |
|
| 909 | + $tpEvento = $this->getTagValue($infEvento, "tpEvento"); |
|
| 910 | 910 | $dhEvento = $this->toDateTime($this->getTagValue($infEvento, "dhRegEvento"))->format("d/m/Y H:i:s"); |
| 911 | 911 | $nProt = $this->getTagValue($infEvento, "nProt"); |
| 912 | 912 | if ($tpEvento == '110111' && |
@@ -970,7 +970,7 @@ discard block |
||
| 970 | 970 | //se for right separa 2/3 para os dados e o terço seguinte para o logo |
| 971 | 971 | //se não houver logo centraliza dos dados do emitente |
| 972 | 972 | // coloca o logo |
| 973 | - if (! empty($this->logomarca)) { |
|
| 973 | + if (!empty($this->logomarca)) { |
|
| 974 | 974 | $logoInfo = getimagesize($this->logomarca); |
| 975 | 975 | //largura da imagem em mm |
| 976 | 976 | $logoWmm = ($logoInfo[0] / 72) * 25.4; |
@@ -1026,7 +1026,7 @@ discard block |
||
| 1026 | 1026 | //endereço |
| 1027 | 1027 | $y1 = $y1 + 5; |
| 1028 | 1028 | $aFont = ['font' => $this->fontePadrao, 'size' => 8, 'style' => '']; |
| 1029 | - $fone = ! empty($this->enderEmit->getElementsByTagName("fone")->item(0)->nodeValue) |
|
| 1029 | + $fone = !empty($this->enderEmit->getElementsByTagName("fone")->item(0)->nodeValue) |
|
| 1030 | 1030 | ? $this->enderEmit->getElementsByTagName("fone")->item(0)->nodeValue |
| 1031 | 1031 | : ''; |
| 1032 | 1032 | $lgr = $this->getTagValue($this->enderEmit, "xLgr"); |
@@ -1045,8 +1045,8 @@ discard block |
||
| 1045 | 1045 | |
| 1046 | 1046 | //#################################################################################### |
| 1047 | 1047 | //coluna central Danfe |
| 1048 | - $x += $w; |
|
| 1049 | - $w = round($maxW * 0.17, 0);//35; |
|
| 1048 | + $x += $w; |
|
| 1049 | + $w = round($maxW * 0.17, 0); //35; |
|
| 1050 | 1050 | $w2 = $w; |
| 1051 | 1051 | $h = 32; |
| 1052 | 1052 | $this->pdf->textBox($x, $y, $w, $h); |
@@ -1103,8 +1103,8 @@ discard block |
||
| 1103 | 1103 | |
| 1104 | 1104 | //#################################################################################### |
| 1105 | 1105 | //coluna codigo de barras |
| 1106 | - $x += $w; |
|
| 1107 | - $w = ($maxW - $w1 - $w2);//85; |
|
| 1106 | + $x += $w; |
|
| 1107 | + $w = ($maxW - $w1 - $w2); //85; |
|
| 1108 | 1108 | $w3 = $w; |
| 1109 | 1109 | $h = 32; |
| 1110 | 1110 | $this->pdf->textBox($x, $y, $w, $h); |
@@ -1166,7 +1166,7 @@ discard block |
||
| 1166 | 1166 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
| 1167 | 1167 | $w = $w1 + $w2; |
| 1168 | 1168 | $y = $oldY; |
| 1169 | - $oldY += $h; |
|
| 1169 | + $oldY += $h; |
|
| 1170 | 1170 | $x = $oldX; |
| 1171 | 1171 | $h = 7; |
| 1172 | 1172 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, ''); |
@@ -1197,7 +1197,7 @@ discard block |
||
| 1197 | 1197 | $cStat = ''; |
| 1198 | 1198 | } else { |
| 1199 | 1199 | if (isset($this->nfeProc)) { |
| 1200 | - $texto = ! empty($this->nfeProc->getElementsByTagName("nProt")->item(0)->nodeValue) |
|
| 1200 | + $texto = !empty($this->nfeProc->getElementsByTagName("nProt")->item(0)->nodeValue) |
|
| 1201 | 1201 | ? $this->nfeProc->getElementsByTagName("nProt")->item(0)->nodeValue |
| 1202 | 1202 | : ''; |
| 1203 | 1203 | $dtHora = $this->toDateTime( |
@@ -1227,7 +1227,7 @@ discard block |
||
| 1227 | 1227 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
| 1228 | 1228 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, ''); |
| 1229 | 1229 | //INSCRIÇÃO MUNICIPAL |
| 1230 | - $x += $w; |
|
| 1230 | + $x += $w; |
|
| 1231 | 1231 | $texto = 'INSCRIÇÃO MUNICIPAL'; |
| 1232 | 1232 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
| 1233 | 1233 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, ''); |
@@ -1235,29 +1235,29 @@ discard block |
||
| 1235 | 1235 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
| 1236 | 1236 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, ''); |
| 1237 | 1237 | //INSCRIÇÃO ESTADUAL DO SUBST. TRIBUT. |
| 1238 | - $x += $w; |
|
| 1238 | + $x += $w; |
|
| 1239 | 1239 | $texto = 'INSCRIÇÃO ESTADUAL DO SUBST. TRIBUT.'; |
| 1240 | 1240 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
| 1241 | 1241 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, ''); |
| 1242 | - $texto = ! empty($this->emit->getElementsByTagName("IEST")->item(0)->nodeValue) |
|
| 1242 | + $texto = !empty($this->emit->getElementsByTagName("IEST")->item(0)->nodeValue) |
|
| 1243 | 1243 | ? $this->emit->getElementsByTagName("IEST")->item(0)->nodeValue |
| 1244 | 1244 | : ''; |
| 1245 | 1245 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
| 1246 | 1246 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, ''); |
| 1247 | 1247 | //CNPJ |
| 1248 | - $x += $w; |
|
| 1248 | + $x += $w; |
|
| 1249 | 1249 | $w = ($maxW - (3 * $w)); |
| 1250 | 1250 | $texto = 'CNPJ / CPF'; |
| 1251 | 1251 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
| 1252 | 1252 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, ''); |
| 1253 | 1253 | //Pegando valor do CPF/CNPJ |
| 1254 | - if (! empty($this->emit->getElementsByTagName("CNPJ")->item(0)->nodeValue)) { |
|
| 1254 | + if (!empty($this->emit->getElementsByTagName("CNPJ")->item(0)->nodeValue)) { |
|
| 1255 | 1255 | $texto = $this->formatField( |
| 1256 | 1256 | $this->emit->getElementsByTagName("CNPJ")->item(0)->nodeValue, |
| 1257 | 1257 | "###.###.###/####-##" |
| 1258 | 1258 | ); |
| 1259 | 1259 | } else { |
| 1260 | - $texto = ! empty($this->emit->getElementsByTagName("CPF")->item(0)->nodeValue) |
|
| 1260 | + $texto = !empty($this->emit->getElementsByTagName("CPF")->item(0)->nodeValue) |
|
| 1261 | 1261 | ? $this->formatField( |
| 1262 | 1262 | $this->emit->getElementsByTagName("CPF")->item(0)->nodeValue, |
| 1263 | 1263 | "###.###.###-##" |
@@ -1276,7 +1276,7 @@ discard block |
||
| 1276 | 1276 | $n = count($resp['message']); |
| 1277 | 1277 | $alttot = $n * 15; |
| 1278 | 1278 | $x = 10; |
| 1279 | - $y = $this->hPrint/2 - $alttot/2; |
|
| 1279 | + $y = $this->hPrint / 2 - $alttot / 2; |
|
| 1280 | 1280 | $h = 15; |
| 1281 | 1281 | $w = $maxW - (2 * $x); |
| 1282 | 1282 | $this->pdf->settextcolor(170, 170, 170); |
@@ -1349,7 +1349,7 @@ discard block |
||
| 1349 | 1349 | //NOME / RAZÃO SOCIAL |
| 1350 | 1350 | $w = round($maxW * 0.61, 0); |
| 1351 | 1351 | $w1 = $w; |
| 1352 | - $y += 3; |
|
| 1352 | + $y += 3; |
|
| 1353 | 1353 | $texto = 'NOME / RAZÃO SOCIAL'; |
| 1354 | 1354 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
| 1355 | 1355 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, ''); |
@@ -1361,20 +1361,20 @@ discard block |
||
| 1361 | 1361 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'L', 1, ''); |
| 1362 | 1362 | } |
| 1363 | 1363 | //CNPJ / CPF |
| 1364 | - $x += $w; |
|
| 1364 | + $x += $w; |
|
| 1365 | 1365 | $w = round($maxW * 0.23, 0); |
| 1366 | 1366 | $w2 = $w; |
| 1367 | 1367 | $texto = 'CNPJ / CPF'; |
| 1368 | 1368 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
| 1369 | 1369 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, ''); |
| 1370 | 1370 | //Pegando valor do CPF/CNPJ |
| 1371 | - if (! empty($this->dest->getElementsByTagName("CNPJ")->item(0)->nodeValue)) { |
|
| 1371 | + if (!empty($this->dest->getElementsByTagName("CNPJ")->item(0)->nodeValue)) { |
|
| 1372 | 1372 | $texto = $this->formatField( |
| 1373 | 1373 | $this->dest->getElementsByTagName("CNPJ")->item(0)->nodeValue, |
| 1374 | 1374 | "###.###.###/####-##" |
| 1375 | 1375 | ); |
| 1376 | 1376 | } else { |
| 1377 | - $texto = ! empty($this->dest->getElementsByTagName("CPF")->item(0)->nodeValue) |
|
| 1377 | + $texto = !empty($this->dest->getElementsByTagName("CPF")->item(0)->nodeValue) |
|
| 1378 | 1378 | ? $this->formatField( |
| 1379 | 1379 | $this->dest->getElementsByTagName("CPF")->item(0)->nodeValue, |
| 1380 | 1380 | "###.###.###-##" |
@@ -1384,17 +1384,17 @@ discard block |
||
| 1384 | 1384 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
| 1385 | 1385 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, ''); |
| 1386 | 1386 | //DATA DA EMISSÃO |
| 1387 | - $x += $w; |
|
| 1387 | + $x += $w; |
|
| 1388 | 1388 | $w = $maxW - ($w1 + $w2); |
| 1389 | 1389 | $wx = $w; |
| 1390 | 1390 | $texto = 'DATA DA EMISSÃO'; |
| 1391 | 1391 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
| 1392 | 1392 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, ''); |
| 1393 | - $dEmi = ! empty($this->ide->getElementsByTagName("dEmi")->item(0)->nodeValue) |
|
| 1393 | + $dEmi = !empty($this->ide->getElementsByTagName("dEmi")->item(0)->nodeValue) |
|
| 1394 | 1394 | ? $this->ide->getElementsByTagName("dEmi")->item(0)->nodeValue |
| 1395 | 1395 | : ''; |
| 1396 | 1396 | if ($dEmi == '') { |
| 1397 | - $dEmi = ! empty($this->ide->getElementsByTagName("dhEmi")->item(0)->nodeValue) |
|
| 1397 | + $dEmi = !empty($this->ide->getElementsByTagName("dhEmi")->item(0)->nodeValue) |
|
| 1398 | 1398 | ? $this->ide->getElementsByTagName("dhEmi")->item(0)->nodeValue |
| 1399 | 1399 | : ''; |
| 1400 | 1400 | $aDemi = explode('T', $dEmi); |
@@ -1410,7 +1410,7 @@ discard block |
||
| 1410 | 1410 | //ENDEREÇO |
| 1411 | 1411 | $w = round($maxW * 0.47, 0); |
| 1412 | 1412 | $w1 = $w; |
| 1413 | - $y += $h; |
|
| 1413 | + $y += $h; |
|
| 1414 | 1414 | $x = $oldX; |
| 1415 | 1415 | $texto = 'ENDEREÇO'; |
| 1416 | 1416 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
@@ -1422,7 +1422,7 @@ discard block |
||
| 1422 | 1422 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
| 1423 | 1423 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'L', 0, '', true); |
| 1424 | 1424 | //BAIRRO / DISTRITO |
| 1425 | - $x += $w; |
|
| 1425 | + $x += $w; |
|
| 1426 | 1426 | $w = round($maxW * 0.21, 0); |
| 1427 | 1427 | $w2 = $w; |
| 1428 | 1428 | $texto = 'BAIRRO / DISTRITO'; |
@@ -1432,29 +1432,29 @@ discard block |
||
| 1432 | 1432 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
| 1433 | 1433 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, ''); |
| 1434 | 1434 | //CEP |
| 1435 | - $x += $w; |
|
| 1435 | + $x += $w; |
|
| 1436 | 1436 | $w = $maxW - $w1 - $w2 - $wx; |
| 1437 | 1437 | $w2 = $w; |
| 1438 | 1438 | $texto = 'CEP'; |
| 1439 | 1439 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
| 1440 | 1440 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, ''); |
| 1441 | - $texto = ! empty($this->dest->getElementsByTagName("CEP")->item(0)->nodeValue) |
|
| 1441 | + $texto = !empty($this->dest->getElementsByTagName("CEP")->item(0)->nodeValue) |
|
| 1442 | 1442 | ? $this->dest->getElementsByTagName("CEP")->item(0)->nodeValue |
| 1443 | 1443 | : ''; |
| 1444 | 1444 | $texto = $this->formatField($texto, "#####-###"); |
| 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 | //DATA DA SAÍDA |
| 1448 | - $x += $w; |
|
| 1448 | + $x += $w; |
|
| 1449 | 1449 | $w = $wx; |
| 1450 | 1450 | $texto = 'DATA 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 | - $dSaiEnt = ! empty($this->ide->getElementsByTagName("dSaiEnt")->item(0)->nodeValue) |
|
| 1453 | + $dSaiEnt = !empty($this->ide->getElementsByTagName("dSaiEnt")->item(0)->nodeValue) |
|
| 1454 | 1454 | ? $this->ide->getElementsByTagName("dSaiEnt")->item(0)->nodeValue |
| 1455 | 1455 | : ''; |
| 1456 | 1456 | if ($dSaiEnt == '') { |
| 1457 | - $dSaiEnt = ! empty($this->ide->getElementsByTagName("dhSaiEnt")->item(0)->nodeValue) |
|
| 1457 | + $dSaiEnt = !empty($this->ide->getElementsByTagName("dhSaiEnt")->item(0)->nodeValue) |
|
| 1458 | 1458 | ? $this->ide->getElementsByTagName("dhSaiEnt")->item(0)->nodeValue |
| 1459 | 1459 | : ''; |
| 1460 | 1460 | $aDsaient = explode('T', $dSaiEnt); |
@@ -1465,7 +1465,7 @@ discard block |
||
| 1465 | 1465 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, ''); |
| 1466 | 1466 | //MUNICÍPIO |
| 1467 | 1467 | $w = $w1; |
| 1468 | - $y += $h; |
|
| 1468 | + $y += $h; |
|
| 1469 | 1469 | $x = $oldX; |
| 1470 | 1470 | $texto = 'MUNICÍPIO'; |
| 1471 | 1471 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
@@ -1479,7 +1479,7 @@ discard block |
||
| 1479 | 1479 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
| 1480 | 1480 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'L', 0, ''); |
| 1481 | 1481 | //UF |
| 1482 | - $x += $w; |
|
| 1482 | + $x += $w; |
|
| 1483 | 1483 | $w = 8; |
| 1484 | 1484 | $texto = 'UF'; |
| 1485 | 1485 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
@@ -1488,19 +1488,19 @@ discard block |
||
| 1488 | 1488 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
| 1489 | 1489 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, ''); |
| 1490 | 1490 | //FONE / FAX |
| 1491 | - $x += $w; |
|
| 1491 | + $x += $w; |
|
| 1492 | 1492 | $w = round(($maxW - $w1 - $wx - 8) / 2, 0); |
| 1493 | 1493 | $w3 = $w; |
| 1494 | 1494 | $texto = 'FONE / FAX'; |
| 1495 | 1495 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
| 1496 | 1496 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, ''); |
| 1497 | - $texto = ! empty($this->dest->getElementsByTagName("fone")->item(0)->nodeValue) |
|
| 1497 | + $texto = !empty($this->dest->getElementsByTagName("fone")->item(0)->nodeValue) |
|
| 1498 | 1498 | ? $this->dest->getElementsByTagName("fone")->item(0)->nodeValue |
| 1499 | 1499 | : ''; |
| 1500 | 1500 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
| 1501 | 1501 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, ''); |
| 1502 | 1502 | //INSCRIÇÃO ESTADUAL |
| 1503 | - $x += $w; |
|
| 1503 | + $x += $w; |
|
| 1504 | 1504 | $w = $maxW - $w1 - $wx - 8 - $w3; |
| 1505 | 1505 | $texto = 'INSCRIÇÃO ESTADUAL'; |
| 1506 | 1506 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
@@ -1510,16 +1510,16 @@ discard block |
||
| 1510 | 1510 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
| 1511 | 1511 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, ''); |
| 1512 | 1512 | //HORA DA SAÍDA |
| 1513 | - $x += $w; |
|
| 1513 | + $x += $w; |
|
| 1514 | 1514 | $w = $wx; |
| 1515 | 1515 | $texto = 'HORA DA SAÍDA/ENTRADA'; |
| 1516 | 1516 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
| 1517 | 1517 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, ''); |
| 1518 | - $hSaiEnt = ! empty($this->ide->getElementsByTagName("hSaiEnt")->item(0)->nodeValue) |
|
| 1518 | + $hSaiEnt = !empty($this->ide->getElementsByTagName("hSaiEnt")->item(0)->nodeValue) |
|
| 1519 | 1519 | ? $this->ide->getElementsByTagName("hSaiEnt")->item(0)->nodeValue |
| 1520 | 1520 | : ''; |
| 1521 | 1521 | if ($hSaiEnt == '') { |
| 1522 | - $dhSaiEnt = ! empty($this->ide->getElementsByTagName("dhSaiEnt")->item(0)->nodeValue) |
|
| 1522 | + $dhSaiEnt = !empty($this->ide->getElementsByTagName("dhSaiEnt")->item(0)->nodeValue) |
|
| 1523 | 1523 | ? $this->ide->getElementsByTagName("dhSaiEnt")->item(0)->nodeValue |
| 1524 | 1524 | : ''; |
| 1525 | 1525 | $tsDhSaiEnt = $this->toDateTime($dhSaiEnt); |
@@ -1563,7 +1563,7 @@ discard block |
||
| 1563 | 1563 | //NOME / RAZÃO SOCIAL |
| 1564 | 1564 | $w = round($maxW * 0.61, 0); |
| 1565 | 1565 | $w1 = $w; |
| 1566 | - $y += 3; |
|
| 1566 | + $y += 3; |
|
| 1567 | 1567 | $texto = 'NOME / RAZÃO SOCIAL'; |
| 1568 | 1568 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
| 1569 | 1569 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, ''); |
@@ -1578,20 +1578,20 @@ discard block |
||
| 1578 | 1578 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'L', 1, ''); |
| 1579 | 1579 | } |
| 1580 | 1580 | //CNPJ / CPF |
| 1581 | - $x += $w; |
|
| 1581 | + $x += $w; |
|
| 1582 | 1582 | $w = round($maxW * 0.23, 0); |
| 1583 | 1583 | $w2 = $w; |
| 1584 | 1584 | $texto = 'CNPJ / CPF'; |
| 1585 | 1585 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
| 1586 | 1586 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, ''); |
| 1587 | 1587 | //Pegando valor do CPF/CNPJ |
| 1588 | - if (! empty($this->entrega->getElementsByTagName("CNPJ")->item(0)->nodeValue)) { |
|
| 1588 | + if (!empty($this->entrega->getElementsByTagName("CNPJ")->item(0)->nodeValue)) { |
|
| 1589 | 1589 | $texto = $this->formatField( |
| 1590 | 1590 | $this->entrega->getElementsByTagName("CNPJ")->item(0)->nodeValue, |
| 1591 | 1591 | "###.###.###/####-##" |
| 1592 | 1592 | ); |
| 1593 | 1593 | } else { |
| 1594 | - $texto = ! empty($this->entrega->getElementsByTagName("CPF")->item(0)->nodeValue) ? |
|
| 1594 | + $texto = !empty($this->entrega->getElementsByTagName("CPF")->item(0)->nodeValue) ? |
|
| 1595 | 1595 | $this->formatField( |
| 1596 | 1596 | $this->entrega->getElementsByTagName("CPF")->item(0)->nodeValue, |
| 1597 | 1597 | "###.###.###-##" |
@@ -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', 'C', 0, ''); |
| 1602 | 1602 | //INSCRIÇÃO ESTADUAL |
| 1603 | - $x += $w; |
|
| 1603 | + $x += $w; |
|
| 1604 | 1604 | $w = $maxW - ($w1 + $w2); |
| 1605 | 1605 | $wx = $w; |
| 1606 | 1606 | $texto = 'INSCRIÇÃO ESTADUAL'; |
@@ -1619,7 +1619,7 @@ discard block |
||
| 1619 | 1619 | //ENDEREÇO |
| 1620 | 1620 | $w = round($maxW * 0.355, 0) + $wx; |
| 1621 | 1621 | $w1 = $w; |
| 1622 | - $y += $h; |
|
| 1622 | + $y += $h; |
|
| 1623 | 1623 | $x = $oldX; |
| 1624 | 1624 | $texto = 'ENDEREÇO'; |
| 1625 | 1625 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
@@ -1630,7 +1630,7 @@ discard block |
||
| 1630 | 1630 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
| 1631 | 1631 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'L', 0, '', true); |
| 1632 | 1632 | //BAIRRO / DISTRITO |
| 1633 | - $x += $w; |
|
| 1633 | + $x += $w; |
|
| 1634 | 1634 | $w = round($maxW * 0.335, 0); |
| 1635 | 1635 | $w2 = $w; |
| 1636 | 1636 | $texto = 'BAIRRO / DISTRITO'; |
@@ -1640,12 +1640,12 @@ discard block |
||
| 1640 | 1640 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
| 1641 | 1641 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, ''); |
| 1642 | 1642 | //CEP |
| 1643 | - $x += $w; |
|
| 1643 | + $x += $w; |
|
| 1644 | 1644 | $w = $maxW - ($w1 + $w2); |
| 1645 | 1645 | $texto = 'CEP'; |
| 1646 | 1646 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
| 1647 | 1647 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, ''); |
| 1648 | - $texto = ! empty($this->entrega->getElementsByTagName("CEP")->item(0)->nodeValue) ? |
|
| 1648 | + $texto = !empty($this->entrega->getElementsByTagName("CEP")->item(0)->nodeValue) ? |
|
| 1649 | 1649 | $this->entrega->getElementsByTagName("CEP")->item(0)->nodeValue : ''; |
| 1650 | 1650 | $texto = $this->formatField($texto, "#####-###"); |
| 1651 | 1651 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
@@ -1653,7 +1653,7 @@ discard block |
||
| 1653 | 1653 | //MUNICÍPIO |
| 1654 | 1654 | $w = round($maxW * 0.805, 0); |
| 1655 | 1655 | $w1 = $w; |
| 1656 | - $y += $h; |
|
| 1656 | + $y += $h; |
|
| 1657 | 1657 | $x = $oldX; |
| 1658 | 1658 | $texto = 'MUNICÍPIO'; |
| 1659 | 1659 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
@@ -1665,7 +1665,7 @@ discard block |
||
| 1665 | 1665 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
| 1666 | 1666 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'L', 0, ''); |
| 1667 | 1667 | //UF |
| 1668 | - $x += $w; |
|
| 1668 | + $x += $w; |
|
| 1669 | 1669 | $w = 8; |
| 1670 | 1670 | $texto = 'UF'; |
| 1671 | 1671 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
@@ -1674,12 +1674,12 @@ discard block |
||
| 1674 | 1674 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
| 1675 | 1675 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, ''); |
| 1676 | 1676 | //FONE / FAX |
| 1677 | - $x += $w; |
|
| 1677 | + $x += $w; |
|
| 1678 | 1678 | $w = $maxW - $w - $w1; |
| 1679 | 1679 | $texto = 'FONE / FAX'; |
| 1680 | 1680 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
| 1681 | 1681 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, ''); |
| 1682 | - $texto = ! empty($this->entrega->getElementsByTagName("fone")->item(0)->nodeValue) ? |
|
| 1682 | + $texto = !empty($this->entrega->getElementsByTagName("fone")->item(0)->nodeValue) ? |
|
| 1683 | 1683 | $this->entrega->getElementsByTagName("fone")->item(0)->nodeValue : ''; |
| 1684 | 1684 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
| 1685 | 1685 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, ''); |
@@ -1716,7 +1716,7 @@ discard block |
||
| 1716 | 1716 | //NOME / RAZÃO SOCIAL |
| 1717 | 1717 | $w = round($maxW * 0.61, 0); |
| 1718 | 1718 | $w1 = $w; |
| 1719 | - $y += 3; |
|
| 1719 | + $y += 3; |
|
| 1720 | 1720 | $texto = 'NOME / RAZÃO SOCIAL'; |
| 1721 | 1721 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
| 1722 | 1722 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, ''); |
@@ -1731,20 +1731,20 @@ discard block |
||
| 1731 | 1731 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'L', 1, ''); |
| 1732 | 1732 | } |
| 1733 | 1733 | //CNPJ / CPF |
| 1734 | - $x += $w; |
|
| 1734 | + $x += $w; |
|
| 1735 | 1735 | $w = round($maxW * 0.23, 0); |
| 1736 | 1736 | $w2 = $w; |
| 1737 | 1737 | $texto = 'CNPJ / CPF'; |
| 1738 | 1738 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
| 1739 | 1739 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, ''); |
| 1740 | 1740 | //Pegando valor do CPF/CNPJ |
| 1741 | - if (! empty($this->retirada->getElementsByTagName("CNPJ")->item(0)->nodeValue)) { |
|
| 1741 | + if (!empty($this->retirada->getElementsByTagName("CNPJ")->item(0)->nodeValue)) { |
|
| 1742 | 1742 | $texto = $this->formatField( |
| 1743 | 1743 | $this->retirada->getElementsByTagName("CNPJ")->item(0)->nodeValue, |
| 1744 | 1744 | "###.###.###/####-##" |
| 1745 | 1745 | ); |
| 1746 | 1746 | } else { |
| 1747 | - $texto = ! empty($this->retirada->getElementsByTagName("CPF")->item(0)->nodeValue) ? |
|
| 1747 | + $texto = !empty($this->retirada->getElementsByTagName("CPF")->item(0)->nodeValue) ? |
|
| 1748 | 1748 | $this->formatField( |
| 1749 | 1749 | $this->retirada->getElementsByTagName("CPF")->item(0)->nodeValue, |
| 1750 | 1750 | "###.###.###-##" |
@@ -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', 'C', 0, ''); |
| 1755 | 1755 | //INSCRIÇÃO ESTADUAL |
| 1756 | - $x += $w; |
|
| 1756 | + $x += $w; |
|
| 1757 | 1757 | $w = $maxW - ($w1 + $w2); |
| 1758 | 1758 | $wx = $w; |
| 1759 | 1759 | $texto = 'INSCRIÇÃO ESTADUAL'; |
@@ -1772,7 +1772,7 @@ discard block |
||
| 1772 | 1772 | //ENDEREÇO |
| 1773 | 1773 | $w = round($maxW * 0.355, 0) + $wx; |
| 1774 | 1774 | $w1 = $w; |
| 1775 | - $y += $h; |
|
| 1775 | + $y += $h; |
|
| 1776 | 1776 | $x = $oldX; |
| 1777 | 1777 | $texto = 'ENDEREÇO'; |
| 1778 | 1778 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
@@ -1783,7 +1783,7 @@ discard block |
||
| 1783 | 1783 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
| 1784 | 1784 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'L', 0, '', true); |
| 1785 | 1785 | //BAIRRO / DISTRITO |
| 1786 | - $x += $w; |
|
| 1786 | + $x += $w; |
|
| 1787 | 1787 | $w = round($maxW * 0.335, 0); |
| 1788 | 1788 | $w2 = $w; |
| 1789 | 1789 | $texto = 'BAIRRO / DISTRITO'; |
@@ -1793,12 +1793,12 @@ discard block |
||
| 1793 | 1793 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
| 1794 | 1794 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, ''); |
| 1795 | 1795 | //CEP |
| 1796 | - $x += $w; |
|
| 1796 | + $x += $w; |
|
| 1797 | 1797 | $w = $maxW - ($w1 + $w2); |
| 1798 | 1798 | $texto = 'CEP'; |
| 1799 | 1799 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
| 1800 | 1800 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, ''); |
| 1801 | - $texto = ! empty($this->retirada->getElementsByTagName("CEP")->item(0)->nodeValue) ? |
|
| 1801 | + $texto = !empty($this->retirada->getElementsByTagName("CEP")->item(0)->nodeValue) ? |
|
| 1802 | 1802 | $this->retirada->getElementsByTagName("CEP")->item(0)->nodeValue : ''; |
| 1803 | 1803 | $texto = $this->formatField($texto, "#####-###"); |
| 1804 | 1804 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
@@ -1806,7 +1806,7 @@ discard block |
||
| 1806 | 1806 | //MUNICÍPIO |
| 1807 | 1807 | $w = round($maxW * 0.805, 0); |
| 1808 | 1808 | $w1 = $w; |
| 1809 | - $y += $h; |
|
| 1809 | + $y += $h; |
|
| 1810 | 1810 | $x = $oldX; |
| 1811 | 1811 | $texto = 'MUNICÍPIO'; |
| 1812 | 1812 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
@@ -1818,7 +1818,7 @@ discard block |
||
| 1818 | 1818 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
| 1819 | 1819 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'L', 0, ''); |
| 1820 | 1820 | //UF |
| 1821 | - $x += $w; |
|
| 1821 | + $x += $w; |
|
| 1822 | 1822 | $w = 8; |
| 1823 | 1823 | $texto = 'UF'; |
| 1824 | 1824 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
@@ -1827,12 +1827,12 @@ discard block |
||
| 1827 | 1827 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
| 1828 | 1828 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, ''); |
| 1829 | 1829 | //FONE / FAX |
| 1830 | - $x += $w; |
|
| 1830 | + $x += $w; |
|
| 1831 | 1831 | $w = $maxW - $w - $w1; |
| 1832 | 1832 | $texto = 'FONE / FAX'; |
| 1833 | 1833 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
| 1834 | 1834 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, ''); |
| 1835 | - $texto = ! empty($this->retirada->getElementsByTagName("fone")->item(0)->nodeValue) ? |
|
| 1835 | + $texto = !empty($this->retirada->getElementsByTagName("fone")->item(0)->nodeValue) ? |
|
| 1836 | 1836 | $this->retirada->getElementsByTagName("fone")->item(0)->nodeValue : ''; |
| 1837 | 1837 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
| 1838 | 1838 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, ''); |
@@ -1852,7 +1852,7 @@ discard block |
||
| 1852 | 1852 | if (isset($this->cobr)) { |
| 1853 | 1853 | $fat = $this->cobr->getElementsByTagName("fat")->item(0); |
| 1854 | 1854 | if (isset($fat)) { |
| 1855 | - if (! empty($this->getTagValue($this->ide, "indPag"))) { |
|
| 1855 | + if (!empty($this->getTagValue($this->ide, "indPag"))) { |
|
| 1856 | 1856 | $textoIndPag = ""; |
| 1857 | 1857 | $indPag = $this->getTagValue($this->ide, "indPag"); |
| 1858 | 1858 | if ($indPag === "0") { |
@@ -1926,7 +1926,7 @@ discard block |
||
| 1926 | 1926 | $h = 8; |
| 1927 | 1927 | $aFont = ['font' => $this->fontePadrao, 'size' => 7, 'style' => 'B']; |
| 1928 | 1928 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, ''); |
| 1929 | - $y += 3; |
|
| 1929 | + $y += 3; |
|
| 1930 | 1930 | $dups = ""; |
| 1931 | 1931 | $dupcont = 0; |
| 1932 | 1932 | $nFat = $this->dup->length; |
@@ -1960,13 +1960,13 @@ discard block |
||
| 1960 | 1960 | } |
| 1961 | 1961 | $increm = 1; |
| 1962 | 1962 | foreach ($this->dup as $k => $d) { |
| 1963 | - $nDup = ! empty($this->dup->item($k)->getElementsByTagName('nDup')->item(0)->nodeValue) |
|
| 1963 | + $nDup = !empty($this->dup->item($k)->getElementsByTagName('nDup')->item(0)->nodeValue) |
|
| 1964 | 1964 | ? $this->dup->item($k)->getElementsByTagName('nDup')->item(0)->nodeValue |
| 1965 | 1965 | : ''; |
| 1966 | - $dDup = ! empty($this->dup->item($k)->getElementsByTagName('dVenc')->item(0)->nodeValue) |
|
| 1966 | + $dDup = !empty($this->dup->item($k)->getElementsByTagName('dVenc')->item(0)->nodeValue) |
|
| 1967 | 1967 | ? $this->ymdTodmy($this->dup->item($k)->getElementsByTagName('dVenc')->item(0)->nodeValue) |
| 1968 | 1968 | : ''; |
| 1969 | - $vDup = ! empty($this->dup->item($k)->getElementsByTagName('vDup')->item(0)->nodeValue) |
|
| 1969 | + $vDup = !empty($this->dup->item($k)->getElementsByTagName('vDup')->item(0)->nodeValue) |
|
| 1970 | 1970 | ? 'R$ ' . number_format( |
| 1971 | 1971 | $this->dup->item($k)->getElementsByTagName('vDup')->item(0)->nodeValue, |
| 1972 | 1972 | 2, |
@@ -2013,7 +2013,7 @@ discard block |
||
| 2013 | 2013 | } |
| 2014 | 2014 | if ($dupcont == 0) { |
| 2015 | 2015 | $y -= 9; |
| 2016 | - $linha --; |
|
| 2016 | + $linha--; |
|
| 2017 | 2017 | } |
| 2018 | 2018 | |
| 2019 | 2019 | return ($y + $h); |
@@ -2053,7 +2053,7 @@ discard block |
||
| 2053 | 2053 | $h = 8; |
| 2054 | 2054 | $aFont = ['font' => $this->fontePadrao, 'size' => 7, 'style' => 'B']; |
| 2055 | 2055 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, ''); |
| 2056 | - $y += 3; |
|
| 2056 | + $y += 3; |
|
| 2057 | 2057 | $dups = ""; |
| 2058 | 2058 | $dupcont = 0; |
| 2059 | 2059 | if ($this->orientacao == 'P') { |
@@ -2086,7 +2086,7 @@ discard block |
||
| 2086 | 2086 | '90' => 'Sem pagamento', |
| 2087 | 2087 | '99' => 'Outros' |
| 2088 | 2088 | ]; |
| 2089 | - $bandeira = [ |
|
| 2089 | + $bandeira = [ |
|
| 2090 | 2090 | '01' => 'Visa', |
| 2091 | 2091 | '02' => 'Mastercard', |
| 2092 | 2092 | '03' => 'American', |
@@ -2099,10 +2099,10 @@ discard block |
||
| 2099 | 2099 | '99' => 'Outros' |
| 2100 | 2100 | ]; |
| 2101 | 2101 | foreach ($this->detPag as $k => $d) { |
| 2102 | - $fPag = ! empty($this->detPag->item($k)->getElementsByTagName('tPag')->item(0)->nodeValue) |
|
| 2102 | + $fPag = !empty($this->detPag->item($k)->getElementsByTagName('tPag')->item(0)->nodeValue) |
|
| 2103 | 2103 | ? $this->detPag->item($k)->getElementsByTagName('tPag')->item(0)->nodeValue |
| 2104 | 2104 | : '0'; |
| 2105 | - $vPag = ! empty($this->detPag->item($k)->getElementsByTagName('vPag')->item(0)->nodeValue) |
|
| 2105 | + $vPag = !empty($this->detPag->item($k)->getElementsByTagName('vPag')->item(0)->nodeValue) |
|
| 2106 | 2106 | ? 'R$ ' . number_format( |
| 2107 | 2107 | $this->detPag->item($k)->getElementsByTagName('vPag')->item(0)->nodeValue, |
| 2108 | 2108 | 2, |
@@ -2145,7 +2145,7 @@ discard block |
||
| 2145 | 2145 | } |
| 2146 | 2146 | if ($dupcont == 0) { |
| 2147 | 2147 | $y -= 9; |
| 2148 | - $linha --; |
|
| 2148 | + $linha--; |
|
| 2149 | 2149 | } |
| 2150 | 2150 | |
| 2151 | 2151 | return ($y + $h); |
@@ -2177,7 +2177,7 @@ discard block |
||
| 2177 | 2177 | $the_field = $this->ICMSTot->getElementsByTagName($campoImposto)->item(0); |
| 2178 | 2178 | if (isset($the_field)) { |
| 2179 | 2179 | $the_value = $the_field->nodeValue; |
| 2180 | - if (! empty($the_value)) { |
|
| 2180 | + if (!empty($the_value)) { |
|
| 2181 | 2181 | $valorImposto = number_format($the_value, 2, ",", "."); |
| 2182 | 2182 | } |
| 2183 | 2183 | } |
@@ -2206,10 +2206,10 @@ discard block |
||
| 2206 | 2206 | $x_inicial = $x; |
| 2207 | 2207 | //##################################################################### |
| 2208 | 2208 | $campos_por_linha = 9; |
| 2209 | - if (! $this->exibirPIS) { |
|
| 2210 | - $campos_por_linha --; |
|
| 2209 | + if (!$this->exibirPIS) { |
|
| 2210 | + $campos_por_linha--; |
|
| 2211 | 2211 | } |
| 2212 | - if (! $this->exibirIcmsInterestadual) { |
|
| 2212 | + if (!$this->exibirIcmsInterestadual) { |
|
| 2213 | 2213 | $campos_por_linha -= 2; |
| 2214 | 2214 | } |
| 2215 | 2215 | |
@@ -2296,12 +2296,12 @@ discard block |
||
| 2296 | 2296 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, ''); |
| 2297 | 2297 | //NOME / RAZÃO SOCIAL |
| 2298 | 2298 | $w1 = $maxW * 0.29; |
| 2299 | - $y += 3; |
|
| 2299 | + $y += 3; |
|
| 2300 | 2300 | $texto = 'NOME / RAZÃO SOCIAL'; |
| 2301 | 2301 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
| 2302 | 2302 | $this->pdf->textBox($x, $y, $w1, $h, $texto, $aFont, 'T', 'L', 1, ''); |
| 2303 | 2303 | if (isset($this->transporta)) { |
| 2304 | - $texto = ! empty($this->transporta->getElementsByTagName("xNome")->item(0)->nodeValue) |
|
| 2304 | + $texto = !empty($this->transporta->getElementsByTagName("xNome")->item(0)->nodeValue) |
|
| 2305 | 2305 | ? $this->transporta->getElementsByTagName("xNome")->item(0)->nodeValue |
| 2306 | 2306 | : ''; |
| 2307 | 2307 | } else { |
@@ -2310,12 +2310,12 @@ discard block |
||
| 2310 | 2310 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
| 2311 | 2311 | $this->pdf->textBox($x, $y, $w1, $h, $texto, $aFont, 'B', 'L', 0, ''); |
| 2312 | 2312 | //FRETE POR CONTA |
| 2313 | - $x += $w1; |
|
| 2313 | + $x += $w1; |
|
| 2314 | 2314 | $w2 = $maxW * 0.15; |
| 2315 | 2315 | $texto = 'FRETE'; |
| 2316 | 2316 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
| 2317 | 2317 | $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'T', 'L', 1, ''); |
| 2318 | - $tipoFrete = ! empty($this->transp->getElementsByTagName("modFrete")->item(0)->nodeValue) |
|
| 2318 | + $tipoFrete = !empty($this->transp->getElementsByTagName("modFrete")->item(0)->nodeValue) |
|
| 2319 | 2319 | ? $this->transp->getElementsByTagName("modFrete")->item(0)->nodeValue |
| 2320 | 2320 | : '0'; |
| 2321 | 2321 | switch ($tipoFrete) { |
@@ -2341,12 +2341,12 @@ discard block |
||
| 2341 | 2341 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
| 2342 | 2342 | $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'C', 'C', 1, ''); |
| 2343 | 2343 | //CÓDIGO ANTT |
| 2344 | - $x += $w2; |
|
| 2344 | + $x += $w2; |
|
| 2345 | 2345 | $texto = 'CÓDIGO ANTT'; |
| 2346 | 2346 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
| 2347 | 2347 | $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'T', 'L', 1, ''); |
| 2348 | 2348 | if (isset($this->veicTransp)) { |
| 2349 | - $texto = ! empty($this->veicTransp->getElementsByTagName("RNTC")->item(0)->nodeValue) |
|
| 2349 | + $texto = !empty($this->veicTransp->getElementsByTagName("RNTC")->item(0)->nodeValue) |
|
| 2350 | 2350 | ? $this->veicTransp->getElementsByTagName("RNTC")->item(0)->nodeValue |
| 2351 | 2351 | : ''; |
| 2352 | 2352 | } else { |
@@ -2355,16 +2355,16 @@ discard block |
||
| 2355 | 2355 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
| 2356 | 2356 | $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'B', 'C', 0, ''); |
| 2357 | 2357 | //PLACA DO VEÍC |
| 2358 | - $x += $w2; |
|
| 2358 | + $x += $w2; |
|
| 2359 | 2359 | $texto = 'PLACA DO VEÍCULO'; |
| 2360 | 2360 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
| 2361 | 2361 | $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'T', 'L', 1, ''); |
| 2362 | 2362 | if (isset($this->veicTransp)) { |
| 2363 | - $texto = ! empty($this->veicTransp->getElementsByTagName("placa")->item(0)->nodeValue) |
|
| 2363 | + $texto = !empty($this->veicTransp->getElementsByTagName("placa")->item(0)->nodeValue) |
|
| 2364 | 2364 | ? $this->veicTransp->getElementsByTagName("placa")->item(0)->nodeValue |
| 2365 | 2365 | : ''; |
| 2366 | 2366 | } elseif (isset($this->reboque)) { |
| 2367 | - $texto = ! empty($this->reboque->getElementsByTagName("placa")->item(0)->nodeValue) |
|
| 2367 | + $texto = !empty($this->reboque->getElementsByTagName("placa")->item(0)->nodeValue) |
|
| 2368 | 2368 | ? $this->reboque->getElementsByTagName("placa")->item(0)->nodeValue |
| 2369 | 2369 | : ''; |
| 2370 | 2370 | } else { |
@@ -2373,17 +2373,17 @@ discard block |
||
| 2373 | 2373 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
| 2374 | 2374 | $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'B', 'C', 0, ''); |
| 2375 | 2375 | //UF |
| 2376 | - $x += $w2; |
|
| 2376 | + $x += $w2; |
|
| 2377 | 2377 | $w3 = round($maxW * 0.04, 0); |
| 2378 | 2378 | $texto = 'UF'; |
| 2379 | 2379 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
| 2380 | 2380 | $this->pdf->textBox($x, $y, $w3, $h, $texto, $aFont, 'T', 'L', 1, ''); |
| 2381 | 2381 | if (isset($this->veicTransp)) { |
| 2382 | - $texto = ! empty($this->veicTransp->getElementsByTagName("UF")->item(0)->nodeValue) |
|
| 2382 | + $texto = !empty($this->veicTransp->getElementsByTagName("UF")->item(0)->nodeValue) |
|
| 2383 | 2383 | ? $this->veicTransp->getElementsByTagName("UF")->item(0)->nodeValue |
| 2384 | 2384 | : ''; |
| 2385 | 2385 | } elseif (isset($this->reboque)) { |
| 2386 | - $texto = ! empty($this->reboque->getElementsByTagName("UF")->item(0)->nodeValue) |
|
| 2386 | + $texto = !empty($this->reboque->getElementsByTagName("UF")->item(0)->nodeValue) |
|
| 2387 | 2387 | ? $this->reboque->getElementsByTagName("UF")->item(0)->nodeValue |
| 2388 | 2388 | : ''; |
| 2389 | 2389 | } else { |
@@ -2392,20 +2392,20 @@ discard block |
||
| 2392 | 2392 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
| 2393 | 2393 | $this->pdf->textBox($x, $y, $w3, $h, $texto, $aFont, 'B', 'C', 0, ''); |
| 2394 | 2394 | //CNPJ / CPF |
| 2395 | - $x += $w3; |
|
| 2395 | + $x += $w3; |
|
| 2396 | 2396 | $w = $maxW - ($w1 + 3 * $w2 + $w3); |
| 2397 | 2397 | $texto = 'CNPJ / CPF'; |
| 2398 | 2398 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
| 2399 | 2399 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, ''); |
| 2400 | 2400 | if (isset($this->transporta)) { |
| 2401 | - $texto = ! empty($this->transporta->getElementsByTagName("CNPJ")->item(0)->nodeValue) |
|
| 2401 | + $texto = !empty($this->transporta->getElementsByTagName("CNPJ")->item(0)->nodeValue) |
|
| 2402 | 2402 | ? $this->formatField( |
| 2403 | 2403 | $this->transporta->getElementsByTagName("CNPJ")->item(0)->nodeValue, |
| 2404 | 2404 | "##.###.###/####-##" |
| 2405 | 2405 | ) |
| 2406 | 2406 | : ''; |
| 2407 | 2407 | if ($texto == '') { |
| 2408 | - $texto = ! empty($this->transporta->getElementsByTagName("CPF")->item(0)->nodeValue) |
|
| 2408 | + $texto = !empty($this->transporta->getElementsByTagName("CPF")->item(0)->nodeValue) |
|
| 2409 | 2409 | ? $this->formatField( |
| 2410 | 2410 | $this->transporta->getElementsByTagName("CPF")->item(0)->nodeValue, |
| 2411 | 2411 | "###.###.###-##" |
@@ -2419,7 +2419,7 @@ discard block |
||
| 2419 | 2419 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, ''); |
| 2420 | 2420 | //##################################################################### |
| 2421 | 2421 | //ENDEREÇO |
| 2422 | - $y += $h; |
|
| 2422 | + $y += $h; |
|
| 2423 | 2423 | $x = $oldX; |
| 2424 | 2424 | $h = 7; |
| 2425 | 2425 | $w1 = $maxW * 0.44; |
@@ -2427,7 +2427,7 @@ discard block |
||
| 2427 | 2427 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
| 2428 | 2428 | $this->pdf->textBox($x, $y, $w1, $h, $texto, $aFont, 'T', 'L', 1, ''); |
| 2429 | 2429 | if (isset($this->transporta)) { |
| 2430 | - $texto = ! empty($this->transporta->getElementsByTagName("xEnder")->item(0)->nodeValue) |
|
| 2430 | + $texto = !empty($this->transporta->getElementsByTagName("xEnder")->item(0)->nodeValue) |
|
| 2431 | 2431 | ? $this->transporta->getElementsByTagName("xEnder")->item(0)->nodeValue |
| 2432 | 2432 | : ''; |
| 2433 | 2433 | } else { |
@@ -2436,13 +2436,13 @@ discard block |
||
| 2436 | 2436 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
| 2437 | 2437 | $this->pdf->textBox($x, $y, $w1, $h, $texto, $aFont, 'B', 'L', 0, ''); |
| 2438 | 2438 | //MUNICÍPIO |
| 2439 | - $x += $w1; |
|
| 2439 | + $x += $w1; |
|
| 2440 | 2440 | $w2 = round($maxW * 0.30, 0); |
| 2441 | 2441 | $texto = 'MUNICÍPIO'; |
| 2442 | 2442 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
| 2443 | 2443 | $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'T', 'L', 1, ''); |
| 2444 | 2444 | if (isset($this->transporta)) { |
| 2445 | - $texto = ! empty($this->transporta->getElementsByTagName("xMun")->item(0)->nodeValue) |
|
| 2445 | + $texto = !empty($this->transporta->getElementsByTagName("xMun")->item(0)->nodeValue) |
|
| 2446 | 2446 | ? $this->transporta->getElementsByTagName("xMun")->item(0)->nodeValue |
| 2447 | 2447 | : ''; |
| 2448 | 2448 | } else { |
@@ -2451,13 +2451,13 @@ discard block |
||
| 2451 | 2451 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
| 2452 | 2452 | $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'B', 'C', 0, ''); |
| 2453 | 2453 | //UF |
| 2454 | - $x += $w2; |
|
| 2454 | + $x += $w2; |
|
| 2455 | 2455 | $w3 = round($maxW * 0.04, 0); |
| 2456 | 2456 | $texto = 'UF'; |
| 2457 | 2457 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
| 2458 | 2458 | $this->pdf->textBox($x, $y, $w3, $h, $texto, $aFont, 'T', 'L', 1, ''); |
| 2459 | 2459 | if (isset($this->transporta)) { |
| 2460 | - $texto = ! empty($this->transporta->getElementsByTagName("UF")->item(0)->nodeValue) |
|
| 2460 | + $texto = !empty($this->transporta->getElementsByTagName("UF")->item(0)->nodeValue) |
|
| 2461 | 2461 | ? $this->transporta->getElementsByTagName("UF")->item(0)->nodeValue |
| 2462 | 2462 | : ''; |
| 2463 | 2463 | } else { |
@@ -2466,14 +2466,14 @@ discard block |
||
| 2466 | 2466 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
| 2467 | 2467 | $this->pdf->textBox($x, $y, $w3, $h, $texto, $aFont, 'B', 'C', 0, ''); |
| 2468 | 2468 | //INSCRIÇÃO ESTADUAL |
| 2469 | - $x += $w3; |
|
| 2469 | + $x += $w3; |
|
| 2470 | 2470 | $w = $maxW - ($w1 + $w2 + $w3); |
| 2471 | 2471 | $texto = 'INSCRIÇÃO ESTADUAL'; |
| 2472 | 2472 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
| 2473 | 2473 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, ''); |
| 2474 | 2474 | $texto = ''; |
| 2475 | 2475 | if (isset($this->transporta)) { |
| 2476 | - if (! empty($this->transporta->getElementsByTagName("IE")->item(0)->nodeValue)) { |
|
| 2476 | + if (!empty($this->transporta->getElementsByTagName("IE")->item(0)->nodeValue)) { |
|
| 2477 | 2477 | $texto = $this->transporta->getElementsByTagName("IE")->item(0)->nodeValue; |
| 2478 | 2478 | } |
| 2479 | 2479 | } |
@@ -2489,13 +2489,13 @@ discard block |
||
| 2489 | 2489 | $pesoBruto = 0; |
| 2490 | 2490 | $pesoLiquido = 0; |
| 2491 | 2491 | foreach ($volumes as $volume) { |
| 2492 | - $quantidade += ! empty($volume->getElementsByTagName("qVol")->item(0)->nodeValue) ? |
|
| 2492 | + $quantidade += !empty($volume->getElementsByTagName("qVol")->item(0)->nodeValue) ? |
|
| 2493 | 2493 | $volume->getElementsByTagName("qVol")->item(0)->nodeValue : 0; |
| 2494 | - $pesoBruto += ! empty($volume->getElementsByTagName("pesoB")->item(0)->nodeValue) ? |
|
| 2494 | + $pesoBruto += !empty($volume->getElementsByTagName("pesoB")->item(0)->nodeValue) ? |
|
| 2495 | 2495 | $volume->getElementsByTagName("pesoB")->item(0)->nodeValue : 0; |
| 2496 | - $pesoLiquido += ! empty($volume->getElementsByTagName("pesoL")->item(0)->nodeValue) ? |
|
| 2496 | + $pesoLiquido += !empty($volume->getElementsByTagName("pesoL")->item(0)->nodeValue) ? |
|
| 2497 | 2497 | $volume->getElementsByTagName("pesoL")->item(0)->nodeValue : 0; |
| 2498 | - $texto = ! empty($this->transp->getElementsByTagName("esp")->item(0)->nodeValue) ? |
|
| 2498 | + $texto = !empty($this->transp->getElementsByTagName("esp")->item(0)->nodeValue) ? |
|
| 2499 | 2499 | $this->transp->getElementsByTagName("esp")->item(0)->nodeValue : ''; |
| 2500 | 2500 | if ($texto != $especie && $especie != '') { |
| 2501 | 2501 | //tem várias especies |
@@ -2503,7 +2503,7 @@ discard block |
||
| 2503 | 2503 | } else { |
| 2504 | 2504 | $especie = $texto; |
| 2505 | 2505 | } |
| 2506 | - $texto = ! empty($this->transp->getElementsByTagName("marca")->item(0)->nodeValue) |
|
| 2506 | + $texto = !empty($this->transp->getElementsByTagName("marca")->item(0)->nodeValue) |
|
| 2507 | 2507 | ? $this->transp->getElementsByTagName("marca")->item(0)->nodeValue |
| 2508 | 2508 | : ''; |
| 2509 | 2509 | if ($texto != $marca && $marca != '') { |
@@ -2512,7 +2512,7 @@ discard block |
||
| 2512 | 2512 | } else { |
| 2513 | 2513 | $marca = $texto; |
| 2514 | 2514 | } |
| 2515 | - $texto = ! empty($this->transp->getElementsByTagName("nVol")->item(0)->nodeValue) |
|
| 2515 | + $texto = !empty($this->transp->getElementsByTagName("nVol")->item(0)->nodeValue) |
|
| 2516 | 2516 | ? $this->transp->getElementsByTagName("nVol")->item(0)->nodeValue |
| 2517 | 2517 | : ''; |
| 2518 | 2518 | if ($texto != $numero && $numero != '') { |
@@ -2525,20 +2525,20 @@ discard block |
||
| 2525 | 2525 | |
| 2526 | 2526 | //##################################################################### |
| 2527 | 2527 | //QUANTIDADE |
| 2528 | - $y += $h; |
|
| 2528 | + $y += $h; |
|
| 2529 | 2529 | $x = $oldX; |
| 2530 | 2530 | $h = 7; |
| 2531 | 2531 | $w1 = round($maxW * 0.10, 0); |
| 2532 | 2532 | $texto = 'QUANTIDADE'; |
| 2533 | 2533 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
| 2534 | 2534 | $this->pdf->textBox($x, $y, $w1, $h, $texto, $aFont, 'T', 'L', 1, ''); |
| 2535 | - if (! empty($quantidade)) { |
|
| 2535 | + if (!empty($quantidade)) { |
|
| 2536 | 2536 | $texto = $quantidade; |
| 2537 | 2537 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
| 2538 | 2538 | $this->pdf->textBox($x, $y, $w1, $h, $texto, $aFont, 'B', 'C', 0, ''); |
| 2539 | 2539 | } |
| 2540 | 2540 | //ESPÉCIE |
| 2541 | - $x += $w1; |
|
| 2541 | + $x += $w1; |
|
| 2542 | 2542 | $w2 = round($maxW * 0.17, 0); |
| 2543 | 2543 | $texto = 'ESPÉCIE'; |
| 2544 | 2544 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
@@ -2547,16 +2547,16 @@ discard block |
||
| 2547 | 2547 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
| 2548 | 2548 | $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'B', 'C', 0, ''); |
| 2549 | 2549 | //MARCA |
| 2550 | - $x += $w2; |
|
| 2550 | + $x += $w2; |
|
| 2551 | 2551 | $texto = 'MARCA'; |
| 2552 | 2552 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
| 2553 | 2553 | $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'T', 'L', 1, ''); |
| 2554 | - $texto = ! empty($this->transp->getElementsByTagName("marca")->item(0)->nodeValue) ? |
|
| 2554 | + $texto = !empty($this->transp->getElementsByTagName("marca")->item(0)->nodeValue) ? |
|
| 2555 | 2555 | $this->transp->getElementsByTagName("marca")->item(0)->nodeValue : ''; |
| 2556 | 2556 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
| 2557 | 2557 | $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'B', 'C', 0, ''); |
| 2558 | 2558 | //NUMERAÇÃO |
| 2559 | - $x += $w2; |
|
| 2559 | + $x += $w2; |
|
| 2560 | 2560 | $texto = 'NUMERAÇÃO'; |
| 2561 | 2561 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
| 2562 | 2562 | $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'T', 'L', 1, ''); |
@@ -2564,7 +2564,7 @@ discard block |
||
| 2564 | 2564 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
| 2565 | 2565 | $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'B', 'C', 0, ''); |
| 2566 | 2566 | //PESO BRUTO |
| 2567 | - $x += $w2; |
|
| 2567 | + $x += $w2; |
|
| 2568 | 2568 | $w3 = round($maxW * 0.20, 0); |
| 2569 | 2569 | $texto = 'PESO BRUTO'; |
| 2570 | 2570 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
@@ -2577,7 +2577,7 @@ discard block |
||
| 2577 | 2577 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
| 2578 | 2578 | $this->pdf->textBox($x, $y, $w3, $h, $texto, $aFont, 'B', 'R', 0, ''); |
| 2579 | 2579 | //PESO LÍQUIDO |
| 2580 | - $x += $w3; |
|
| 2580 | + $x += $w3; |
|
| 2581 | 2581 | $w = $maxW - ($w1 + 3 * $w2 + $w3); |
| 2582 | 2582 | $texto = 'PESO LÍQUIDO'; |
| 2583 | 2583 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
@@ -2597,11 +2597,11 @@ discard block |
||
| 2597 | 2597 | protected function descricaoProdutoHelper($origem, $campo, $formato) |
| 2598 | 2598 | { |
| 2599 | 2599 | $valor_original = $origem->getElementsByTagName($campo)->item(0); |
| 2600 | - if (! isset($valor_original)) { |
|
| 2600 | + if (!isset($valor_original)) { |
|
| 2601 | 2601 | return ""; |
| 2602 | 2602 | } |
| 2603 | 2603 | $valor_original = $valor_original->nodeValue; |
| 2604 | - $valor = ! empty($valor_original) ? number_format($valor_original, 2, ",", ".") : ''; |
|
| 2604 | + $valor = !empty($valor_original) ? number_format($valor_original, 2, ",", ".") : ''; |
|
| 2605 | 2605 | |
| 2606 | 2606 | if ($valor != "") { |
| 2607 | 2607 | return sprintf($formato, $valor); |
@@ -2627,7 +2627,7 @@ discard block |
||
| 2627 | 2627 | $ICMSUFDest = $itemProd->getElementsByTagName("ICMSUFDest")->item(0); |
| 2628 | 2628 | $impostos = ''; |
| 2629 | 2629 | |
| 2630 | - if (! empty($ICMS)) { |
|
| 2630 | + if (!empty($ICMS)) { |
|
| 2631 | 2631 | $impostos .= $this->descricaoProdutoHelper($ICMS, "vBCFCP", " BcFcp=%s"); |
| 2632 | 2632 | $impostos .= $this->descricaoProdutoHelper($ICMS, "pFCP", " pFcp=%s%%"); |
| 2633 | 2633 | $impostos .= $this->descricaoProdutoHelper($ICMS, "vFCP", " vFcp=%s"); |
@@ -2643,7 +2643,7 @@ discard block |
||
| 2643 | 2643 | $impostos .= $this->descricaoProdutoHelper($ICMS, "pST", " pSt=%s"); |
| 2644 | 2644 | $impostos .= $this->descricaoProdutoHelper($ICMS, "vICMSSTRet", " VALOR ICMS ST=%s"); |
| 2645 | 2645 | } |
| 2646 | - if (! empty($ICMSUFDest)) { |
|
| 2646 | + if (!empty($ICMSUFDest)) { |
|
| 2647 | 2647 | $impostos .= $this->descricaoProdutoHelper($ICMSUFDest, "pFCPUFDest", " pFCPUFDest=%s%%"); |
| 2648 | 2648 | $impostos .= $this->descricaoProdutoHelper($ICMSUFDest, "pICMSUFDest", " pICMSUFDest=%s%%"); |
| 2649 | 2649 | $impostos .= $this->descricaoProdutoHelper($ICMSUFDest, "pICMSInterPart", " pICMSInterPart=%s%%"); |
@@ -2651,7 +2651,7 @@ discard block |
||
| 2651 | 2651 | $impostos .= $this->descricaoProdutoHelper($ICMSUFDest, "vICMSUFDest", " vICMSUFDest=%s"); |
| 2652 | 2652 | $impostos .= $this->descricaoProdutoHelper($ICMSUFDest, "vICMSUFRemet", " vICMSUFRemet=%s"); |
| 2653 | 2653 | } |
| 2654 | - $infAdProd = ! empty($itemProd->getElementsByTagName('infAdProd')->item(0)->nodeValue) |
|
| 2654 | + $infAdProd = !empty($itemProd->getElementsByTagName('infAdProd')->item(0)->nodeValue) |
|
| 2655 | 2655 | ? substr( |
| 2656 | 2656 | //$this->anfaveaDANFE($itemProd->getElementsByTagName('infAdProd')->item(0)->nodeValue), |
| 2657 | 2657 | $itemProd->getElementsByTagName('infAdProd')->item(0)->nodeValue, |
@@ -2659,13 +2659,13 @@ discard block |
||
| 2659 | 2659 | 500 |
| 2660 | 2660 | ) |
| 2661 | 2661 | : ''; |
| 2662 | - if (! empty($infAdProd)) { |
|
| 2662 | + if (!empty($infAdProd)) { |
|
| 2663 | 2663 | $infAdProd = trim($infAdProd); |
| 2664 | 2664 | $infAdProd .= ' '; |
| 2665 | 2665 | } |
| 2666 | 2666 | $loteTxt = ''; |
| 2667 | 2667 | $rastro = $prod->getElementsByTagName("med"); |
| 2668 | - if (! empty($prod->getElementsByTagName("rastro"))) { |
|
| 2668 | + if (!empty($prod->getElementsByTagName("rastro"))) { |
|
| 2669 | 2669 | $rastro = $prod->getElementsByTagName("rastro"); |
| 2670 | 2670 | $i = 0; |
| 2671 | 2671 | while ($i < $rastro->length) { |
@@ -2679,14 +2679,14 @@ discard block |
||
| 2679 | 2679 | $loteTxt .= $datafab; //$this->getTagDate($rastro->item($i), 'dFab', ' Fab: '); |
| 2680 | 2680 | $loteTxt .= $dataval; //$this->getTagDate($rastro->item($i), 'dVal', ' Val: '); |
| 2681 | 2681 | $loteTxt .= $this->getTagValue($rastro->item($i), 'vPMC', ' PMC: '); |
| 2682 | - $i ++; |
|
| 2682 | + $i++; |
|
| 2683 | 2683 | } |
| 2684 | 2684 | if ($loteTxt != '') { |
| 2685 | 2685 | $loteTxt .= ' '; |
| 2686 | 2686 | } |
| 2687 | 2687 | } |
| 2688 | 2688 | //NT2013.006 FCI |
| 2689 | - $nFCI = (! empty($itemProd->getElementsByTagName('nFCI')->item(0)->nodeValue)) ? |
|
| 2689 | + $nFCI = (!empty($itemProd->getElementsByTagName('nFCI')->item(0)->nodeValue)) ? |
|
| 2690 | 2690 | ' FCI:' . $itemProd->getElementsByTagName('nFCI')->item(0)->nodeValue : ''; |
| 2691 | 2691 | $tmp_ad = $infAdProd . ($this->descProdInfoComplemento ? $loteTxt . $impostos . $nFCI : ''); |
| 2692 | 2692 | $texto = $prod->getElementsByTagName("xProd")->item(0)->nodeValue |
@@ -2736,7 +2736,7 @@ discard block |
||
| 2736 | 2736 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, ''); |
| 2737 | 2737 | $y += 3; |
| 2738 | 2738 | //desenha a caixa dos dados dos itens da NF |
| 2739 | - $hmax += 1; |
|
| 2739 | + $hmax += 1; |
|
| 2740 | 2740 | $texto = ''; |
| 2741 | 2741 | $this->pdf->textBox($x, $y, $w, $hmax); |
| 2742 | 2742 | //################################################################################## |
@@ -2749,101 +2749,101 @@ discard block |
||
| 2749 | 2749 | $this->pdf->textBox($x, $y, $w1, $h, $texto, $aFont, 'C', 'C', 0, '', false); |
| 2750 | 2750 | $this->pdf->line($x + $w1, $y, $x + $w1, $y + $hmax); |
| 2751 | 2751 | //DESCRIÇÃO DO PRODUTO / SERVIÇO |
| 2752 | - $x += $w1; |
|
| 2752 | + $x += $w1; |
|
| 2753 | 2753 | $w2 = round($w * 0.25, 0); |
| 2754 | 2754 | $texto = 'DESCRIÇÃO DO PRODUTO / SERVIÇO'; |
| 2755 | 2755 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
| 2756 | 2756 | $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'C', 'C', 0, '', false); |
| 2757 | 2757 | $this->pdf->line($x + $w2, $y, $x + $w2, $y + $hmax); |
| 2758 | 2758 | //NCM/SH |
| 2759 | - $x += $w2; |
|
| 2759 | + $x += $w2; |
|
| 2760 | 2760 | $w3 = round($w * 0.06, 0); |
| 2761 | 2761 | $texto = 'NCM/SH'; |
| 2762 | 2762 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
| 2763 | 2763 | $this->pdf->textBox($x, $y, $w3, $h, $texto, $aFont, 'C', 'C', 0, '', false); |
| 2764 | 2764 | $this->pdf->line($x + $w3, $y, $x + $w3, $y + $hmax); |
| 2765 | 2765 | //O/CST ou O/CSOSN |
| 2766 | - $x += $w3; |
|
| 2766 | + $x += $w3; |
|
| 2767 | 2767 | $w4 = round($w * 0.05, 0); |
| 2768 | 2768 | $texto = 'O/CST'; // CRT = 2 ou CRT = 3 |
| 2769 | 2769 | if ($this->getTagValue($this->emit, 'CRT') == '1') { |
| 2770 | - $texto = 'O/CSOSN';//Regime do Simples CRT = 1 |
|
| 2770 | + $texto = 'O/CSOSN'; //Regime do Simples CRT = 1 |
|
| 2771 | 2771 | } |
| 2772 | 2772 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
| 2773 | 2773 | $this->pdf->textBox($x, $y, $w4, $h, $texto, $aFont, 'C', 'C', 0, '', false); |
| 2774 | 2774 | $this->pdf->line($x + $w4, $y, $x + $w4, $y + $hmax); |
| 2775 | 2775 | //CFOP |
| 2776 | - $x += $w4; |
|
| 2776 | + $x += $w4; |
|
| 2777 | 2777 | $w5 = round($w * 0.04, 0); |
| 2778 | 2778 | $texto = 'CFOP'; |
| 2779 | 2779 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
| 2780 | 2780 | $this->pdf->textBox($x, $y, $w5, $h, $texto, $aFont, 'C', 'C', 0, '', false); |
| 2781 | 2781 | $this->pdf->line($x + $w5, $y, $x + $w5, $y + $hmax); |
| 2782 | 2782 | //UN |
| 2783 | - $x += $w5; |
|
| 2783 | + $x += $w5; |
|
| 2784 | 2784 | $w6 = round($w * 0.03, 0); |
| 2785 | 2785 | $texto = 'UN'; |
| 2786 | 2786 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
| 2787 | 2787 | $this->pdf->textBox($x, $y, $w6, $h, $texto, $aFont, 'C', 'C', 0, '', false); |
| 2788 | 2788 | $this->pdf->line($x + $w6, $y, $x + $w6, $y + $hmax); |
| 2789 | 2789 | //QUANT |
| 2790 | - $x += $w6; |
|
| 2790 | + $x += $w6; |
|
| 2791 | 2791 | $w7 = round($w * 0.08, 0); |
| 2792 | 2792 | $texto = 'QUANT'; |
| 2793 | 2793 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
| 2794 | 2794 | $this->pdf->textBox($x, $y, $w7, $h, $texto, $aFont, 'C', 'C', 0, '', false); |
| 2795 | 2795 | $this->pdf->line($x + $w7, $y, $x + $w7, $y + $hmax); |
| 2796 | 2796 | //VALOR UNIT |
| 2797 | - $x += $w7; |
|
| 2797 | + $x += $w7; |
|
| 2798 | 2798 | $w8 = round($w * 0.06, 0); |
| 2799 | 2799 | $texto = 'VALOR UNIT'; |
| 2800 | 2800 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
| 2801 | 2801 | $this->pdf->textBox($x, $y, $w8, $h, $texto, $aFont, 'C', 'C', 0, '', false); |
| 2802 | 2802 | $this->pdf->line($x + $w8, $y, $x + $w8, $y + $hmax); |
| 2803 | 2803 | //VALOR TOTAL |
| 2804 | - $x += $w8; |
|
| 2804 | + $x += $w8; |
|
| 2805 | 2805 | $w9 = round($w * 0.06, 0); |
| 2806 | 2806 | $texto = 'VALOR TOTAL'; |
| 2807 | 2807 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
| 2808 | 2808 | $this->pdf->textBox($x, $y, $w9, $h, $texto, $aFont, 'C', 'C', 0, '', false); |
| 2809 | 2809 | $this->pdf->line($x + $w9, $y, $x + $w9, $y + $hmax); |
| 2810 | 2810 | //VALOR DESCONTO |
| 2811 | - $x += $w9; |
|
| 2811 | + $x += $w9; |
|
| 2812 | 2812 | $w10 = round($w * 0.05, 0); |
| 2813 | 2813 | $texto = 'VALOR DESC'; |
| 2814 | 2814 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
| 2815 | 2815 | $this->pdf->textBox($x, $y, $w10, $h, $texto, $aFont, 'C', 'C', 0, '', false); |
| 2816 | 2816 | $this->pdf->line($x + $w10, $y, $x + $w10, $y + $hmax); |
| 2817 | 2817 | //B.CÁLC ICMS |
| 2818 | - $x += $w10; |
|
| 2818 | + $x += $w10; |
|
| 2819 | 2819 | $w11 = round($w * 0.06, 0); |
| 2820 | 2820 | $texto = 'B.CÁLC ICMS'; |
| 2821 | 2821 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
| 2822 | 2822 | $this->pdf->textBox($x, $y, $w11, $h, $texto, $aFont, 'C', 'C', 0, '', false); |
| 2823 | 2823 | $this->pdf->line($x + $w11, $y, $x + $w11, $y + $hmax); |
| 2824 | 2824 | //VALOR ICMS |
| 2825 | - $x += $w11; |
|
| 2825 | + $x += $w11; |
|
| 2826 | 2826 | $w12 = round($w * 0.06, 0); |
| 2827 | 2827 | $texto = 'VALOR ICMS'; |
| 2828 | 2828 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
| 2829 | 2829 | $this->pdf->textBox($x, $y, $w12, $h, $texto, $aFont, 'C', 'C', 0, '', false); |
| 2830 | 2830 | $this->pdf->line($x + $w12, $y, $x + $w12, $y + $hmax); |
| 2831 | 2831 | //VALOR IPI |
| 2832 | - $x += $w12; |
|
| 2832 | + $x += $w12; |
|
| 2833 | 2833 | $w13 = round($w * 0.05, 0); |
| 2834 | 2834 | $texto = 'VALOR IPI'; |
| 2835 | 2835 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
| 2836 | 2836 | $this->pdf->textBox($x, $y, $w13, $h, $texto, $aFont, 'C', 'C', 0, '', false); |
| 2837 | 2837 | $this->pdf->line($x + $w13, $y, $x + $w13, $y + $hmax); |
| 2838 | 2838 | //ALÍQ. ICMS |
| 2839 | - $x += $w13; |
|
| 2839 | + $x += $w13; |
|
| 2840 | 2840 | $w14 = round($w * 0.04, 0); |
| 2841 | 2841 | $texto = 'ALÍQ. ICMS'; |
| 2842 | 2842 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
| 2843 | 2843 | $this->pdf->textBox($x, $y, $w14, $h, $texto, $aFont, 'C', 'C', 0, '', false); |
| 2844 | 2844 | $this->pdf->line($x + $w14, $y, $x + $w14, $y + $hmax); |
| 2845 | 2845 | //ALÍQ. IPI |
| 2846 | - $x += $w14; |
|
| 2846 | + $x += $w14; |
|
| 2847 | 2847 | $w15 = $w - ($w1 + $w2 + $w3 + $w4 + $w5 + $w6 + $w7 + $w8 + $w9 + $w10 + $w11 + $w12 + $w13 + $w14); |
| 2848 | 2848 | $texto = 'ALÍQ. IPI'; |
| 2849 | 2849 | $this->pdf->textBox($x, $y, $w15, $h, $texto, $aFont, 'C', 'C', 0, '', false); |
@@ -2897,7 +2897,7 @@ discard block |
||
| 2897 | 2897 | // Informação sobre unidade de medida tributavel. |
| 2898 | 2898 | // Se não for para exibir a unidade de medida tributavel, então |
| 2899 | 2899 | // A Escrita irá começar em 0. |
| 2900 | - if (! $mostrarUnidadeTributavel) { |
|
| 2900 | + if (!$mostrarUnidadeTributavel) { |
|
| 2901 | 2901 | $yTrib = 0; |
| 2902 | 2902 | } |
| 2903 | 2903 | $h = $this->calculeHeight($thisItem, $mostrarUnidadeTributavel); |
@@ -2931,7 +2931,7 @@ discard block |
||
| 2931 | 2931 | } |
| 2932 | 2932 | $x += $w2; |
| 2933 | 2933 | //NCM |
| 2934 | - $texto = ! empty($prod->getElementsByTagName("NCM")->item(0)->nodeValue) ? |
|
| 2934 | + $texto = !empty($prod->getElementsByTagName("NCM")->item(0)->nodeValue) ? |
|
| 2935 | 2935 | $prod->getElementsByTagName("NCM")->item(0)->nodeValue : ''; |
| 2936 | 2936 | $this->pdf->textBox($x, $y, $w3, $h, $texto, $aFont, 'T', 'C', 0, ''); |
| 2937 | 2937 | $x += $w3; |
@@ -2944,11 +2944,11 @@ discard block |
||
| 2944 | 2944 | $this->pdf->textBox($x, $y, $w4, $h, $texto, $aFont, 'T', 'C', 0, ''); |
| 2945 | 2945 | } |
| 2946 | 2946 | //CFOP |
| 2947 | - $x += $w4; |
|
| 2947 | + $x += $w4; |
|
| 2948 | 2948 | $texto = $prod->getElementsByTagName("CFOP")->item(0)->nodeValue; |
| 2949 | 2949 | $this->pdf->textBox($x, $y, $w5, $h, $texto, $aFont, 'T', 'C', 0, ''); |
| 2950 | 2950 | //Unidade |
| 2951 | - $x += $w5; |
|
| 2951 | + $x += $w5; |
|
| 2952 | 2952 | $texto = $uCom; |
| 2953 | 2953 | $this->pdf->textBox($x, $y, $w6, $h, $texto, $aFont, 'T', 'C', 0, ''); |
| 2954 | 2954 | //Unidade de medida tributável |
@@ -2970,7 +2970,7 @@ discard block |
||
| 2970 | 2970 | // QTDADE Tributável |
| 2971 | 2971 | if ($mostrarUnidadeTributavel) { |
| 2972 | 2972 | $qTrib = $prod->getElementsByTagName("qTrib")->item(0); |
| 2973 | - if (! empty($qTrib)) { |
|
| 2973 | + if (!empty($qTrib)) { |
|
| 2974 | 2974 | $texto = number_format($qTrib->nodeValue, $this->qComCasasDec, ",", "."); |
| 2975 | 2975 | $this->pdf->textBox($x, $yTrib, $w7, $h, $texto, $aFont, 'T', $alinhamento, 0, ''); |
| 2976 | 2976 | } |
@@ -2983,7 +2983,7 @@ discard block |
||
| 2983 | 2983 | // Valor Unitário Tributável |
| 2984 | 2984 | if ($mostrarUnidadeTributavel) { |
| 2985 | 2985 | $vUnTrib = $prod->getElementsByTagName("vUnTrib")->item(0); |
| 2986 | - if (! empty($vUnTrib)) { |
|
| 2986 | + if (!empty($vUnTrib)) { |
|
| 2987 | 2987 | $texto = number_format($vUnTrib->nodeValue, $this->vUnComCasasDec, ",", "."); |
| 2988 | 2988 | $this->pdf->textBox($x, $yTrib, $w8, $h, $texto, $aFont, 'T', $alinhamento, 0, ''); |
| 2989 | 2989 | } |
@@ -2997,7 +2997,7 @@ discard block |
||
| 2997 | 2997 | $this->pdf->textBox($x, $y, $w9, $h, $texto, $aFont, 'T', $alinhamento, 0, ''); |
| 2998 | 2998 | $x += $w9; |
| 2999 | 2999 | //Valor do Desconto |
| 3000 | - $vdesc = ! empty($prod->getElementsByTagName("vDesc")->item(0)->nodeValue) |
|
| 3000 | + $vdesc = !empty($prod->getElementsByTagName("vDesc")->item(0)->nodeValue) |
|
| 3001 | 3001 | ? $prod->getElementsByTagName("vDesc")->item(0)->nodeValue : 0; |
| 3002 | 3002 | |
| 3003 | 3003 | $texto = number_format($vdesc, 2, ",", "."); |
@@ -3005,7 +3005,7 @@ discard block |
||
| 3005 | 3005 | //Valor da Base de calculo |
| 3006 | 3006 | $x += $w10; |
| 3007 | 3007 | if (isset($ICMS)) { |
| 3008 | - $texto = ! empty($ICMS->getElementsByTagName("vBC")->item(0)->nodeValue) |
|
| 3008 | + $texto = !empty($ICMS->getElementsByTagName("vBC")->item(0)->nodeValue) |
|
| 3009 | 3009 | ? number_format( |
| 3010 | 3010 | $ICMS->getElementsByTagName("vBC")->item(0)->nodeValue, |
| 3011 | 3011 | 2, |
@@ -3018,7 +3018,7 @@ discard block |
||
| 3018 | 3018 | //Valor do ICMS |
| 3019 | 3019 | $x += $w11; |
| 3020 | 3020 | if (isset($ICMS)) { |
| 3021 | - $texto = ! empty($ICMS->getElementsByTagName("vICMS")->item(0)->nodeValue) |
|
| 3021 | + $texto = !empty($ICMS->getElementsByTagName("vICMS")->item(0)->nodeValue) |
|
| 3022 | 3022 | ? number_format( |
| 3023 | 3023 | $ICMS->getElementsByTagName("vICMS")->item(0)->nodeValue, |
| 3024 | 3024 | 2, |
@@ -3031,7 +3031,7 @@ discard block |
||
| 3031 | 3031 | //Valor do IPI |
| 3032 | 3032 | $x += $w12; |
| 3033 | 3033 | if (isset($IPI)) { |
| 3034 | - $texto = ! empty($IPI->getElementsByTagName("vIPI")->item(0)->nodeValue) |
|
| 3034 | + $texto = !empty($IPI->getElementsByTagName("vIPI")->item(0)->nodeValue) |
|
| 3035 | 3035 | ? number_format( |
| 3036 | 3036 | $IPI->getElementsByTagName("vIPI")->item(0)->nodeValue, |
| 3037 | 3037 | 2, |
@@ -3046,7 +3046,7 @@ discard block |
||
| 3046 | 3046 | // %ICMS |
| 3047 | 3047 | $x += $w13; |
| 3048 | 3048 | if (isset($ICMS)) { |
| 3049 | - $texto = ! empty($ICMS->getElementsByTagName("pICMS")->item(0)->nodeValue) |
|
| 3049 | + $texto = !empty($ICMS->getElementsByTagName("pICMS")->item(0)->nodeValue) |
|
| 3050 | 3050 | ? number_format( |
| 3051 | 3051 | $ICMS->getElementsByTagName("pICMS")->item(0)->nodeValue, |
| 3052 | 3052 | 2, |
@@ -3059,7 +3059,7 @@ discard block |
||
| 3059 | 3059 | //%IPI |
| 3060 | 3060 | $x += $w14; |
| 3061 | 3061 | if (isset($IPI)) { |
| 3062 | - $texto = ! empty($IPI->getElementsByTagName("pIPI")->item(0)->nodeValue) |
|
| 3062 | + $texto = !empty($IPI->getElementsByTagName("pIPI")->item(0)->nodeValue) |
|
| 3063 | 3063 | ? number_format( |
| 3064 | 3064 | $IPI->getElementsByTagName("pIPI")->item(0)->nodeValue, |
| 3065 | 3065 | 2, |
@@ -3077,11 +3077,11 @@ discard block |
||
| 3077 | 3077 | $veicProd = $prod->getElementsByTagName("veicProd")->item(0); |
| 3078 | 3078 | // Tag somente é gerada para veiculo 0k, e só é permitido um veiculo por NF-e por conta do detran |
| 3079 | 3079 | // Verifica se a Tag existe |
| 3080 | - if (! empty($veicProd)) { |
|
| 3080 | + if (!empty($veicProd)) { |
|
| 3081 | 3081 | $y += $h - 10; |
| 3082 | 3082 | $this->dadosItenVeiculoDANFE($oldX + 3, $y, $nInicio, 3, $prod); |
| 3083 | 3083 | // linha entre itens |
| 3084 | - $this->pdf->dashedHLine($oldX, $y+23, $w, 0.1, 120); |
|
| 3084 | + $this->pdf->dashedHLine($oldX, $y + 23, $w, 0.1, 120); |
|
| 3085 | 3085 | $y -= 38; |
| 3086 | 3086 | } else { |
| 3087 | 3087 | // linha entre itens |
@@ -3090,11 +3090,11 @@ discard block |
||
| 3090 | 3090 | |
| 3091 | 3091 | |
| 3092 | 3092 | $y += $h; |
| 3093 | - $i ++; |
|
| 3093 | + $i++; |
|
| 3094 | 3094 | //incrementa o controle dos itens processados. |
| 3095 | - $this->qtdeItensProc ++; |
|
| 3095 | + $this->qtdeItensProc++; |
|
| 3096 | 3096 | } else { |
| 3097 | - $i ++; |
|
| 3097 | + $i++; |
|
| 3098 | 3098 | } |
| 3099 | 3099 | } |
| 3100 | 3100 | |
@@ -3211,7 +3211,7 @@ discard block |
||
| 3211 | 3211 | $veiculoTipo = $veicProd->getElementsByTagName("tpVeic")->item(0)->nodeValue; |
| 3212 | 3212 | |
| 3213 | 3213 | $veiculoMotor = $veicProd->getElementsByTagName("nMotor")->item(0)->nodeValue; |
| 3214 | - $veiculoCodigoModelo = $veicProd->getElementsByTagName("cMod")->item(0)->nodeValue; |
|
| 3214 | + $veiculoCodigoModelo = $veicProd->getElementsByTagName("cMod")->item(0)->nodeValue; |
|
| 3215 | 3215 | $veiculoHp = $veicProd->getElementsByTagName("pot")->item(0)->nodeValue; |
| 3216 | 3216 | $veiculoPlaca = ''; //$veiculo->getElementsByTagName("CMT")->item(0)->nodeValue; |
| 3217 | 3217 | $veiculoTipoPintura = $veicProd->getElementsByTagName("tpPint")->item(0)->nodeValue; |
@@ -3299,23 +3299,23 @@ discard block |
||
| 3299 | 3299 | $aFont = ['font' => $this->fontePadrao, 'size' => 7, 'style' => 'B']; |
| 3300 | 3300 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, ''); |
| 3301 | 3301 | //INSCRIÇÃO MUNICIPAL |
| 3302 | - $y += 3; |
|
| 3302 | + $y += 3; |
|
| 3303 | 3303 | $w = round($this->wPrint * 0.23, 0); |
| 3304 | 3304 | $texto = 'INSCRIÇÃO MUNICIPAL'; |
| 3305 | 3305 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
| 3306 | 3306 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, ''); |
| 3307 | 3307 | //inscrição municipal |
| 3308 | - $texto = ! empty($this->emit->getElementsByTagName("IM")->item(0)->nodeValue) ? |
|
| 3308 | + $texto = !empty($this->emit->getElementsByTagName("IM")->item(0)->nodeValue) ? |
|
| 3309 | 3309 | $this->emit->getElementsByTagName("IM")->item(0)->nodeValue : ''; |
| 3310 | 3310 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
| 3311 | 3311 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'L', 0, ''); |
| 3312 | 3312 | //VALOR TOTAL DOS SERVIÇOS |
| 3313 | - $x += $w; |
|
| 3313 | + $x += $w; |
|
| 3314 | 3314 | $texto = 'VALOR TOTAL DOS SERVIÇOS'; |
| 3315 | 3315 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
| 3316 | 3316 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, ''); |
| 3317 | 3317 | if (isset($this->ISSQNtot)) { |
| 3318 | - $texto = ! empty($this->ISSQNtot->getElementsByTagName("vServ")->item(0)->nodeValue) ? |
|
| 3318 | + $texto = !empty($this->ISSQNtot->getElementsByTagName("vServ")->item(0)->nodeValue) ? |
|
| 3319 | 3319 | $this->ISSQNtot->getElementsByTagName("vServ")->item(0)->nodeValue : ''; |
| 3320 | 3320 | $texto = number_format($texto, 2, ",", "."); |
| 3321 | 3321 | } else { |
@@ -3324,14 +3324,14 @@ discard block |
||
| 3324 | 3324 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
| 3325 | 3325 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'R', 0, ''); |
| 3326 | 3326 | //BASE DE CÁLCULO DO ISSQN |
| 3327 | - $x += $w; |
|
| 3327 | + $x += $w; |
|
| 3328 | 3328 | $texto = 'BASE DE CÁLCULO DO ISSQN'; |
| 3329 | 3329 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
| 3330 | 3330 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, ''); |
| 3331 | 3331 | if (isset($this->ISSQNtot)) { |
| 3332 | - $texto = ! empty($this->ISSQNtot->getElementsByTagName("vBC")->item(0)->nodeValue) ? |
|
| 3332 | + $texto = !empty($this->ISSQNtot->getElementsByTagName("vBC")->item(0)->nodeValue) ? |
|
| 3333 | 3333 | $this->ISSQNtot->getElementsByTagName("vBC")->item(0)->nodeValue : ''; |
| 3334 | - $texto = ! empty($texto) ? number_format($texto, 2, ",", ".") : ''; |
|
| 3334 | + $texto = !empty($texto) ? number_format($texto, 2, ",", ".") : ''; |
|
| 3335 | 3335 | } else { |
| 3336 | 3336 | $texto = ''; |
| 3337 | 3337 | } |
@@ -3348,9 +3348,9 @@ discard block |
||
| 3348 | 3348 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
| 3349 | 3349 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, ''); |
| 3350 | 3350 | if (isset($this->ISSQNtot)) { |
| 3351 | - $texto = ! empty($this->ISSQNtot->getElementsByTagName("vISS")->item(0)->nodeValue) ? |
|
| 3351 | + $texto = !empty($this->ISSQNtot->getElementsByTagName("vISS")->item(0)->nodeValue) ? |
|
| 3352 | 3352 | $this->ISSQNtot->getElementsByTagName("vISS")->item(0)->nodeValue : ''; |
| 3353 | - $texto = ! empty($texto) ? number_format($texto, 2, ",", ".") : ''; |
|
| 3353 | + $texto = !empty($texto) ? number_format($texto, 2, ",", ".") : ''; |
|
| 3354 | 3354 | } else { |
| 3355 | 3355 | $texto = ''; |
| 3356 | 3356 | } |
@@ -3389,13 +3389,13 @@ discard block |
||
| 3389 | 3389 | |
| 3390 | 3390 | //INFORMAÇÕES COMPLEMENTARES |
| 3391 | 3391 | $texto = "INFORMAÇÕES COMPLEMENTARES"; |
| 3392 | - $y += 3; |
|
| 3392 | + $y += 3; |
|
| 3393 | 3393 | $w = $this->wAdic; |
| 3394 | 3394 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => 'B']; |
| 3395 | 3395 | $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, ''); |
| 3396 | 3396 | //o texto com os dados adicionais foi obtido na função montaDANFE |
| 3397 | 3397 | //e carregado em uma propriedade privada da classe |
| 3398 | - $y += 1; |
|
| 3398 | + $y += 1; |
|
| 3399 | 3399 | $aFont = ['font' => $this->fontePadrao, 'size' => $this->textadicfontsize * $this->pdf->k, 'style' => '']; |
| 3400 | 3400 | //$aFont = ['font'=>$this->fontePadrao, 'size'=> 5, 'style'=>'']; |
| 3401 | 3401 | $this->pdf->textBox($x, $y + 2, $w - 2, $h, $this->textoAdic, $aFont, 'T', 'L', 0, '', false); |
@@ -3440,7 +3440,7 @@ discard block |
||
| 3440 | 3440 | $texto = "CONTINGÊNCIA SVC-RS\n" . $dhCont . "\n" . $xJust; |
| 3441 | 3441 | break; |
| 3442 | 3442 | } |
| 3443 | - $y += 2; |
|
| 3443 | + $y += 2; |
|
| 3444 | 3444 | $aFont = ['font' => $this->fontePadrao, 'size' => 7, 'style' => '']; |
| 3445 | 3445 | $this->pdf->textBox($x, $y, $w - 2, $h, $texto, $aFont, 'T', 'L', 0, '', false); |
| 3446 | 3446 | |
@@ -3495,7 +3495,7 @@ discard block |
||
| 3495 | 3495 | $tpNF = $this->ide->getElementsByTagName('tpNF')->item(0)->nodeValue; |
| 3496 | 3496 | if ($tpNF == '0') { |
| 3497 | 3497 | //NFe de Entrada |
| 3498 | - $emitente = ''; |
|
| 3498 | + $emitente = ''; |
|
| 3499 | 3499 | $emitente .= $this->dest->getElementsByTagName("xNome")->item(0)->nodeValue . " - "; |
| 3500 | 3500 | $emitente .= $this->enderDest->getElementsByTagName("xLgr")->item(0)->nodeValue . ", "; |
| 3501 | 3501 | $emitente .= $this->enderDest->getElementsByTagName("nro")->item(0)->nodeValue . " - "; |
@@ -3548,10 +3548,10 @@ discard block |
||
| 3548 | 3548 | $texto .= "AO LADO"; |
| 3549 | 3549 | } |
| 3550 | 3550 | $texto .= ". EMISSÃO: "; |
| 3551 | - $dEmi = ! empty($this->ide->getElementsByTagName("dEmi")->item(0)->nodeValue) ? |
|
| 3551 | + $dEmi = !empty($this->ide->getElementsByTagName("dEmi")->item(0)->nodeValue) ? |
|
| 3552 | 3552 | $this->ide->getElementsByTagName("dEmi")->item(0)->nodeValue : ''; |
| 3553 | 3553 | if ($dEmi == '') { |
| 3554 | - $dEmi = ! empty($this->ide->getElementsByTagName("dhEmi")->item(0)->nodeValue) ? |
|
| 3554 | + $dEmi = !empty($this->ide->getElementsByTagName("dhEmi")->item(0)->nodeValue) ? |
|
| 3555 | 3555 | $this->ide->getElementsByTagName("dhEmi")->item(0)->nodeValue : ''; |
| 3556 | 3556 | $aDemi = explode('T', $dEmi); |
| 3557 | 3557 | $dEmi = $aDemi[0]; |
@@ -3574,12 +3574,12 @@ discard block |
||
| 3574 | 3574 | $this->pdf->textBox($x1, $y, $w1, 18, $texto, $aFont, 'C', 'C', 1, ''); |
| 3575 | 3575 | //DATA DE RECEBIMENTO |
| 3576 | 3576 | $texto = "DATA DE RECEBIMENTO"; |
| 3577 | - $y += $h; |
|
| 3577 | + $y += $h; |
|
| 3578 | 3578 | $w2 = round($this->wPrint * 0.17, 0); //35; |
| 3579 | 3579 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
| 3580 | 3580 | $this->pdf->textBox($x, $y, $w2, 8, $texto, $aFont, 'T', 'L', 1, ''); |
| 3581 | 3581 | //IDENTIFICAÇÃO E ASSINATURA DO RECEBEDOR |
| 3582 | - $x += $w2; |
|
| 3582 | + $x += $w2; |
|
| 3583 | 3583 | $w3 = $w - $w2; |
| 3584 | 3584 | $texto = "IDENTIFICAÇÃO E ASSINATURA DO RECEBEDOR"; |
| 3585 | 3585 | $this->pdf->textBox($x, $y, $w3, 8, $texto, $aFont, 'T', 'L', 1, ''); |
@@ -3590,7 +3590,7 @@ discard block |
||
| 3590 | 3590 | |
| 3591 | 3591 | return $y; |
| 3592 | 3592 | } else { |
| 3593 | - $x --; |
|
| 3593 | + $x--; |
|
| 3594 | 3594 | $x = $this->pdf->textBox90($x, $y, $w - 1, $h, $texto, $aFontSmall, 'C', 'L', 0, '', false); |
| 3595 | 3595 | //NUMERO DA NOTA FISCAL LOGO NFE |
| 3596 | 3596 | $w1 = 18; |
@@ -3611,7 +3611,7 @@ discard block |
||
| 3611 | 3611 | $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
| 3612 | 3612 | $this->pdf->textBox90($x, $y, $w2, 8, $texto, $aFont, 'T', 'L', 1, ''); |
| 3613 | 3613 | //IDENTIFICAÇÃO E ASSINATURA DO RECEBEDOR |
| 3614 | - $y -= $w2; |
|
| 3614 | + $y -= $w2; |
|
| 3615 | 3615 | $w3 = $w - $w2; |
| 3616 | 3616 | $texto = "IDENTIFICAÇÃO E ASSINATURA DO RECEBEDOR"; |
| 3617 | 3617 | $aFont = ['font' => $this->fontePadrao, 'size' => 5.7, 'style' => '']; |
@@ -3632,18 +3632,18 @@ discard block |
||
| 3632 | 3632 | */ |
| 3633 | 3633 | protected function geraInformacoesDaTagCompra() |
| 3634 | 3634 | { |
| 3635 | - if (! $this->gerarInformacoesAutomaticas) { |
|
| 3635 | + if (!$this->gerarInformacoesAutomaticas) { |
|
| 3636 | 3636 | return ''; |
| 3637 | 3637 | } |
| 3638 | 3638 | $saida = ""; |
| 3639 | 3639 | if (isset($this->compra)) { |
| 3640 | - if (! empty($this->compra->getElementsByTagName("xNEmp")->item(0)->nodeValue)) { |
|
| 3640 | + if (!empty($this->compra->getElementsByTagName("xNEmp")->item(0)->nodeValue)) { |
|
| 3641 | 3641 | $saida .= " Nota de Empenho: " . $this->compra->getElementsByTagName("xNEmp")->item(0)->nodeValue; |
| 3642 | 3642 | } |
| 3643 | - if (! empty($this->compra->getElementsByTagName("xPed")->item(0)->nodeValue)) { |
|
| 3643 | + if (!empty($this->compra->getElementsByTagName("xPed")->item(0)->nodeValue)) { |
|
| 3644 | 3644 | $saida .= " Pedido: " . $this->compra->getElementsByTagName("xPed")->item(0)->nodeValue; |
| 3645 | 3645 | } |
| 3646 | - if (! empty($this->compra->getElementsByTagName("xCont")->item(0)->nodeValue)) { |
|
| 3646 | + if (!empty($this->compra->getElementsByTagName("xCont")->item(0)->nodeValue)) { |
|
| 3647 | 3647 | $saida .= " Contrato: " . $this->compra->getElementsByTagName("xCont")->item(0)->nodeValue; |
| 3648 | 3648 | } |
| 3649 | 3649 | } |
@@ -3674,10 +3674,10 @@ discard block |
||
| 3674 | 3674 | if ($icmss > 0) { |
| 3675 | 3675 | $icmss = 1; |
| 3676 | 3676 | } |
| 3677 | - $dEmi = ! empty($this->ide->getElementsByTagName("dEmi")->item(0)->nodeValue) ? |
|
| 3677 | + $dEmi = !empty($this->ide->getElementsByTagName("dEmi")->item(0)->nodeValue) ? |
|
| 3678 | 3678 | $this->ide->getElementsByTagName("dEmi")->item(0)->nodeValue : ''; |
| 3679 | 3679 | if ($dEmi == '') { |
| 3680 | - $dEmi = ! empty($this->ide->getElementsByTagName("dhEmi")->item(0)->nodeValue) ? |
|
| 3680 | + $dEmi = !empty($this->ide->getElementsByTagName("dhEmi")->item(0)->nodeValue) ? |
|
| 3681 | 3681 | $this->ide->getElementsByTagName("dhEmi")->item(0)->nodeValue : ''; |
| 3682 | 3682 | $aDemi = explode('T', $dEmi); |
| 3683 | 3683 | $dEmi = $aDemi[0]; |
@@ -3701,7 +3701,7 @@ discard block |
||
| 3701 | 3701 | */ |
| 3702 | 3702 | protected function geraInformacoesDasNotasReferenciadas() |
| 3703 | 3703 | { |
| 3704 | - if (! $this->gerarInformacoesAutomaticas) { |
|
| 3704 | + if (!$this->gerarInformacoesAutomaticas) { |
|
| 3705 | 3705 | return ''; |
| 3706 | 3706 | } |
| 3707 | 3707 | $formaNfeRef = "\r\nNFe Ref.: série:%d número:%d emit:%s em %s [%s]"; |
@@ -3729,7 +3729,7 @@ discard block |
||
| 3729 | 3729 | $cnpj = $this->formatField(substr($chave_acesso, 6, 14), "##.###.###/####-##"); |
| 3730 | 3730 | $serie = substr($chave_acesso, 22, 3); |
| 3731 | 3731 | $numero = substr($chave_acesso, 25, 9); |
| 3732 | - $saida .= sprintf($formaNfeRef, $serie, $numero, $cnpj, $data, $chave_acessoF); |
|
| 3732 | + $saida .= sprintf($formaNfeRef, $serie, $numero, $cnpj, $data, $chave_acessoF); |
|
| 3733 | 3733 | } |
| 3734 | 3734 | $refNF = $nfRef->getElementsByTagName('refNF'); |
| 3735 | 3735 | foreach ($refNF as $umaRefNFe) { |
@@ -3740,7 +3740,7 @@ discard block |
||
| 3740 | 3740 | $numero = $umaRefNFe->getElementsByTagName('nNF')->item(0)->nodeValue; |
| 3741 | 3741 | $data = substr($data, 2, 2) . "/20" . substr($data, 0, 2); |
| 3742 | 3742 | $cnpj = $this->formatField($cnpj, "##.###.###/####-##"); |
| 3743 | - $saida .= sprintf($formaNfRef, $serie, $numero, $cnpj, $data, $mod); |
|
| 3743 | + $saida .= sprintf($formaNfRef, $serie, $numero, $cnpj, $data, $mod); |
|
| 3744 | 3744 | } |
| 3745 | 3745 | $refCTe = $nfRef->getElementsByTagName('refCTe'); |
| 3746 | 3746 | foreach ($refCTe as $chave_acessoRef) { |
@@ -3750,7 +3750,7 @@ discard block |
||
| 3750 | 3750 | $cnpj = $this->formatField(substr($chave_acesso, 6, 14), "##.###.###/####-##"); |
| 3751 | 3751 | $serie = substr($chave_acesso, 22, 3); |
| 3752 | 3752 | $numero = substr($chave_acesso, 25, 9); |
| 3753 | - $saida .= sprintf($formaCTeRef, $serie, $numero, $cnpj, $data, $chave_acessoF); |
|
| 3753 | + $saida .= sprintf($formaCTeRef, $serie, $numero, $cnpj, $data, $chave_acessoF); |
|
| 3754 | 3754 | } |
| 3755 | 3755 | $refECF = $nfRef->getElementsByTagName('refECF'); |
| 3756 | 3756 | foreach ($refECF as $umaRefNFe) { |
@@ -3762,10 +3762,9 @@ discard block |
||
| 3762 | 3762 | $refNFP = $nfRef->getElementsByTagName('refNFP'); |
| 3763 | 3763 | foreach ($refNFP as $umaRefNFe) { |
| 3764 | 3764 | $data = $umaRefNFe->getElementsByTagName('AAMM')->item(0)->nodeValue; |
| 3765 | - $cnpj = ! empty($umaRefNFe->getElementsByTagName('CNPJ')->item(0)->nodeValue) ? |
|
| 3766 | - $umaRefNFe->getElementsByTagName('CNPJ')->item(0)->nodeValue : |
|
| 3767 | - ''; |
|
| 3768 | - $cpf = ! empty($umaRefNFe->getElementsByTagName('CPF')->item(0)->nodeValue) ? |
|
| 3765 | + $cnpj = !empty($umaRefNFe->getElementsByTagName('CNPJ')->item(0)->nodeValue) ? |
|
| 3766 | + $umaRefNFe->getElementsByTagName('CNPJ')->item(0)->nodeValue : ''; |
|
| 3767 | + $cpf = !empty($umaRefNFe->getElementsByTagName('CPF')->item(0)->nodeValue) ? |
|
| 3769 | 3768 | $umaRefNFe->getElementsByTagName('CPF')->item(0)->nodeValue : ''; |
| 3770 | 3769 | $mod = $umaRefNFe->getElementsByTagName('mod')->item(0)->nodeValue; |
| 3771 | 3770 | $serie = $umaRefNFe->getElementsByTagName('serie')->item(0)->nodeValue; |
@@ -3787,7 +3786,7 @@ discard block |
||
| 3787 | 3786 | private function loadDoc($xml) |
| 3788 | 3787 | { |
| 3789 | 3788 | $this->xml = $xml; |
| 3790 | - if (! empty($xml)) { |
|
| 3789 | + if (!empty($xml)) { |
|
| 3791 | 3790 | $this->dom = new Dom(); |
| 3792 | 3791 | $this->dom->loadXML($this->xml); |
| 3793 | 3792 | if (empty($this->dom->getElementsByTagName("infNFe")->item(0))) { |
@@ -3841,7 +3840,7 @@ discard block |
||
| 3841 | 3840 | $numlinhas = $this->pdf->getNumLines($textoProduto, $w2, $aFont); |
| 3842 | 3841 | |
| 3843 | 3842 | if ($mostrarUnidadeTributavel && $numlinhas == 1) { |
| 3844 | - $numlinhas ++; |
|
| 3843 | + $numlinhas++; |
|
| 3845 | 3844 | } |
| 3846 | 3845 | |
| 3847 | 3846 | return round(($numlinhas * $this->pdf->fontSize) + ($numlinhas * 0.5), 2); |
@@ -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 | } |