@@ -98,6 +98,9 @@ discard block |
||
98 | 98 | $this->loadDoc($xml); |
99 | 99 | } |
100 | 100 | |
101 | + /** |
|
102 | + * @param string $xml |
|
103 | + */ |
|
101 | 104 | private function loadDoc($xml) |
102 | 105 | { |
103 | 106 | $this->xml = $xml; |
@@ -211,10 +214,6 @@ discard block |
||
211 | 214 | * A definição de margens e posições iniciais para a impressão são estabelecidas no |
212 | 215 | * pelo conteúdo da funçao e podem ser modificados. |
213 | 216 | * |
214 | - * @param string $orientacao (Opcional) Estabelece a orientação da |
|
215 | - * impressão (ex. P-retrato), se nada for fornecido será |
|
216 | - * usado o padrão da NFe |
|
217 | - * @param string $papel (Opcional) Estabelece o tamanho do papel (ex. A4) |
|
218 | 217 | * @return string O ID da NFe numero de 44 digitos extraido do arquivo XML |
219 | 218 | */ |
220 | 219 | protected function monta( |
@@ -441,8 +440,8 @@ discard block |
||
441 | 440 | * cabecalho |
442 | 441 | * Monta o cabelhalho da DACTE ( retrato e paisagem ) |
443 | 442 | * |
444 | - * @param number $x Posição horizontal inicial, canto esquerdo |
|
445 | - * @param number $y Posição vertical inicial, canto superior |
|
443 | + * @param integer $x Posição horizontal inicial, canto esquerdo |
|
444 | + * @param integer $y Posição vertical inicial, canto superior |
|
446 | 445 | * @param number $pag Número da Página |
447 | 446 | * @param number $totPag Total de páginas |
448 | 447 | * @return number Posição vertical final |
@@ -1096,8 +1095,7 @@ discard block |
||
1096 | 1095 | * rodapeDACTE |
1097 | 1096 | * Monta o rodape no final da DACTE ( retrato e paisagem ) |
1098 | 1097 | * |
1099 | - * @param number $xInic Posição horizontal canto esquerdo |
|
1100 | - * @param number $yFinal Posição vertical final para impressão |
|
1098 | + * @param integer $x |
|
1101 | 1099 | */ |
1102 | 1100 | protected function rodape($x, $y) |
1103 | 1101 | { |
@@ -1121,8 +1119,8 @@ discard block |
||
1121 | 1119 | * remetente |
1122 | 1120 | * Monta o campo com os dados do remetente na DACTE. ( retrato e paisagem ) |
1123 | 1121 | * |
1124 | - * @param number $x Posição horizontal canto esquerdo |
|
1125 | - * @param number $y Posição vertical canto superior |
|
1122 | + * @param integer $x Posição horizontal canto esquerdo |
|
1123 | + * @param integer $y Posição vertical canto superior |
|
1126 | 1124 | * @return number Posição vertical final |
1127 | 1125 | */ |
1128 | 1126 | protected function remetente($x = 0, $y = 0) |
@@ -1209,8 +1207,8 @@ discard block |
||
1209 | 1207 | * destinatario |
1210 | 1208 | * Monta o campo com os dados do destinatário na DACTE. |
1211 | 1209 | * |
1212 | - * @param number $x Posição horizontal canto esquerdo |
|
1213 | - * @param number $y Posição vertical canto superior |
|
1210 | + * @param integer $x Posição horizontal canto esquerdo |
|
1211 | + * @param integer $y Posição vertical canto superior |
|
1214 | 1212 | * @return number Posição vertical final |
1215 | 1213 | */ |
1216 | 1214 | protected function destinatario($x = 0, $y = 0) |
@@ -1296,8 +1294,8 @@ discard block |
||
1296 | 1294 | * expedidor |
1297 | 1295 | * Monta o campo com os dados do remetente na DACTE. ( retrato e paisagem ) |
1298 | 1296 | * |
1299 | - * @param number $x Posição horizontal canto esquerdo |
|
1300 | - * @param number $y Posição vertical canto superior |
|
1297 | + * @param integer $x Posição horizontal canto esquerdo |
|
1298 | + * @param integer $y Posição vertical canto superior |
|
1301 | 1299 | * @return number Posição vertical final |
1302 | 1300 | */ |
1303 | 1301 | protected function expedidor($x = 0, $y = 0) |
@@ -1393,8 +1391,8 @@ discard block |
||
1393 | 1391 | * recebedor |
1394 | 1392 | * Monta o campo com os dados do remetente na DACTE. ( retrato e paisagem ) |
1395 | 1393 | * |
1396 | - * @param number $x Posição horizontal canto esquerdo |
|
1397 | - * @param number $y Posição vertical canto superior |
|
1394 | + * @param integer $x Posição horizontal canto esquerdo |
|
1395 | + * @param integer $y Posição vertical canto superior |
|
1398 | 1396 | * @return number Posição vertical final |
1399 | 1397 | */ |
1400 | 1398 | protected function recebedor($x = 0, $y = 0) |
@@ -1490,8 +1488,8 @@ discard block |
||
1490 | 1488 | * tomador |
1491 | 1489 | * Monta o campo com os dados do remetente na DACTE. ( retrato e paisagem ) |
1492 | 1490 | * |
1493 | - * @param number $x Posição horizontal canto esquerdo |
|
1494 | - * @param number $y Posição vertical canto superior |
|
1491 | + * @param integer $x Posição horizontal canto esquerdo |
|
1492 | + * @param integer $y Posição vertical canto superior |
|
1495 | 1493 | * @return number Posição vertical final |
1496 | 1494 | */ |
1497 | 1495 | protected function tomador($x = 0, $y = 0) |
@@ -1579,8 +1577,8 @@ discard block |
||
1579 | 1577 | * descricaoCarga |
1580 | 1578 | * Monta o campo com os dados do remetente na DACTE. ( retrato e paisagem ) |
1581 | 1579 | * |
1582 | - * @param number $x Posição horizontal canto esquerdo |
|
1583 | - * @param number $y Posição vertical canto superior |
|
1580 | + * @param integer $x Posição horizontal canto esquerdo |
|
1581 | + * @param integer $y Posição vertical canto superior |
|
1584 | 1582 | * @return number Posição vertical final |
1585 | 1583 | */ |
1586 | 1584 | protected function descricaoCarga($x = 0, $y = 0) |
@@ -1756,8 +1754,8 @@ discard block |
||
1756 | 1754 | * compValorServ |
1757 | 1755 | * Monta o campo com os componentes da prestação de serviços. |
1758 | 1756 | * |
1759 | - * @param number $x Posição horizontal canto esquerdo |
|
1760 | - * @param number $y Posição vertical canto superior |
|
1757 | + * @param integer $x Posição horizontal canto esquerdo |
|
1758 | + * @param integer $y Posição vertical canto superior |
|
1761 | 1759 | * @return number Posição vertical final |
1762 | 1760 | */ |
1763 | 1761 | protected function compValorServ($x = 0, $y = 0) |
@@ -1855,8 +1853,8 @@ discard block |
||
1855 | 1853 | * impostos |
1856 | 1854 | * Monta o campo com os dados do remetente na DACTE. ( retrato e paisagem ) |
1857 | 1855 | * |
1858 | - * @param number $x Posição horizontal canto esquerdo |
|
1859 | - * @param number $y Posição vertical canto superior |
|
1856 | + * @param integer $x Posição horizontal canto esquerdo |
|
1857 | + * @param integer $y Posição vertical canto superior |
|
1860 | 1858 | * @return number Posição vertical final |
1861 | 1859 | */ |
1862 | 1860 | protected function impostos($x = 0, $y = 0) |
@@ -2401,8 +2399,8 @@ discard block |
||
2401 | 2399 | * docOrig |
2402 | 2400 | * Monta o campo com os documentos originarios. |
2403 | 2401 | * |
2404 | - * @param number $x Posição horizontal canto esquerdo |
|
2405 | - * @param number $y Posição vertical canto superior |
|
2402 | + * @param integer $x Posição horizontal canto esquerdo |
|
2403 | + * @param integer $y Posição vertical canto superior |
|
2406 | 2404 | * @return number Posição vertical final |
2407 | 2405 | */ |
2408 | 2406 | protected function docOrig($x = 0, $y = 0) |
@@ -2697,8 +2695,8 @@ discard block |
||
2697 | 2695 | * docOrigContinuacao |
2698 | 2696 | * Monta o campo com os documentos originarios. |
2699 | 2697 | * |
2700 | - * @param number $x Posição horizontal canto esquerdo |
|
2701 | - * @param number $y Posição vertical canto superior |
|
2698 | + * @param integer $x Posição horizontal canto esquerdo |
|
2699 | + * @param integer $y Posição vertical canto superior |
|
2702 | 2700 | * @return number Posição vertical final |
2703 | 2701 | */ |
2704 | 2702 | protected function docOrigContinuacao($x = 0, $y = 0) |
@@ -2818,8 +2816,8 @@ discard block |
||
2818 | 2816 | * docCompl |
2819 | 2817 | * Monta o campo com os dados do remetente na DACTE. |
2820 | 2818 | * |
2821 | - * @param number $x Posição horizontal canto esquerdo |
|
2822 | - * @param number $y Posição vertical canto superior |
|
2819 | + * @param integer $x Posição horizontal canto esquerdo |
|
2820 | + * @param integer $y Posição vertical canto superior |
|
2823 | 2821 | * @return number Posição vertical final |
2824 | 2822 | */ |
2825 | 2823 | protected function docCompl($x = 0, $y = 0) |
@@ -2887,8 +2885,8 @@ discard block |
||
2887 | 2885 | * observacao |
2888 | 2886 | * Monta o campo com os dados do remetente na DACTE. |
2889 | 2887 | * |
2890 | - * @param number $x Posição horizontal canto esquerdo |
|
2891 | - * @param number $y Posição vertical canto superior |
|
2888 | + * @param integer $x Posição horizontal canto esquerdo |
|
2889 | + * @param integer $y Posição vertical canto superior |
|
2892 | 2890 | * @return number Posição vertical final |
2893 | 2891 | */ |
2894 | 2892 | protected function observacao($x = 0, $y = 0) |
@@ -2930,8 +2928,8 @@ discard block |
||
2930 | 2928 | * modalRod |
2931 | 2929 | * Monta o campo com os dados do remetente na DACTE. ( retrato e paisagem ) |
2932 | 2930 | * |
2933 | - * @param number $x Posição horizontal canto esquerdo |
|
2934 | - * @param number $y Posição vertical canto superior |
|
2931 | + * @param integer $x Posição horizontal canto esquerdo |
|
2932 | + * @param integer $y Posição vertical canto superior |
|
2935 | 2933 | * @return number Posição vertical final |
2936 | 2934 | */ |
2937 | 2935 | protected function modalRod($x = 0, $y = 0) |
@@ -2971,8 +2969,8 @@ discard block |
||
2971 | 2969 | * modalAereo |
2972 | 2970 | * Monta o campo com os dados do remetente na DACTE. ( retrato e paisagem ) |
2973 | 2971 | * |
2974 | - * @param number $x Posição horizontal canto esquerdo |
|
2975 | - * @param number $y Posição vertical canto superior |
|
2972 | + * @param integer $x Posição horizontal canto esquerdo |
|
2973 | + * @param integer $y Posição vertical canto superior |
|
2976 | 2974 | * @return number Posição vertical final |
2977 | 2975 | */ |
2978 | 2976 | protected function modalAereo($x = 0, $y = 0) |
@@ -3028,8 +3026,8 @@ discard block |
||
3028 | 3026 | * modalAquaviario |
3029 | 3027 | * Monta o campo com os dados do remetente na DACTE. ( retrato e paisagem ) |
3030 | 3028 | * |
3031 | - * @param number $x Posição horizontal canto esquerdo |
|
3032 | - * @param number $y Posição vertical canto superior |
|
3029 | + * @param integer $x Posição horizontal canto esquerdo |
|
3030 | + * @param integer $y Posição vertical canto superior |
|
3033 | 3031 | * @return number Posição vertical final |
3034 | 3032 | */ |
3035 | 3033 | protected function modalAquaviario($x = 0, $y = 0) |
@@ -3145,8 +3143,8 @@ discard block |
||
3145 | 3143 | * modalFerr |
3146 | 3144 | * Monta o campo com os dados do remetente na DACTE. ( retrato e paisagem ) |
3147 | 3145 | * |
3148 | - * @param number $x Posição horizontal canto esquerdo |
|
3149 | - * @param number $y Posição vertical canto superior |
|
3146 | + * @param integer $x Posição horizontal canto esquerdo |
|
3147 | + * @param integer $y Posição vertical canto superior |
|
3150 | 3148 | * @return number Posição vertical final |
3151 | 3149 | */ |
3152 | 3150 | protected function modalFerr($x = 0, $y = 0) |
@@ -3423,8 +3421,8 @@ discard block |
||
3423 | 3421 | * canhoto |
3424 | 3422 | * Monta o campo com os dados do remetente na DACTE. |
3425 | 3423 | * |
3426 | - * @param number $x Posição horizontal canto esquerdo |
|
3427 | - * @param number $y Posição vertical canto superior |
|
3424 | + * @param integer $x Posição horizontal canto esquerdo |
|
3425 | + * @param integer $y Posição vertical canto superior |
|
3428 | 3426 | * @return number Posição vertical final |
3429 | 3427 | */ |
3430 | 3428 | protected function canhoto($x = 0, $y = 0) |
@@ -3497,9 +3495,10 @@ discard block |
||
3497 | 3495 | * dadosAdic |
3498 | 3496 | * Coloca o grupo de dados adicionais da DACTE. |
3499 | 3497 | * |
3500 | - * @param number $x Posição horizontal canto esquerdo |
|
3501 | - * @param number $y Posição vertical canto superior |
|
3502 | - * @param number $h altura do campo |
|
3498 | + * @param integer $x Posição horizontal canto esquerdo |
|
3499 | + * @param double $y Posição vertical canto superior |
|
3500 | + * @param integer $h altura do campo |
|
3501 | + * @param integer $pag |
|
3503 | 3502 | * @return number Posição vertical final |
3504 | 3503 | */ |
3505 | 3504 | protected function dadosAdic($x, $y, $pag, $h) |
@@ -3692,7 +3691,7 @@ discard block |
||
3692 | 3691 | * Fornece a imformação multiplicação de peso contida na CTe |
3693 | 3692 | * |
3694 | 3693 | * @param interger $U Informação de peso extraida da CTe |
3695 | - * @return interger |
|
3694 | + * @return integer |
|
3696 | 3695 | */ |
3697 | 3696 | protected function multiUniPeso($U = '') |
3698 | 3697 | { |
@@ -945,7 +945,7 @@ discard block |
||
945 | 945 | $n = count($resp['message']); |
946 | 946 | $alttot = $n * 15; |
947 | 947 | $x = 10; |
948 | - $y = $this->hPrint/2 - $alttot/2; |
|
948 | + $y = $this->hPrint / 2 - $alttot / 2; |
|
949 | 949 | $h = 15; |
950 | 950 | $w = $maxW - (2 * $x); |
951 | 951 | $this->pdf->settextcolor(90, 90, 90); |
@@ -1271,8 +1271,7 @@ discard block |
||
1271 | 1271 | $texto = $this->getTagValue($this->enderExped, "xLgr") . ', '; |
1272 | 1272 | $texto .= $this->getTagValue($this->enderExped, "nro"); |
1273 | 1273 | $texto .= $this->getTagValue($this->enderExped, "xCpl") != "" ? |
1274 | - ' - ' . $this->getTagValue($this->enderExped, "xCpl") : |
|
1275 | - ''; |
|
1274 | + ' - ' . $this->getTagValue($this->enderExped, "xCpl") : ''; |
|
1276 | 1275 | } else { |
1277 | 1276 | $texto = ''; |
1278 | 1277 | } |
@@ -1368,8 +1367,7 @@ discard block |
||
1368 | 1367 | $texto = $this->getTagValue($this->enderReceb, "xLgr") . ', '; |
1369 | 1368 | $texto .= $this->getTagValue($this->enderReceb, "nro"); |
1370 | 1369 | $texto .= ($this->getTagValue($this->enderReceb, "xCpl") != "") ? |
1371 | - ' - ' . $this->getTagValue($this->enderReceb, "xCpl") : |
|
1372 | - ''; |
|
1370 | + ' - ' . $this->getTagValue($this->enderReceb, "xCpl") : ''; |
|
1373 | 1371 | } else { |
1374 | 1372 | $texto = ''; |
1375 | 1373 | } |
@@ -1625,7 +1623,7 @@ discard block |
||
1625 | 1623 | $qCarga = 0; |
1626 | 1624 | foreach ($this->infQ as $infQ) { |
1627 | 1625 | if ($this->getTagValue($infQ, "cUnid") == '00') { |
1628 | - $qCarga += (float)$this->getTagValue($infQ, "qCarga"); |
|
1626 | + $qCarga += (float) $this->getTagValue($infQ, "qCarga"); |
|
1629 | 1627 | } |
1630 | 1628 | } |
1631 | 1629 | $texto = !empty($qCarga) ? number_format($qCarga, 3, ",", ".") : ''; |
@@ -1642,7 +1640,7 @@ discard block |
||
1642 | 1640 | $qCarga = 0; |
1643 | 1641 | foreach ($this->infQ as $infQ) { |
1644 | 1642 | if ($this->getTagValue($infQ, "cUnid") == '03') { |
1645 | - $qCarga += (float)$this->getTagValue($infQ, "qCarga"); |
|
1643 | + $qCarga += (float) $this->getTagValue($infQ, "qCarga"); |
|
1646 | 1644 | } |
1647 | 1645 | } |
1648 | 1646 | $texto = !empty($qCarga) ? number_format($qCarga, 3, ",", ".") : ''; |
@@ -3572,7 +3570,7 @@ discard block |
||
3572 | 3570 | $y = $y + 5; |
3573 | 3571 | $this->pdf->line($x, $y + 3, $w * 0.255, $y + 3); // LINHA HORIZONTAL ACIMA DO RG ABAIXO DO NOME |
3574 | 3572 | $texto = 'RG'; |
3575 | - $aFont = ['font' => $this->fontePadrao,'size' => 6,'style' => '']; |
|
3573 | + $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => '']; |
|
3576 | 3574 | $this->pdf->textBox($x, $y + 3, $w * 0.33, $h, $texto, $aFont, 'T', 'L', 0, ''); |
3577 | 3575 | $x += $w * 0.85; |
3578 | 3576 | $this->pdf->line($x, $y + 11.5, $x, $y - 5); // LINHA VERTICAL PROXIMO AO CT-E |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | //ativar modo debug |
122 | 122 | error_reporting(E_ALL); |
123 | 123 | ini_set('display_errors', 'On'); |
124 | - set_error_handler(function (int $errnum, string $errmsg, string $errfile, int $errline) { |
|
124 | + set_error_handler(function(int $errnum, string $errmsg, string $errfile, int $errline) { |
|
125 | 125 | throw new \Exception("Erro identificado $errnum: '$errmsg' $errfile [linha:" . $errline . "]"); |
126 | 126 | }); |
127 | 127 | } else { |
@@ -275,7 +275,7 @@ discard block |
||
275 | 275 | } |
276 | 276 | if (substr($logo, 0, 24) !== 'data://text/plain;base64') { |
277 | 277 | if (is_file($logo)) { |
278 | - $logo = 'data://text/plain;base64,'. base64_encode(file_get_contents($logo)); |
|
278 | + $logo = 'data://text/plain;base64,' . base64_encode(file_get_contents($logo)); |
|
279 | 279 | } else { |
280 | 280 | //se não é uma string e nem um file retorna nulo |
281 | 281 | return null; |
@@ -317,7 +317,7 @@ discard block |
||
317 | 317 | imagedestroy($image); |
318 | 318 | $logo = ob_get_contents(); // read from buffer |
319 | 319 | ob_end_clean(); |
320 | - return 'data://text/plain;base64,'.base64_encode($logo); |
|
320 | + return 'data://text/plain;base64,' . base64_encode($logo); |
|
321 | 321 | } |
322 | 322 | |
323 | 323 | /** |
@@ -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 = [ |
@@ -172,6 +172,9 @@ discard block |
||
172 | 172 | $this->pdfVersion = '1.3'; |
173 | 173 | } |
174 | 174 | |
175 | + /** |
|
176 | + * @param integer $right |
|
177 | + */ |
|
175 | 178 | public function setMargins($left, $top, $right = null) |
176 | 179 | { |
177 | 180 | // Set left, top and right margins |
@@ -204,6 +207,9 @@ discard block |
||
204 | 207 | $this->rMargin = $margin; |
205 | 208 | } |
206 | 209 | |
210 | + /** |
|
211 | + * @param boolean $auto |
|
212 | + */ |
|
207 | 213 | public function setautoPageBreak($auto, $margin = 0) |
208 | 214 | { |
209 | 215 | // Set auto page break mode and triggering margin |
@@ -211,6 +217,10 @@ discard block |
||
211 | 217 | $this->bMargin = $margin; |
212 | 218 | $this->pageBreakTrigger = $this->h - $margin; |
213 | 219 | } |
220 | + |
|
221 | + /** |
|
222 | + * @param string $zoom |
|
223 | + */ |
|
214 | 224 | public function setDisplayMode($zoom, $layout = 'default') |
215 | 225 | { |
216 | 226 | // Set display mode in viewer |
@@ -226,6 +236,9 @@ discard block |
||
226 | 236 | } |
227 | 237 | } |
228 | 238 | |
239 | + /** |
|
240 | + * @param boolean $compress |
|
241 | + */ |
|
229 | 242 | public function setCompression($compress) |
230 | 243 | { |
231 | 244 | // Set page compression |
@@ -272,6 +285,9 @@ discard block |
||
272 | 285 | $this->aliasNbPages = $alias; |
273 | 286 | } |
274 | 287 | |
288 | + /** |
|
289 | + * @param string $msg |
|
290 | + */ |
|
275 | 291 | public function error($msg) |
276 | 292 | { |
277 | 293 | // Fatal error |
@@ -382,6 +398,12 @@ discard block |
||
382 | 398 | // Get current page number |
383 | 399 | return $this->page; |
384 | 400 | } |
401 | + |
|
402 | + /** |
|
403 | + * @param integer $r |
|
404 | + * @param integer $g |
|
405 | + * @param integer $b |
|
406 | + */ |
|
385 | 407 | public function setdrawColor($r, $g = null, $b = null) |
386 | 408 | { |
387 | 409 | // Set color for all stroking operations |
@@ -395,6 +417,11 @@ discard block |
||
395 | 417 | } |
396 | 418 | } |
397 | 419 | |
420 | + /** |
|
421 | + * @param integer $r |
|
422 | + * @param integer $g |
|
423 | + * @param integer $b |
|
424 | + */ |
|
398 | 425 | public function setfillColor($r, $g = null, $b = null) |
399 | 426 | { |
400 | 427 | // Set color for all filling operations |
@@ -409,6 +436,11 @@ discard block |
||
409 | 436 | } |
410 | 437 | } |
411 | 438 | |
439 | + /** |
|
440 | + * @param integer $r |
|
441 | + * @param integer $g |
|
442 | + * @param integer $b |
|
443 | + */ |
|
412 | 444 | public function settextColor($r, $g = null, $b = null) |
413 | 445 | { |
414 | 446 | // Set color for text |
@@ -478,6 +510,9 @@ discard block |
||
478 | 510 | ); |
479 | 511 | } |
480 | 512 | |
513 | + /** |
|
514 | + * @param string $family |
|
515 | + */ |
|
481 | 516 | public function addFont($family, $style = '', $file = '') |
482 | 517 | { |
483 | 518 | // Add a TrueType, OpenType or Type1 font |
@@ -594,6 +629,10 @@ discard block |
||
594 | 629 | $this->links[$link] = [$page, $y]; |
595 | 630 | } |
596 | 631 | |
632 | + /** |
|
633 | + * @param double $y |
|
634 | + * @param string $link |
|
635 | + */ |
|
597 | 636 | public function link($x, $y, $w, $h, $link) |
598 | 637 | { |
599 | 638 | // Put a link on the page |
@@ -606,6 +645,10 @@ discard block |
||
606 | 645 | ]; |
607 | 646 | } |
608 | 647 | |
648 | + /** |
|
649 | + * @param double $y |
|
650 | + * @param string $txt |
|
651 | + */ |
|
609 | 652 | public function text($x, $y, $txt) |
610 | 653 | { |
611 | 654 | // output a string |
@@ -770,6 +813,9 @@ discard block |
||
770 | 813 | } |
771 | 814 | } |
772 | 815 | |
816 | + /** |
|
817 | + * @param integer $h |
|
818 | + */ |
|
773 | 819 | public function multiCell($w, $h, $txt, $border = 0, $align = 'J', $fill = false) |
774 | 820 | { |
775 | 821 | // output text with automatic or explicit line breaks |
@@ -970,6 +1016,9 @@ discard block |
||
970 | 1016 | } |
971 | 1017 | } |
972 | 1018 | |
1019 | + /** |
|
1020 | + * @param string $file |
|
1021 | + */ |
|
973 | 1022 | public function image($file, $x = null, $y = null, $w = 0, $h = 0, $type = '', $link = '') |
974 | 1023 | { |
975 | 1024 | // Put an image on the page |
@@ -1214,6 +1263,10 @@ discard block |
||
1214 | 1263 | } |
1215 | 1264 | } |
1216 | 1265 | |
1266 | + /** |
|
1267 | + * @param string $orientation |
|
1268 | + * @param string $size |
|
1269 | + */ |
|
1217 | 1270 | protected function beginPage($orientation, $size, $rotation) |
1218 | 1271 | { |
1219 | 1272 | $this->page++; |
@@ -1416,6 +1469,9 @@ discard block |
||
1416 | 1469 | ]; |
1417 | 1470 | } |
1418 | 1471 | |
1472 | + /** |
|
1473 | + * @param string $file |
|
1474 | + */ |
|
1419 | 1475 | protected function parsePng($file) |
1420 | 1476 | { |
1421 | 1477 | // Extract info from a PNG file |
@@ -279,7 +279,6 @@ |
||
279 | 279 | |
280 | 280 | /** |
281 | 281 | * Carrega os dados do xml na classe |
282 | - * @param string $xml |
|
283 | 282 | * |
284 | 283 | * @throws InvalidArgumentException |
285 | 284 | */ |
@@ -13,13 +13,11 @@ |
||
13 | 13 | * @link http://github.com/nfephp-org/sped-da for the canonical source repository |
14 | 14 | */ |
15 | 15 | |
16 | -use DateTime; |
|
17 | 16 | use Exception; |
18 | 17 | use InvalidArgumentException; |
19 | 18 | use NFePHP\DA\Legacy\Dom; |
20 | 19 | use NFePHP\DA\Legacy\Pdf; |
21 | 20 | use NFePHP\DA\Common\DaCommon; |
22 | -use Com\Tecnick\Barcode\Barcode; |
|
23 | 21 | |
24 | 22 | class Danfce extends DaCommon |
25 | 23 | { |
@@ -27,8 +27,8 @@ discard block |
||
27 | 27 | protected $paperwidth = 80; |
28 | 28 | protected $descPercent = 0.38; |
29 | 29 | protected $xml; // string XML NFe |
30 | - protected $logomarca=''; // path para logomarca em jpg |
|
31 | - protected $formatoChave="#### #### #### #### #### #### #### #### #### #### ####"; |
|
30 | + protected $logomarca = ''; // path para logomarca em jpg |
|
31 | + protected $formatoChave = "#### #### #### #### #### #### #### #### #### #### ####"; |
|
32 | 32 | protected $nfeProc; |
33 | 33 | protected $nfe; |
34 | 34 | protected $infNFe; |
@@ -221,10 +221,10 @@ discard block |
||
221 | 221 | //total inicial de paginas |
222 | 222 | $totPag = 1; |
223 | 223 | //largura imprimivel em mm: largura da folha menos as margens esq/direita |
224 | - $this->wPrint = $maxW-($margEsq*2); |
|
224 | + $this->wPrint = $maxW - ($margEsq * 2); |
|
225 | 225 | //comprimento (altura) imprimivel em mm: altura da folha menos as margens |
226 | 226 | //superior e inferior |
227 | - $this->hPrint = $maxH-$margSup-$margInf; |
|
227 | + $this->hPrint = $maxH - $margSup - $margInf; |
|
228 | 228 | // estabelece contagem de paginas |
229 | 229 | $this->pdf->aliasNbPages(); |
230 | 230 | $this->pdf->setMargins($margEsq, $margSup); // fixa as margens |
@@ -248,7 +248,7 @@ discard block |
||
248 | 248 | $y = $this->blocoIX($y); //informações complementares e sobre tributos |
249 | 249 | $y = $this->blocoX($y); //creditos |
250 | 250 | |
251 | - $ymark = $maxH/4; |
|
251 | + $ymark = $maxH / 4; |
|
252 | 252 | if ($this->tpAmb == 2) { |
253 | 253 | $this->pdf->setTextColor(120, 120, 120); |
254 | 254 | $texto = "SEM VALOR FISCAL\nEmitida em ambiente de homologacao"; |
@@ -257,7 +257,7 @@ discard block |
||
257 | 257 | $this->margem, |
258 | 258 | $ymark, |
259 | 259 | $this->wPrint, |
260 | - $maxH/2, |
|
260 | + $maxH / 2, |
|
261 | 261 | $texto, |
262 | 262 | $aFont, |
263 | 263 | 'T', |
@@ -274,9 +274,9 @@ discard block |
||
274 | 274 | $aFont = ['font' => $this->fontePadrao, 'size' => 24, 'style' => 'B']; |
275 | 275 | $this->pdf->textBox( |
276 | 276 | $this->margem, |
277 | - $ymark+4, |
|
277 | + $ymark + 4, |
|
278 | 278 | $this->wPrint, |
279 | - $maxH/2, |
|
279 | + $maxH / 2, |
|
280 | 280 | $texto, |
281 | 281 | $aFont, |
282 | 282 | 'T', |
@@ -288,9 +288,9 @@ discard block |
||
288 | 288 | $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B']; |
289 | 289 | $this->pdf->textBox( |
290 | 290 | $this->margem, |
291 | - $ymark+14, |
|
291 | + $ymark + 14, |
|
292 | 292 | $this->wPrint, |
293 | - $maxH/2, |
|
293 | + $maxH / 2, |
|
294 | 294 | $this->submessage, |
295 | 295 | $aFont, |
296 | 296 | 'T', |
@@ -318,7 +318,7 @@ discard block |
||
318 | 318 | $y = $this->blocoVIII($y); //QRCODE |
319 | 319 | $y = $this->blocoIX($y); //informações sobre tributos |
320 | 320 | $y = $this->blocoX($y); //creditos |
321 | - $ymark = $maxH/4; |
|
321 | + $ymark = $maxH / 4; |
|
322 | 322 | if ($this->tpAmb == 2) { |
323 | 323 | $this->pdf->setTextColor(120, 120, 120); |
324 | 324 | $texto = "SEM VALOR FISCAL\nEmitida em ambiente de homologacao"; |
@@ -327,7 +327,7 @@ discard block |
||
327 | 327 | $this->margem, |
328 | 328 | $ymark, |
329 | 329 | $this->wPrint, |
330 | - $maxH/2, |
|
330 | + $maxH / 2, |
|
331 | 331 | $texto, |
332 | 332 | $aFont, |
333 | 333 | 'T', |
@@ -413,7 +413,7 @@ discard block |
||
413 | 413 | } elseif (!empty($retEvento = $this->nfeProc->getElementsByTagName('retEvento')->item(0))) { |
414 | 414 | $infEvento = $retEvento->getElementsByTagName('infEvento')->item(0); |
415 | 415 | $cStat = $this->getTagValue($infEvento, "cStat"); |
416 | - $tpEvento= $this->getTagValue($infEvento, "tpEvento"); |
|
416 | + $tpEvento = $this->getTagValue($infEvento, "tpEvento"); |
|
417 | 417 | $dhEvento = date( |
418 | 418 | "d/m/Y H:i:s", |
419 | 419 | $this->toTimestamp( |
@@ -31,13 +31,13 @@ discard block |
||
31 | 31 | $xImg = $this->margem; |
32 | 32 | $yImg = $this->margem + 1; |
33 | 33 | $logoInfo = getimagesize($this->logomarca); |
34 | - $logoWmm = ($logoInfo[0]/72)*25.4; |
|
35 | - $logoHmm = ($logoInfo[1]/72)*25.4; |
|
36 | - $nImgW = $this->wPrint/4; |
|
37 | - $nImgH = round($logoHmm * ($nImgW/$logoWmm), 0); |
|
34 | + $logoWmm = ($logoInfo[0] / 72) * 25.4; |
|
35 | + $logoHmm = ($logoInfo[1] / 72) * 25.4; |
|
36 | + $nImgW = $this->wPrint / 4; |
|
37 | + $nImgH = round($logoHmm * ($nImgW / $logoWmm), 0); |
|
38 | 38 | if ($nImgH > $maxHimg) { |
39 | 39 | $nImgH = $maxHimg; |
40 | - $nImgW = round($logoWmm * ($nImgH/$logoHmm), 0); |
|
40 | + $nImgW = round($logoWmm * ($nImgH / $logoHmm), 0); |
|
41 | 41 | } |
42 | 42 | $xRs = ($nImgW) + $this->margem; |
43 | 43 | $wRs = ($this->wPrint - $nImgW); |
@@ -52,10 +52,10 @@ discard block |
||
52 | 52 | $aFont = ['font'=>$this->fontePadrao, 'size' => 8, 'style' => '']; |
53 | 53 | $texto = "{$emitRazao}"; |
54 | 54 | $y += $this->pdf->textBox( |
55 | - $xRs+2, |
|
55 | + $xRs + 2, |
|
56 | 56 | $this->margem, |
57 | - $wRs-2, |
|
58 | - $this->bloco1H-$this->margem-1, |
|
57 | + $wRs - 2, |
|
58 | + $this->bloco1H - $this->margem - 1, |
|
59 | 59 | $texto, |
60 | 60 | $aFont, |
61 | 61 | 'T', |
@@ -68,13 +68,13 @@ discard block |
||
68 | 68 | $aFont = ['font'=>$this->fontePadrao, 'size' => $this->pdf->fontSizePt, 'style' => '']; |
69 | 69 | } |
70 | 70 | $texto = "CNPJ: {$emitCnpj} IE: {$emitIE}"; |
71 | - $y += $this->pdf->textBox($xRs+2, $y, $wRs-2, 3, $texto, $aFont, 'T', $alignH, false, '', true); |
|
71 | + $y += $this->pdf->textBox($xRs + 2, $y, $wRs - 2, 3, $texto, $aFont, 'T', $alignH, false, '', true); |
|
72 | 72 | $texto = $emitLgr . ", " . $emitNro; |
73 | - $y += $this->pdf->textBox($xRs+2, $y, $wRs-2, 3, $texto, $aFont, 'T', $alignH, false, '', true); |
|
73 | + $y += $this->pdf->textBox($xRs + 2, $y, $wRs - 2, 3, $texto, $aFont, 'T', $alignH, false, '', true); |
|
74 | 74 | $texto = $emitBairro; |
75 | - $y += $this->pdf->textBox($xRs+2, $y, $wRs-2, 3, $texto, $aFont, 'T', $alignH, false, '', true); |
|
75 | + $y += $this->pdf->textBox($xRs + 2, $y, $wRs - 2, 3, $texto, $aFont, 'T', $alignH, false, '', true); |
|
76 | 76 | $texto = $emitMun . "-" . $emitUF; |
77 | - $y += $this->pdf->textBox($xRs+2, $y, $wRs-2, 3, $texto, $aFont, 'T', $alignH, false, '', true); |
|
77 | + $y += $this->pdf->textBox($xRs + 2, $y, $wRs - 2, 3, $texto, $aFont, 'T', $alignH, false, '', true); |
|
78 | 78 | $this->pdf->dashedHLine($this->margem, $this->bloco1H, $this->wPrint, 0.1, 30); |
79 | 79 | return $this->bloco1H; |
80 | 80 | } |
@@ -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 | } |
@@ -7,6 +7,9 @@ |
||
7 | 7 | */ |
8 | 8 | trait TraitBlocoVI |
9 | 9 | { |
10 | + /** |
|
11 | + * @param double $y |
|
12 | + */ |
|
10 | 13 | protected function blocoVI($y) |
11 | 14 | { |
12 | 15 | //$this->bloco6H = 10; |
@@ -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 | } |
@@ -8,6 +8,9 @@ |
||
8 | 8 | */ |
9 | 9 | trait TraitBlocoVIII |
10 | 10 | { |
11 | + /** |
|
12 | + * @param integer $y |
|
13 | + */ |
|
11 | 14 | protected function blocoVIII($y) |
12 | 15 | { |
13 | 16 | //$this->bloco8H = 50; |
@@ -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 |
@@ -66,6 +66,9 @@ |
||
66 | 66 | return $this->bloco5H + $y; |
67 | 67 | } |
68 | 68 | |
69 | + /** |
|
70 | + * @param integer $type |
|
71 | + */ |
|
69 | 72 | protected function pagType($type) |
70 | 73 | { |
71 | 74 | $lista = [ |