@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | '10' |
| 51 | 51 | ); |
| 52 | 52 | |
| 53 | - $cDV = substr($chave, -1); //Digito Verificador |
|
| 53 | + $cDV = substr($chave, -1); //Digito Verificador |
|
| 54 | 54 | |
| 55 | 55 | /** |
| 56 | 56 | * @todo |
@@ -109,7 +109,7 @@ discard block |
||
| 109 | 109 | $ide->xDetRetira = ''; // Detalhes do retira |
| 110 | 110 | $ide->indIEToma = '1'; |
| 111 | 111 | $ide->dhCont = ''; // Data e Hora da entrada em contingência; no formato AAAAMM-DDTHH:MM:SS |
| 112 | - $ide->xJust = ''; // Justificativa da entrada em contingência |
|
| 112 | + $ide->xJust = ''; // Justificativa da entrada em contingência |
|
| 113 | 113 | |
| 114 | 114 | $this->make->tagide($ide); |
| 115 | 115 | } |
@@ -157,7 +157,7 @@ discard block |
||
| 157 | 157 | $enderToma->CEP = '95720000'; // CEP |
| 158 | 158 | $enderToma->UF = 'SP'; //$arr['siglaUF']; // Sigla UF (Informar EX para operações com o exterior.) |
| 159 | 159 | $enderToma->cPais = '1058'; // Codigo do país ( Utilizar a tabela do BACEN ) |
| 160 | - $enderToma->xPais = 'Brasil'; // Nome do pais |
|
| 160 | + $enderToma->xPais = 'Brasil'; // Nome do pais |
|
| 161 | 161 | $this->make->tagenderToma($enderToma); |
| 162 | 162 | } |
| 163 | 163 | |
@@ -204,9 +204,9 @@ discard block |
||
| 204 | 204 | $enderEmit->xBairro = $providerAddress->getStreet()->getDistrict()->getDistrict(); // Bairro |
| 205 | 205 | $enderEmit->xMun = $providerAddress->getStreet()->getDistrict()->getCity()->getCity(); // Nome do municipio |
| 206 | 206 | $enderEmit->CEP = $providerAddress->getStreet()->getCep()->getCep(); // CEP |
| 207 | - $enderEmit->UF = $providerAddress->getStreet()->getDistrict()->getCity()->getState()->getUf(); // Sigla UF |
|
| 207 | + $enderEmit->UF = $providerAddress->getStreet()->getDistrict()->getCity()->getState()->getUf(); // Sigla UF |
|
| 208 | 208 | $enderEmit->cMun = $this->getCodMunicipio($enderEmit->xMun, $enderEmit->UF); // Código do município (utilizar a tabela do IBGE) |
| 209 | - $enderEmit->fone = $provider->getPhone()[0]->getDdd() . $provider->getPhone()[0]->getPhone(); // Fone |
|
| 209 | + $enderEmit->fone = $provider->getPhone()[0]->getDdd().$provider->getPhone()[0]->getPhone(); // Fone |
|
| 210 | 210 | $this->make->tagenderemit($enderEmit); |
| 211 | 211 | } |
| 212 | 212 | //dest OPCIONAL |
@@ -249,7 +249,7 @@ discard block |
||
| 249 | 249 | //prod OBRIGATÓRIA |
| 250 | 250 | protected function makeProds(Order $order) |
| 251 | 251 | { |
| 252 | - $orderProducts = $order->getOrderProducts(); |
|
| 252 | + $orderProducts = $order->getOrderProducts(); |
|
| 253 | 253 | $item = 1; |
| 254 | 254 | foreach ($orderProducts as $orderProducts) { |
| 255 | 255 | $product = $orderProducts->getProduct(); |
@@ -312,7 +312,7 @@ discard block |
||
| 312 | 312 | //infNFe OBRIGATÓRIA |
| 313 | 313 | $std = new \stdClass(); |
| 314 | 314 | $std->Id = ''; |
| 315 | - $std->versao = $version; |
|
| 315 | + $std->versao = $version; |
|
| 316 | 316 | $this->make->taginfNFe($std); |
| 317 | 317 | } |
| 318 | 318 | |
@@ -382,11 +382,11 @@ discard block |
||
| 382 | 382 | |
| 383 | 383 | $certPath = $dacteKey->getConfigValue(); |
| 384 | 384 | |
| 385 | - if (! $certPath) |
|
| 386 | - throw new \Exception("Key cert path is invalid: " . $certPath, 1); |
|
| 385 | + if (!$certPath) |
|
| 386 | + throw new \Exception("Key cert path is invalid: ".$certPath, 1); |
|
| 387 | 387 | $certContent = $this->manager->getRepository(File::class)->find($dacteKey->getConfigValue()); |
| 388 | 388 | if (!$certContent) |
| 389 | - throw new \Exception("Key content on table files is empty " . $certPath, 1); |
|
| 389 | + throw new \Exception("Key content on table files is empty ".$certPath, 1); |
|
| 390 | 390 | |
| 391 | 391 | return Certificate::readPfx( |
| 392 | 392 | $certContent->getContent(), |
@@ -502,7 +502,7 @@ discard block |
||
| 502 | 502 | $tpEmis, |
| 503 | 503 | $codigo |
| 504 | 504 | ); |
| 505 | - return $chave . $this->calculaDV($chave); |
|
| 505 | + return $chave.$this->calculaDV($chave); |
|
| 506 | 506 | } |
| 507 | 507 | |
| 508 | 508 | |
@@ -377,16 +377,19 @@ |
||
| 377 | 377 | 'people' => $provider, |
| 378 | 378 | 'config_key' => 'cert-pass' |
| 379 | 379 | ]); |
| 380 | - if (!$dacteKey || !$dacteKeyPass) |
|
| 381 | - throw new \Exception("Key cert is required", 1); |
|
| 380 | + if (!$dacteKey || !$dacteKeyPass) { |
|
| 381 | + throw new \Exception("Key cert is required", 1); |
|
| 382 | + } |
|
| 382 | 383 | |
| 383 | 384 | $certPath = $dacteKey->getConfigValue(); |
| 384 | 385 | |
| 385 | - if (! $certPath) |
|
| 386 | - throw new \Exception("Key cert path is invalid: " . $certPath, 1); |
|
| 386 | + if (! $certPath) { |
|
| 387 | + throw new \Exception("Key cert path is invalid: " . $certPath, 1); |
|
| 388 | + } |
|
| 387 | 389 | $certContent = $this->manager->getRepository(File::class)->find($dacteKey->getConfigValue()); |
| 388 | - if (!$certContent) |
|
| 389 | - throw new \Exception("Key content on table files is empty " . $certPath, 1); |
|
| 390 | + if (!$certContent) { |
|
| 391 | + throw new \Exception("Key content on table files is empty " . $certPath, 1); |
|
| 392 | + } |
|
| 390 | 393 | |
| 391 | 394 | return Certificate::readPfx( |
| 392 | 395 | $certContent->getContent(), |