@@ -30,10 +30,10 @@ discard block |
||
| 30 | 30 | |
| 31 | 31 | if ($this->CategoriaBanner->save($dados)) { |
| 32 | 32 | $this->Session->setFlash('Categoria criada com Sucesso!','default','good'); |
| 33 | - return $this->redirect('/categoria_banner/listar_cadastros'); |
|
| 33 | + return $this->redirect('/categoria_banner/listar_cadastros'); |
|
| 34 | 34 | } else { |
| 35 | 35 | $this->Session->setFlash('Erro ao criar a categoria!','default','good'); |
| 36 | - return $this->redirect('/categoria_banner/listar_cadastros'); |
|
| 36 | + return $this->redirect('/categoria_banner/listar_cadastros'); |
|
| 37 | 37 | } |
| 38 | 38 | } |
| 39 | 39 | |
@@ -56,10 +56,10 @@ discard block |
||
| 56 | 56 | |
| 57 | 57 | if ($this->CategoriaBanner->save($dados)) { |
| 58 | 58 | $this->Session->setFlash('Categoria editada com Sucesso!','default','good'); |
| 59 | - return $this->redirect('/categoria_banner/listar_cadastros'); |
|
| 59 | + return $this->redirect('/categoria_banner/listar_cadastros'); |
|
| 60 | 60 | } else { |
| 61 | 61 | $this->Session->setFlash('Erro ao editar a categoria!','default','good'); |
| 62 | - return $this->redirect('/categoria_banner/listar_cadastros'); |
|
| 62 | + return $this->redirect('/categoria_banner/listar_cadastros'); |
|
| 63 | 63 | } |
| 64 | 64 | } |
| 65 | 65 | |
@@ -31,10 +31,10 @@ discard block |
||
| 31 | 31 | |
| 32 | 32 | if ($this->Categoria->save($dados)) { |
| 33 | 33 | $this->Session->setFlash('Categoria criada com Sucesso!','default','good'); |
| 34 | - return $this->redirect('/categoria/listar_cadastros'); |
|
| 34 | + return $this->redirect('/categoria/listar_cadastros'); |
|
| 35 | 35 | } else { |
| 36 | 36 | $this->Session->setFlash('Erro ao criar a categoria!','default','good'); |
| 37 | - return $this->redirect('/categoria/listar_cadastros'); |
|
| 37 | + return $this->redirect('/categoria/listar_cadastros'); |
|
| 38 | 38 | } |
| 39 | 39 | } |
| 40 | 40 | |
@@ -61,10 +61,10 @@ discard block |
||
| 61 | 61 | |
| 62 | 62 | if ($this->Categoria->save($dados)) { |
| 63 | 63 | $this->Session->setFlash('Categoria editada com Sucesso!','default','good'); |
| 64 | - return $this->redirect('/categoria/listar_cadastros'); |
|
| 64 | + return $this->redirect('/categoria/listar_cadastros'); |
|
| 65 | 65 | } else { |
| 66 | 66 | $this->Session->setFlash('Erro ao editar a categoria!','default','good'); |
| 67 | - return $this->redirect('/categoria/listar_cadastros'); |
|
| 67 | + return $this->redirect('/categoria/listar_cadastros'); |
|
| 68 | 68 | } |
| 69 | 69 | } |
| 70 | 70 | |
@@ -2,6 +2,6 @@ |
||
| 2 | 2 | |
| 3 | 3 | class AuthComponent extends Component{ |
| 4 | 4 | function doComplexOperation($amount1, $amount2) { |
| 5 | - return $amount1 + $amount2; |
|
| 6 | - } |
|
| 5 | + return $amount1 + $amount2; |
|
| 6 | + } |
|
| 7 | 7 | } |
| 8 | 8 | \ No newline at end of file |
@@ -31,10 +31,10 @@ discard block |
||
| 31 | 31 | |
| 32 | 32 | if ($this->Cupom->save($dados)) { |
| 33 | 33 | $this->Session->setFlash('Cupom criado com sucesso!'); |
| 34 | - return $this->redirect('/cupom/listar_cadastros'); |
|
| 34 | + return $this->redirect('/cupom/listar_cadastros'); |
|
| 35 | 35 | } else { |
| 36 | 36 | $this->Session->setFlash('Ocorreu algum erro ao criar o cupom!'); |
| 37 | - return $this->redirect('/cupom/listar_cadastros'); |
|
| 37 | + return $this->redirect('/cupom/listar_cadastros'); |
|
| 38 | 38 | } |
| 39 | 39 | } |
| 40 | 40 | |
@@ -62,10 +62,10 @@ discard block |
||
| 62 | 62 | |
| 63 | 63 | if ($this->Cupom->save($dados)) { |
| 64 | 64 | $this->Session->setFlash('Cupom editado com sucesso!'); |
| 65 | - return $this->redirect('/cupom/listar_cadastros'); |
|
| 65 | + return $this->redirect('/cupom/listar_cadastros'); |
|
| 66 | 66 | } else { |
| 67 | 67 | $this->Session->setFlash('Ocorreu algum erro ao editar o cupom!'); |
| 68 | - return $this->redirect('/cupom/listar_cadastros'); |
|
| 68 | + return $this->redirect('/cupom/listar_cadastros'); |
|
| 69 | 69 | } |
| 70 | 70 | } |
| 71 | 71 | |
@@ -77,19 +77,19 @@ discard block |
||
| 77 | 77 | |
| 78 | 78 | if ($this->Cupom->save($dados)) { |
| 79 | 79 | $this->Session->setFlash('Cupom excluido com sucesso!'); |
| 80 | - return $this->redirect('/cupom/listar_cadastros'); |
|
| 80 | + return $this->redirect('/cupom/listar_cadastros'); |
|
| 81 | 81 | } else { |
| 82 | 82 | $this->Session->setFlash('Ocorreu algum erro ao excluir o cupom!'); |
| 83 | - return $this->redirect('/cupom/listar_cadastros'); |
|
| 83 | + return $this->redirect('/cupom/listar_cadastros'); |
|
| 84 | 84 | } |
| 85 | 85 | } |
| 86 | 86 | |
| 87 | 87 | |
| 88 | 88 | /** |
| 89 | - * @param nome cupom |
|
| 90 | - * @param usuario id |
|
| 91 | - * @return false ou o array com os dados do cupom |
|
| 92 | - **/ |
|
| 89 | + * @param nome cupom |
|
| 90 | + * @param usuario id |
|
| 91 | + * @return false ou o array com os dados do cupom |
|
| 92 | + **/ |
|
| 93 | 93 | public function procurar_cupom($nome_cupom, $usuario_id) |
| 94 | 94 | { |
| 95 | 95 | if (empty($nome_cupom) && !isset($nome_cupom)) |
@@ -116,9 +116,9 @@ discard block |
||
| 116 | 116 | } |
| 117 | 117 | |
| 118 | 118 | /** |
| 119 | - * @param valor original float |
|
| 120 | - * @return float com o valor final ja considerando o valor do cupom |
|
| 121 | - **/ |
|
| 119 | + * @param valor original float |
|
| 120 | + * @return float com o valor final ja considerando o valor do cupom |
|
| 121 | + **/ |
|
| 122 | 122 | public function calcular_desconto_cupom($valor_original, $valor_desconto_cupom, $tipo_cupom) |
| 123 | 123 | { |
| 124 | 124 | if (empty($valor_original) && !isset($valor_original)) |
@@ -140,10 +140,10 @@ discard block |
||
| 140 | 140 | } |
| 141 | 141 | |
| 142 | 142 | /** |
| 143 | - * @param $cupom String nome do cupom a ser utilizado |
|
| 144 | - * @param $valor float com o valor original da venda |
|
| 145 | - * @return $novo_valor float com o novo valor da venda |
|
| 146 | - **/ |
|
| 143 | + * @param $cupom String nome do cupom a ser utilizado |
|
| 144 | + * @param $valor float com o valor original da venda |
|
| 145 | + * @return $novo_valor float com o novo valor da venda |
|
| 146 | + **/ |
|
| 147 | 147 | public function utilizar_cupom($cupom, $valor_original, $usuario_id) |
| 148 | 148 | { |
| 149 | 149 | if (empty($cupom) && !isset($cupom)) |
@@ -5,46 +5,46 @@ |
||
| 5 | 5 | public function __construct(); |
| 6 | 6 | |
| 7 | 7 | /** |
| 8 | - * @return void |
|
| 9 | - * @param String $token |
|
| 10 | - **/ |
|
| 8 | + * @return void |
|
| 9 | + * @param String $token |
|
| 10 | + **/ |
|
| 11 | 11 | public function setToken($token); |
| 12 | 12 | |
| 13 | 13 | /** |
| 14 | - * @return void |
|
| 15 | - * @param String $email |
|
| 16 | - **/ |
|
| 14 | + * @return void |
|
| 15 | + * @param String $email |
|
| 16 | + **/ |
|
| 17 | 17 | public function setEmail($email); |
| 18 | 18 | |
| 19 | 19 | /** |
| 20 | - * @return String $token |
|
| 21 | - **/ |
|
| 20 | + * @return String $token |
|
| 21 | + **/ |
|
| 22 | 22 | public function getToken(); |
| 23 | 23 | |
| 24 | 24 | /** |
| 25 | - * @return String $email |
|
| 26 | - **/ |
|
| 25 | + * @return String $email |
|
| 26 | + **/ |
|
| 27 | 27 | public function getEmail(); |
| 28 | 28 | |
| 29 | 29 | /** |
| 30 | - * @return void |
|
| 31 | - * @param Array $produtos |
|
| 32 | - **/ |
|
| 30 | + * @return void |
|
| 31 | + * @param Array $produtos |
|
| 32 | + **/ |
|
| 33 | 33 | public function setProdutos($produtos); |
| 34 | 34 | |
| 35 | 35 | /** |
| 36 | - * @return Array $produto |
|
| 37 | - **/ |
|
| 36 | + * @return Array $produto |
|
| 37 | + **/ |
|
| 38 | 38 | public function getProdutos(); |
| 39 | 39 | |
| 40 | 40 | /** |
| 41 | - * @param Array Produtos a serem adicionados |
|
| 42 | - **/ |
|
| 41 | + * @param Array Produtos a serem adicionados |
|
| 42 | + **/ |
|
| 43 | 43 | public function adicionarProdutosGateway(); |
| 44 | 44 | |
| 45 | 45 | /** |
| 46 | - * @param Array Andress/Endeço do cliente |
|
| 47 | - **/ |
|
| 46 | + * @param Array Andress/Endeço do cliente |
|
| 47 | + **/ |
|
| 48 | 48 | public function setEnderecoClienteGateway(); |
| 49 | 49 | |
| 50 | 50 | public function setCliente($cliente); |
@@ -30,10 +30,10 @@ |
||
| 30 | 30 | |
| 31 | 31 | if ($this->Hieraquia->save($dados)) { |
| 32 | 32 | $this->Session->setFlash('Hieraquia salva com sucesso!'); |
| 33 | - return $this->redirect('/hieraquia/listar_cadastros'); |
|
| 33 | + return $this->redirect('/hieraquia/listar_cadastros'); |
|
| 34 | 34 | } else { |
| 35 | 35 | $this->Session->setFlash('Ocorreu um erro ao salva o produto!'); |
| 36 | - return $this->redirect('/hieraquia/listar_cadastros'); |
|
| 36 | + return $this->redirect('/hieraquia/listar_cadastros'); |
|
| 37 | 37 | } |
| 38 | 38 | } |
| 39 | 39 | |
@@ -26,10 +26,10 @@ |
||
| 26 | 26 | |
| 27 | 27 | if ($this->Newsletter->save($dados)) { |
| 28 | 28 | $this->Session->setFlash('Cadastro de newsletter excluido com sucesso!'); |
| 29 | - return $this->redirect('/newsletter/listar_cadastros'); |
|
| 29 | + return $this->redirect('/newsletter/listar_cadastros'); |
|
| 30 | 30 | } else { |
| 31 | 31 | $this->Session->setFlash('Ocorreu algum erro ao excluir o cadastro de newsletter!'); |
| 32 | - return $this->redirect('/newsletter/listar_cadastros'); |
|
| 32 | + return $this->redirect('/newsletter/listar_cadastros'); |
|
| 33 | 33 | } |
| 34 | 34 | } |
| 35 | 35 | |
@@ -18,7 +18,7 @@ discard block |
||
| 18 | 18 | |
| 19 | 19 | if ($_FILES['nota']['type'] != "text/xml") { |
| 20 | 20 | $this->Session->setFlash('O arquivo deve ser do tipo xml! ', 'default'); |
| 21 | - return $this->redirect('/nfe/gerar_danfe'); |
|
| 21 | + return $this->redirect('/nfe/gerar_danfe'); |
|
| 22 | 22 | } |
| 23 | 23 | |
| 24 | 24 | $arq = $_FILES["nota"]["tmp_name"]; |
@@ -52,13 +52,13 @@ discard block |
||
| 52 | 52 | debug($nfe->autoriza($sNFe, $lote, $aResp)); |
| 53 | 53 | //enviar o lote |
| 54 | 54 | if ($resp = $nfe->autoriza($sNFe, $lote, $aResp)) { |
| 55 | - if ($aResp['bStat']) { |
|
| 56 | - echo "Numero do Recibo : " . $aResp['nRec'] .", use este numero para obter o protocolo ou informações de erro no xml com testaRecibo.php."; |
|
| 57 | - } else { |
|
| 58 | - echo "Houve erro !! $nfe->errMsg"; |
|
| 59 | - } |
|
| 55 | + if ($aResp['bStat']) { |
|
| 56 | + echo "Numero do Recibo : " . $aResp['nRec'] .", use este numero para obter o protocolo ou informações de erro no xml com testaRecibo.php."; |
|
| 57 | + } else { |
|
| 58 | + echo "Houve erro !! $nfe->errMsg"; |
|
| 59 | + } |
|
| 60 | 60 | } else { |
| 61 | - echo "houve erro !! $nfe->errMsg"; |
|
| 61 | + echo "houve erro !! $nfe->errMsg"; |
|
| 62 | 62 | } |
| 63 | 63 | debug($nfe); |
| 64 | 64 | echo '<BR><BR><h1>DEBUG DA COMUNICAÇÕO SOAP</h1><BR><BR>'; |
@@ -13,51 +13,51 @@ |
||
| 13 | 13 | } |
| 14 | 14 | |
| 15 | 15 | /** |
| 16 | - * @return void |
|
| 17 | - * @param String $token |
|
| 18 | - **/ |
|
| 16 | + * @return void |
|
| 17 | + * @param String $token |
|
| 18 | + **/ |
|
| 19 | 19 | public function setToken($token) |
| 20 | 20 | { |
| 21 | 21 | $this->gateway->setToken($token); |
| 22 | 22 | } |
| 23 | 23 | |
| 24 | 24 | /** |
| 25 | - * @return void |
|
| 26 | - * @param String $email |
|
| 27 | - **/ |
|
| 25 | + * @return void |
|
| 26 | + * @param String $email |
|
| 27 | + **/ |
|
| 28 | 28 | public function setEmail($email) |
| 29 | 29 | { |
| 30 | 30 | $this->gateway->setEmail($email); |
| 31 | 31 | } |
| 32 | 32 | |
| 33 | 33 | /** |
| 34 | - * @return String $token |
|
| 35 | - **/ |
|
| 34 | + * @return String $token |
|
| 35 | + **/ |
|
| 36 | 36 | public function getToken() |
| 37 | 37 | { |
| 38 | 38 | return $this->gateway->getToken(); |
| 39 | 39 | } |
| 40 | 40 | |
| 41 | 41 | /** |
| 42 | - * @return String $email |
|
| 43 | - **/ |
|
| 42 | + * @return String $email |
|
| 43 | + **/ |
|
| 44 | 44 | public function getEmail() |
| 45 | 45 | { |
| 46 | 46 | return $this->gateway->getEmail(); |
| 47 | 47 | } |
| 48 | 48 | |
| 49 | 49 | /** |
| 50 | - * @return void |
|
| 51 | - * @param Array $produtos |
|
| 52 | - **/ |
|
| 50 | + * @return void |
|
| 51 | + * @param Array $produtos |
|
| 52 | + **/ |
|
| 53 | 53 | public function setProdutos($produto) |
| 54 | 54 | { |
| 55 | 55 | $this->gateway->setProdutos($produto); |
| 56 | 56 | } |
| 57 | 57 | |
| 58 | 58 | /** |
| 59 | - * @return Array $produto |
|
| 60 | - **/ |
|
| 59 | + * @return Array $produto |
|
| 60 | + **/ |
|
| 61 | 61 | public function getProdutos() |
| 62 | 62 | { |
| 63 | 63 | return $this->gateway->getProdutos(); |