@@ -201,10 +201,10 @@ discard block |
||
201 | 201 | $stdClass = simplexml_load_string($xml); |
202 | 202 | $json = json_encode($stdClass, JSON_OBJECT_AS_ARRAY); |
203 | 203 | $this->nfeArray = json_decode($json, JSON_OBJECT_AS_ARRAY); |
204 | - if (!isset($this->nfeArray['NFe']['infNFe']['@attributes']['Id'])){ |
|
204 | + if (!isset($this->nfeArray['NFe']['infNFe']['@attributes']['Id'])) { |
|
205 | 205 | throw new Exception('XML não parece ser uma NF-e!'); |
206 | 206 | } |
207 | - if ($this->nfeArray['protNFe']['infProt']['cStat'] != '100'){ |
|
207 | + if ($this->nfeArray['protNFe']['infProt']['cStat'] != '100') { |
|
208 | 208 | throw new Exception('NF-e não autorizada!'); |
209 | 209 | } |
210 | 210 | } |
@@ -255,7 +255,7 @@ discard block |
||
255 | 255 | $this->pdf->cell($c1, 5, "TIPO NF", 1, 0, 'C', 1); |
256 | 256 | $this->pdf->setFont('Arial', '', 10); |
257 | 257 | $this->pdf->cell($c1, 5, "{$this->nfeArray['NFe']['infNFe']['ide']['tpNF']} - " . |
258 | - ($this->nfeArray['NFe']['infNFe']['ide']['tpNF']==1 ? 'Saida':'Entrada'), |
|
258 | + ($this->nfeArray['NFe']['infNFe']['ide']['tpNF'] == 1 ? 'Saida' : 'Entrada'), |
|
259 | 259 | 1, 0, 'C', 1); |
260 | 260 | $this->pdf->setFont('Arial', 'B', 10); |
261 | 261 | $this->pdf->cell($c1, 5, "DATA EMISSAO", 1, 0, 'C', 1); |
@@ -289,7 +289,7 @@ discard block |
||
289 | 289 | $this->pdf->ln(); |
290 | 290 | $y = $this->pdf->getY(); |
291 | 291 | $this->pdf->setFillColor(0, 0, 0); |
292 | - $this->pdf->code128(($c1/2), $y, $chave, ($c1 * 3), 15); |
|
292 | + $this->pdf->code128(($c1 / 2), $y, $chave, ($c1 * 3), 15); |
|
293 | 293 | $this->pdf->setFillColor(255, 255, 255); |
294 | 294 | $this->pdf->ln(); |
295 | 295 | $this->pdf->ln(); |
@@ -305,7 +305,7 @@ discard block |
||
305 | 305 | $this->pdf->cell(($c1 * 4), 5, "{$this->nfeArray['NFe']['infNFe']['emit']['xNome']}", 1, 1, 'C', 1); |
306 | 306 | |
307 | 307 | // LINHA 8 |
308 | - $cpfCnpj = (isset($this->nfeArray['NFe']['infNFe']['emit']['CNPJ']) ? $this->nfeArray['NFe']['infNFe']['emit']['CNPJ']:$this->nfeArray['NFe']['infNFe']['emit']['CPF']); |
|
308 | + $cpfCnpj = (isset($this->nfeArray['NFe']['infNFe']['emit']['CNPJ']) ? $this->nfeArray['NFe']['infNFe']['emit']['CNPJ'] : $this->nfeArray['NFe']['infNFe']['emit']['CPF']); |
|
309 | 309 | $this->pdf->cell(($c1 * 2), 5, "CNPJ/CPF {$cpfCnpj}", 1, 0, 'C', 1); |
310 | 310 | $this->pdf->cell(($c1 * 2), 5, @"RG/IE {$this->nfeArray['NFe']['infNFe']['emit']['IE']}", 1, 1, 'C', 1); |
311 | 311 | |
@@ -318,7 +318,7 @@ discard block |
||
318 | 318 | $this->pdf->cell(($c1 * 4), 5, "{$this->nfeArray['NFe']['infNFe']['dest']['xNome']}", 1, 1, 'C', 1); |
319 | 319 | |
320 | 320 | // LINHA 11 |
321 | - $cpfCnpj = (isset($this->nfeArray['NFe']['infNFe']['dest']['CNPJ']) ? $this->nfeArray['NFe']['infNFe']['dest']['CNPJ']:$this->nfeArray['NFe']['infNFe']['dest']['CPF']); |
|
321 | + $cpfCnpj = (isset($this->nfeArray['NFe']['infNFe']['dest']['CNPJ']) ? $this->nfeArray['NFe']['infNFe']['dest']['CNPJ'] : $this->nfeArray['NFe']['infNFe']['dest']['CPF']); |
|
322 | 322 | $this->pdf->cell(($c1 * 2), 5, "CNPJ/CPF {$cpfCnpj}", 1, 0, 'C', 1); |
323 | 323 | $this->pdf->cell(($c1 * 2), 5, @"RG/IE {$this->nfeArray['NFe']['infNFe']['dest']['IE']}", 1, 1, 'C', 1); |
324 | 324 |