@@ -34,10 +34,10 @@ discard block |
||
| 34 | 34 | $this->EnderecoClienteCadastro->save($endereco); |
| 35 | 35 | |
| 36 | 36 | $this->Session->setFlash('Cliente salvo com sucesso!'); |
| 37 | - return $this->redirect('/cliente/listar_cadastros'); |
|
| 37 | + return $this->redirect('/cliente/listar_cadastros'); |
|
| 38 | 38 | } else { |
| 39 | 39 | $this->Session->setFlash('Ocorreu um erro ao salva o cliente!'); |
| 40 | - return $this->redirect('/cliente/listar_cadastros'); |
|
| 40 | + return $this->redirect('/cliente/listar_cadastros'); |
|
| 41 | 41 | } |
| 42 | 42 | } |
| 43 | 43 | |
@@ -89,16 +89,16 @@ discard block |
||
| 89 | 89 | |
| 90 | 90 | if ($this->Cliente->save($dados)) { |
| 91 | 91 | $this->Session->setFlash('Cliente editado com sucesso!'); |
| 92 | - return $this->redirect('/cliente/listar_cadastros'); |
|
| 92 | + return $this->redirect('/cliente/listar_cadastros'); |
|
| 93 | 93 | } else { |
| 94 | 94 | $this->Session->setFlash('Ocorreu um erro ao editar o cliente!'); |
| 95 | - return $this->redirect('/cliente/listar_cadastros'); |
|
| 95 | + return $this->redirect('/cliente/listar_cadastros'); |
|
| 96 | 96 | } |
| 97 | 97 | } |
| 98 | 98 | |
| 99 | 99 | function exportar_clientes() { |
| 100 | - $this->layout = 'ajax'; |
|
| 101 | - $this->set('event', $this->Cliente->find('all')); |
|
| 100 | + $this->layout = 'ajax'; |
|
| 101 | + $this->set('event', $this->Cliente->find('all')); |
|
| 102 | 102 | } |
| 103 | 103 | |
| 104 | 104 | function listar_pedidos($id) { |
@@ -11,17 +11,17 @@ discard block |
||
| 11 | 11 | |
| 12 | 12 | $query = array ( |
| 13 | 13 | 'joins' => array( |
| 14 | - array( |
|
| 15 | - 'table' => 'produtos', |
|
| 16 | - 'alias' => 'Produto', |
|
| 17 | - 'type' => 'LEFT', |
|
| 18 | - 'conditions' => array( |
|
| 19 | - 'AviseMe.produto_id = Produto.id', |
|
| 20 | - ), |
|
| 21 | - ) |
|
| 14 | + array( |
|
| 15 | + 'table' => 'produtos', |
|
| 16 | + 'alias' => 'Produto', |
|
| 17 | + 'type' => 'LEFT', |
|
| 18 | + 'conditions' => array( |
|
| 19 | + 'AviseMe.produto_id = Produto.id', |
|
| 20 | + ), |
|
| 21 | + ) |
|
| 22 | 22 | ), |
| 23 | - 'conditions' => array('AviseMe.ativo' => 1, 'AviseMe.usuario_id' => $this->instancia), |
|
| 24 | - 'fields' => array('Produto.nome, AviseMe.email, AviseMe.id, Produto.id'), |
|
| 23 | + 'conditions' => array('AviseMe.ativo' => 1, 'AviseMe.usuario_id' => $this->instancia), |
|
| 24 | + 'fields' => array('Produto.nome, AviseMe.email, AviseMe.id, Produto.id'), |
|
| 25 | 25 | ); |
| 26 | 26 | |
| 27 | 27 | $cadastros = $this->AviseMe->find('all', $query); |
@@ -48,9 +48,9 @@ discard block |
||
| 48 | 48 | } |
| 49 | 49 | |
| 50 | 50 | /** |
| 51 | - * @return boolean |
|
| 52 | - * Cadastra as informações |
|
| 53 | - **/ |
|
| 51 | + * @return boolean |
|
| 52 | + * Cadastra as informações |
|
| 53 | + **/ |
|
| 54 | 54 | public function cadastrar_avise_me() |
| 55 | 55 | { |
| 56 | 56 | try |
@@ -18,11 +18,11 @@ discard block |
||
| 18 | 18 | |
| 19 | 19 | public function cancelar($id_venda, $id_cliente) { |
| 20 | 20 | $response = $this->LancamentoVenda->find('first', array( |
| 21 | - 'conditions' => array( |
|
| 22 | - 'LancamentoVenda.venda_id' => $id_venda |
|
| 23 | - ) |
|
| 24 | - ) |
|
| 25 | - ); |
|
| 21 | + 'conditions' => array( |
|
| 22 | + 'LancamentoVenda.venda_id' => $id_venda |
|
| 23 | + ) |
|
| 24 | + ) |
|
| 25 | + ); |
|
| 26 | 26 | |
| 27 | 27 | $this->LancamentoVenda->id = $response['LancamentoVenda']['id']; |
| 28 | 28 | |
@@ -41,11 +41,11 @@ discard block |
||
| 41 | 41 | |
| 42 | 42 | public function aprovar($id_venda, $id_cliente) { |
| 43 | 43 | $response = $this->LancamentoVenda->find('first', array( |
| 44 | - 'conditions' => array( |
|
| 45 | - 'LancamentoVenda.venda_id' => $id_venda |
|
| 46 | - ) |
|
| 47 | - ) |
|
| 48 | - ); |
|
| 44 | + 'conditions' => array( |
|
| 45 | + 'LancamentoVenda.venda_id' => $id_venda |
|
| 46 | + ) |
|
| 47 | + ) |
|
| 48 | + ); |
|
| 49 | 49 | |
| 50 | 50 | $this->LancamentoVenda->id = $response['LancamentoVenda']['id']; |
| 51 | 51 | |
@@ -2,11 +2,11 @@ |
||
| 2 | 2 | |
| 3 | 3 | class LancamentoVenda extends AppModel { |
| 4 | 4 | |
| 5 | - public $hasOne = 'Venda'; |
|
| 6 | - public $hasMany = array( |
|
| 7 | - 'Venda' => array( |
|
| 8 | - 'className' => 'Venda' |
|
| 9 | - ) |
|
| 10 | - ); |
|
| 5 | + public $hasOne = 'Venda'; |
|
| 6 | + public $hasMany = array( |
|
| 7 | + 'Venda' => array( |
|
| 8 | + 'className' => 'Venda' |
|
| 9 | + ) |
|
| 10 | + ); |
|
| 11 | 11 | |
| 12 | 12 | } |
| 13 | 13 | \ No newline at end of file |