diff --git a/CHANGELOG.md b/CHANGELOG.md index f1baf5e94..b4e7e726e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,21 @@ Todas as alterações serão documentadas neste arquivo Formato baseado em [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), e [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [4.36.0] - 2022-02-20 + +### Added +- Adicionado novo layout referente a área do usuário e do cliente. Sendo o mesmo também responsivo. [@MilsonElias](https://github.com/MilsonElias) + +- Adicionado novo tema claro e tema escuro referente a área do usuário. [@MilsonElias](https://github.com/MilsonElias) + +- Adicionado nova logomarca. [@MilsonElias](https://github.com/MilsonElias) + +- Adicionado função em os.php para facilitar a visualização da OS em garantia, sem garantia e garantia vencida. [Luccas Woiciechoski] e [@Wilmerson](https://github.com/willph) + +- Adicionado função em painel.php mostrando receita dia e despesa dia. [@MilsonElias](https://github.com/MilsonElias) e [@Wilmerson](https://github.com/willph) + +- Adicionado função de adicionar e alterar imagem do usuário (foto do perfil). [@MilsonElias](https://github.com/MilsonElias) e [@Wilmerson](https://github.com/willph) + ## [4.35.2] - 2021-10-10 ### Fixed diff --git a/README.md b/README.md index f5c52a932..da5af825b 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ ![MapOS](https://raw.githubusercontent.com/RamonSilva20/mapos/master/assets/img/logo.png) -![version](https://img.shields.io/badge/version-4.35.2-blue.svg?longCache=true&style=flat-square) +![version](https://img.shields.io/badge/version-4.36.0-blue.svg?longCache=true&style=flat-square) ![license](https://img.shields.io/badge/license-MIT-green.svg?longCache=true&style=flat-square) ![theme](https://img.shields.io/badge/theme-Matrix--Admin-lightgrey.svg?longCache=true&style=flat-square) ![issues](https://img.shields.io/github/issues/RamonSilva20/mapos.svg?longCache=true&style=flat-square) @@ -108,7 +108,7 @@ Doações podem ser realizadas nos links: |:-:|:-:|:-:|:-:|:-:| | [
Daniel Bastos](https://github.com/daniellbastos) | [
drelldeveloper](https://github.com/drelldeveloper) | [
Samuel Fontebasso](https://github.com/fontebasso) | [
marllonferreira](https://github.com/marllonferreira) | [
Rodrigo Ribeiro](https://github.com/rodrigo3d) | [
Wilmerson](https://github.com/willph) | [
Thiago Rodrigues](https://github.com/bulfaitelo) | [
Marcos Pereira](https://github.com/mvnp)| [
Marcos](https://github.com/marcotuliomtb)| [
ZanzouShio](https://github.com/ZanzouShio) -| [
Djunio](https://github.com/seitbnao) +| [
Djunio](https://github.com/seitbnao) | [
Milson Elias](https://github.com/MilsonElias) | ## Autor diff --git a/application/config/config.php b/application/config/config.php index b0704c7b8..3c9285bfe 100644 --- a/application/config/config.php +++ b/application/config/config.php @@ -4,7 +4,7 @@ /** * App current version */ -$config['app_version'] = '4.35.2'; +$config['app_version'] = '4.36.0'; /** * Nome do sistema diff --git a/application/controllers/Cobrancas.php b/application/controllers/Cobrancas.php index d307a6a3b..03a23e0cc 100644 --- a/application/controllers/Cobrancas.php +++ b/application/controllers/Cobrancas.php @@ -17,7 +17,7 @@ public function __construct() $this->load->helper('form'); $this->load->model('cobrancas_model'); - $this->data['menuFinanceiro'] = 'cobrancas'; + $this->data['menuCobrancas'] = 'financeiro'; } public function index() diff --git a/application/controllers/Financeiro.php b/application/controllers/Financeiro.php index 5b1e08592..2891818b2 100644 --- a/application/controllers/Financeiro.php +++ b/application/controllers/Financeiro.php @@ -16,7 +16,7 @@ public function __construct() parent::__construct(); $this->load->model('financeiro_model'); $this->load->helper('codegen_helper'); - $this->data['menuFinanceiro'] = 'financeiro'; + $this->data['menuLancamentos'] = 'financeiro'; } public function index() diff --git a/application/controllers/Login.php b/application/controllers/Login.php index 679909f4e..eefab111a 100644 --- a/application/controllers/Login.php +++ b/application/controllers/Login.php @@ -48,7 +48,7 @@ public function verificarLogin() // Verificar credenciais do usuário if (password_verify($password, $user->senha)) { - $session_data = ['nome' => $user->nome, 'email' => $user->email, 'id' => $user->idUsuarios, 'permissao' => $user->permissoes_id, 'logado' => true]; + $session_data = ['nome' => $user->nome, 'email' => $user->email, 'url_image_user' => $user->url_image_user, 'id' => $user->idUsuarios, 'permissao' => $user->permissoes_id, 'logado' => true]; $this->session->set_userdata($session_data); log_info('Efetuou login no sistema'); $json = ['result' => true]; diff --git a/application/controllers/Mapos.php b/application/controllers/Mapos.php index 79dd9684a..8d6044e53 100644 --- a/application/controllers/Mapos.php +++ b/application/controllers/Mapos.php @@ -1,7 +1,6 @@ data['produtos'] = $this->mapos_model->getProdutosMinimo(); $this->data['os'] = $this->mapos_model->getOsEstatisticas(); $this->data['estatisticas_financeiro'] = $this->mapos_model->getEstatisticasFinanceiro(); + $this->data['financeiro_mes_dia'] = $this->mapos_model->getEstatisticasFinanceiroDia($this->input->get('year')); $this->data['financeiro_mes'] = $this->mapos_model->getEstatisticasFinanceiroMes($this->input->get('year')); $this->data['financeiro_mesinadipl'] = $this->mapos_model->getEstatisticasFinanceiroMesInadimplencia($this->input->get('year')); $this->data['menuPainel'] = 'Painel'; @@ -153,6 +153,41 @@ public function do_upload() } } + public function do_upload_user() + { + if (!$this->permission->checkPermission($this->session->userdata('permissao'), 'cEmitente')) { + $this->session->set_flashdata('error', 'Você não tem permissão para configurar emitente.'); + redirect(base_url()); + } + + $this->load->library('upload'); + + $image_upload_folder = FCPATH . 'assets/userImage/'; + + if (!file_exists($image_upload_folder)) { + mkdir($image_upload_folder, DIR_WRITE_MODE, true); + } + + $this->upload_config = [ + 'upload_path' => $image_upload_folder, + 'allowed_types' => 'png|jpg|jpeg|bmp', + 'max_size' => 2048, + 'remove_space' => true, + 'encrypt_name' => true, + ]; + + $this->upload->initialize($this->upload_config); + + if (!$this->upload->do_upload()) { + $upload_error = $this->upload->display_errors(); + print_r($upload_error); + exit(); + } else { + $file_info = [$this->upload->data()]; + return $file_info[0]['file_name']; + } + } + public function cadastrarEmitente() { if (!$this->permission->checkPermission($this->session->userdata('permissao'), 'cEmitente')) { @@ -278,6 +313,39 @@ public function editarLogo() redirect(site_url('mapos/emitente')); } + public function uploadUserImage() + { + if (!$this->permission->checkPermission($this->session->userdata('permissao'), 'cUsuario')) { + $this->session->set_flashdata('error', 'Você não tem permissão para mudar a foto.'); + redirect(base_url()); + } + + $id = $this->session->userdata('id'); + if ($id == null || !is_numeric($id)) { + $this->session->set_flashdata('error', 'Ocorreu um erro ao tentar alterar sua foto.'); + redirect(site_url('mapos/minhaConta')); + } + + $usuario = $this->mapos_model->getById($id); + + if (is_file(FCPATH . 'assets/userImage/' . $usuario->url_image_user)) { + unlink(FCPATH . 'assets/userImage/' . $usuario->url_image_user); + } + + $image = $this->do_upload_user(); + $imageUserPath = $image; + $retorno = $this->mapos_model->editImageUser($id, $imageUserPath); + + if ($retorno) { + $this->session->set_userdata('url_image_user', $imageUserPath); + $this->session->set_flashdata('success', 'Foto alterada com sucesso.'); + log_info('Alterou a Imagem do Usuario.'); + } else { + $this->session->set_flashdata('error', 'Ocorreu um erro ao tentar alterar sua foto.'); + } + redirect(site_url('mapos/minhaConta')); + } + public function emails() { if (!$this->permission->checkPermission($this->session->userdata('permissao'), 'cEmail')) { diff --git a/application/database/migrations/20220216173741_upload_image_user.php b/application/database/migrations/20220216173741_upload_image_user.php new file mode 100644 index 000000000..155b9d865 --- /dev/null +++ b/application/database/migrations/20220216173741_upload_image_user.php @@ -0,0 +1,20 @@ +db->query($sql); + } + + public function down() + { + $sql = " + ALTER TABLE usuarios DROP COLUMN url_image_user; + "; + $this->db->query($sql); + } +} diff --git a/application/models/Mapos_model.php b/application/models/Mapos_model.php index 6a8638689..64a28e307 100644 --- a/application/models/Mapos_model.php +++ b/application/models/Mapos_model.php @@ -234,6 +234,22 @@ public function getEstatisticasFinanceiroMes($year) return $this->db->query($sql, [intval($numbersOnly)])->row(); } + public function getEstatisticasFinanceiroDia($year) + { + $numbersOnly = preg_replace('/[^0-9]/', '', $year); + if (!$numbersOnly) { + $numbersOnly = date('Y'); + } + $sql = " + SELECT + SUM(CASE WHEN (EXTRACT(DAY FROM data_pagamento) = " . date('d') . ") AND baixado = 1 AND tipo = 'receita' THEN valor END) AS VALOR_" . date('m') . "_REC, + SUM(CASE WHEN (EXTRACT(DAY FROM data_pagamento) = " . date('d') . ") AND baixado = 1 AND tipo = 'despesa' THEN valor END) AS VALOR_" . date('m') . "_DES + FROM lancamentos + WHERE EXTRACT(YEAR FROM data_pagamento) = ? + "; + return $this->db->query($sql, [intval($numbersOnly)])->row(); + } + public function getEstatisticasFinanceiroMesInadimplencia($year) { $numbersOnly = preg_replace('/[^0-9]/', '', $year); @@ -321,6 +337,13 @@ public function editLogo($id, $logo) return $this->db->update('emitente'); } + public function editImageUser($id, $imageUserPath) + { + $this->db->set('url_image_user', $imageUserPath); + $this->db->where('idUsuarios', $id); + return $this->db->update('usuarios'); + } + public function check_credentials($email) { $this->db->where('email', $email); diff --git a/application/views/arquivos/adicionarArquivo.php b/application/views/arquivos/adicionarArquivo.php index c4f875fd8..f44b45073 100644 --- a/application/views/arquivos/adicionarArquivo.php +++ b/application/views/arquivos/adicionarArquivo.php @@ -4,7 +4,7 @@
-
+
@@ -18,7 +18,7 @@
- (txt|pdf|gif|png|jpg|jpeg) + (Arquivos suportados .txt .pdf .gif .png .jpg .jpeg)
@@ -45,9 +45,11 @@
-
- - Voltar +
+ + + Voltar
diff --git a/application/views/arquivos/arquivos.php b/application/views/arquivos/arquivos.php index 91e2fc252..616ef34e1 100644 --- a/application/views/arquivos/arquivos.php +++ b/application/views/arquivos/arquivos.php @@ -1,3 +1,4 @@ +
@@ -5,10 +6,8 @@
permission->checkPermission($this->session->userdata('permissao'), 'aArquivo')) : ?> @@ -20,14 +19,14 @@
- +
-
+
@@ -52,7 +51,7 @@ if (!$results) { echo ' - Nenhum Arquivo Encontrado + Nenhum Arquivo Encontrado '; } foreach ($results as $r) : ?> @@ -71,20 +70,15 @@ tamanho ?> KB tipo ?> permission->checkPermission($this->session->userdata('permissao'), 'vArquivo')) : ?> - - - + permission->checkPermission($this->session->userdata('permissao'), 'eArquivo')) : ?> - - - + permission->checkPermission($this->session->userdata('permissao'), 'dArquivo')) : ?> - - + @@ -108,9 +102,10 @@
Deseja realmente excluir este arquivo?
- @@ -126,3 +121,5 @@ }); }); + +
diff --git a/application/views/arquivos/editarArquivo.php b/application/views/arquivos/editarArquivo.php index 09c10def7..990ab7aa0 100644 --- a/application/views/arquivos/editarArquivo.php +++ b/application/views/arquivos/editarArquivo.php @@ -40,9 +40,9 @@
-
- - Voltar +
+ + Voltar
diff --git a/application/views/auditoria/logs.php b/application/views/auditoria/logs.php index 32ef7503d..d2c38e7a6 100644 --- a/application/views/auditoria/logs.php +++ b/application/views/auditoria/logs.php @@ -1,7 +1,9 @@ - Remover Logs - 30 dias ou mais +
+ + Remover Logs - 30 dias ou mais
-
+
@@ -10,7 +12,7 @@
- + @@ -55,3 +57,4 @@ + diff --git a/application/views/clientes/adicionarCliente.php b/application/views/clientes/adicionarCliente.php index 87bfa90da..9a6f439d5 100644 --- a/application/views/clientes/adicionarCliente.php +++ b/application/views/clientes/adicionarCliente.php @@ -30,15 +30,12 @@
-
+
Cadastro de Cliente
-
- Voltar -
+
-
- +
+ + Voltar
@@ -157,15 +155,15 @@ class="required">*
-
-
- +
+
diff --git a/application/views/clientes/clientes.php b/application/views/clientes/clientes.php index e543b08be..dcf881402 100644 --- a/application/views/clientes/clientes.php +++ b/application/views/clientes/clientes.php @@ -1,80 +1,86 @@ -permission->checkPermission($this->session->userdata('permissao'), 'aCliente')) { ?> - Adicionar Cliente / Fornecedor - +
+ permission->checkPermission($this->session->userdata('permissao'), 'aCliente')) { ?> + + + Cliente / Fornecedor + + + -
-
- - - -
Clientes
-
+
+
+ + + +
Clientes
+
-
-
Usuário Data Hora
- - - - - - - - - - - - +
Cod.NomeCPF/CNPJTelefoneEmailAções
+ + + + + + + + + + + + + if (!$results) { + echo ''; - } - foreach ($results as $r) { - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; - } ?> + } + foreach ($results as $r) { + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + } ?> - -
Cod.NomeCPF/CNPJTelefoneEmailAções
Nenhum Cliente Cadastrado
' . $r->idClientes . '' .$r->nomeCliente. '' . $r->documento . '' . $r->telefone . '' . $r->email . ''; - if ($this->permission->checkPermission($this->session->userdata('permissao'), 'vCliente')) { - echo ''; - echo ''; - } - if ($this->permission->checkPermission($this->session->userdata('permissao'), 'eCliente')) { - echo ''; - } - if ($this->permission->checkPermission($this->session->userdata('permissao'), 'dCliente')) { - echo ''; - } - echo '
' . $r->idClientes . '' . $r->nomeCliente . '' . $r->documento . '' . $r->telefone . '' . $r->email . ''; + if ($this->permission->checkPermission($this->session->userdata('permissao'), 'vCliente')) { + echo ''; + echo ''; + } + if ($this->permission->checkPermission($this->session->userdata('permissao'), 'eCliente')) { + echo ''; + } + if ($this->permission->checkPermission($this->session->userdata('permissao'), 'dCliente')) { + echo ''; + } + echo '
+ + +
-
-pagination->create_links(); ?> + pagination->create_links(); ?> - - diff --git a/application/views/clientes/visualizar.php b/application/views/clientes/visualizar.php index 58b70d082..ac40dc131 100644 --- a/application/views/clientes/visualizar.php +++ b/application/views/clientes/visualizar.php @@ -1,14 +1,9 @@
-
+
@@ -18,14 +13,14 @@
- +
@@ -60,14 +55,14 @@
-
Nome
+
@@ -102,17 +97,17 @@
-
Contato:
+
- + @@ -219,4 +214,12 @@ } ?> + diff --git a/application/views/cobrancas/cobrancas.php b/application/views/cobrancas/cobrancas.php index 808a17b49..5c77daf2f 100644 --- a/application/views/cobrancas/cobrancas.php +++ b/application/views/cobrancas/cobrancas.php @@ -1,29 +1,30 @@ -
-
- - - -
Cobranças
-
-
-
RuaRua rua ?>
- - - - - - - - - - - - - - +
+
+ + + +
Cobranças
+
+
+
#GatewayTipoData de VencimentoReferênciaStatusValorAções
+ + + + + + + + + + + + + + - + '; } foreach ($results as $r) { @@ -51,94 +52,94 @@ echo ''; echo ''; echo ''; } ?> - -
#GatewayTipoData de VencimentoReferênciaStatusValorAções
Nenhuma cobrança CadastradaNenhuma cobrança Cadastrada
R$ ' . number_format($r->total / 100, 2, ',', '.') . ''; if ($this->permission->checkPermission($this->session->userdata('permissao'), 'vCobranca')) { - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; } if ($this->permission->checkPermission($this->session->userdata('permissao'), 'eCobranca') && $r->barcode != '') { - echo ''; + echo ''; } if ($this->permission->checkPermission($this->session->userdata('permissao'), 'dCobranca')) { - echo ''; + echo ''; } echo '
+ + +
-
-pagination->create_links(); ?> + pagination->create_links(); ?> - - + + - + - + + \ No newline at end of file diff --git a/application/views/cobrancas/visualizarCobranca.php b/application/views/cobrancas/visualizarCobranca.php index 0352bc4fa..ef6b24c8a 100644 --- a/application/views/cobrancas/visualizarCobranca.php +++ b/application/views/cobrancas/visualizarCobranca.php @@ -1,9 +1,8 @@
-
+ diff --git a/application/views/conecte/adicionarOs.php b/application/views/conecte/adicionarOs.php index 3536df15c..f53674ea5 100644 --- a/application/views/conecte/adicionarOs.php +++ b/application/views/conecte/adicionarOs.php @@ -20,7 +20,7 @@
-
+
@@ -72,9 +72,11 @@
-
- - Voltar +
+ + + Voltar
diff --git a/application/views/conecte/cobrancas.php b/application/views/conecte/cobrancas.php index fd9a8917c..341bb48bc 100644 --- a/application/views/conecte/cobrancas.php +++ b/application/views/conecte/cobrancas.php @@ -1,5 +1,5 @@ -
-
+
+
@@ -8,7 +8,7 @@
- + @@ -52,8 +52,8 @@ } if ($this->permission->checkPermission($this->session->userdata('permissao'), 'eCobranca')) { - echo ''; - echo ''; + echo ''; + echo ''; } echo ''; echo ''; diff --git a/application/views/conecte/compras.php b/application/views/conecte/compras.php index 15da342b4..e974ead21 100644 --- a/application/views/conecte/compras.php +++ b/application/views/conecte/compras.php @@ -2,7 +2,7 @@ if (!$results) { ?>
-
+
@@ -72,8 +72,8 @@ echo '
'; echo ''; - echo ''; echo ''; diff --git a/application/views/conecte/conta.php b/application/views/conecte/conta.php index 1c524f985..61738043a 100644 --- a/application/views/conecte/conta.php +++ b/application/views/conecte/conta.php @@ -3,8 +3,9 @@ @@ -16,8 +17,8 @@ @@ -52,8 +53,8 @@ @@ -88,8 +89,8 @@ diff --git a/application/views/conecte/editar_dados.php b/application/views/conecte/editar_dados.php index 599377e84..e6f17e690 100644 --- a/application/views/conecte/editar_dados.php +++ b/application/views/conecte/editar_dados.php @@ -102,9 +102,11 @@
-
- - Voltar +
+ + + Voltar
diff --git a/application/views/conecte/login.php b/application/views/conecte/login.php index 5e6c44d12..6a2d59aef 100644 --- a/application/views/conecte/login.php +++ b/application/views/conecte/login.php @@ -16,6 +16,7 @@ + @@ -34,11 +34,15 @@ function formatar(mascara, documento) { $parse_email = $this->input->get('e'); $parse_cpfcnpj = $this->input->get('c'); ?> - -
-
+
# Data de Vencimento Referência
' . $r->nome . '' . $faturado . ' - + echo ' +
- + @@ -65,7 +66,7 @@
# Responsável Data Inicial
- + @@ -101,9 +102,9 @@ echo ''; - echo ''; echo ''; } ?> diff --git a/application/views/conecte/painel.php b/application/views/conecte/painel.php index 948f687c4..d4c11df9a 100644 --- a/application/views/conecte/painel.php +++ b/application/views/conecte/painel.php @@ -1,22 +1,26 @@ + + -
-
+
+
Últimas Ordens de Serviço
@@ -55,7 +59,8 @@
-
+
+
Últimas Compras
@@ -95,5 +100,4 @@
# Responsável Data Inicial' . $status . ' - - + echo ' + +
-
diff --git a/application/views/conecte/template.php b/application/views/conecte/template.php index 696f47629..e7106e1b2 100644 --- a/application/views/conecte/template.php +++ b/application/views/conecte/template.php @@ -3,104 +3,123 @@ Área do Cliente - <?php echo $this->config->item('app_name') ?> - - + + - - - - - - - + + + + + + + + - - - - - - - - + -
- session->flashdata('success')): ?> - session->flashdata('error')): ?> - load->view($output); -} ?> +
+
+ +
+
+
+ +
+ session->flashdata('success')) : ?> + session->flashdata('error')) : ?> + load->view($output); + } ?> + +
-
+
-
- -
- - - - - + - diff --git a/application/views/conecte/visualizar_compra.php b/application/views/conecte/visualizar_compra.php index f8032fb3d..f3b74d3ab 100644 --- a/application/views/conecte/visualizar_compra.php +++ b/application/views/conecte/visualizar_compra.php @@ -2,7 +2,7 @@
-
+
diff --git a/application/views/conecte/visualizar_os.php b/application/views/conecte/visualizar_os.php index 9ca9bd087..7a8963220 100644 --- a/application/views/conecte/visualizar_os.php +++ b/application/views/conecte/visualizar_os.php @@ -3,7 +3,7 @@
-
+
diff --git a/application/views/emails/emails.php b/application/views/emails/emails.php index 91a0b4e86..828bf0685 100644 --- a/application/views/emails/emails.php +++ b/application/views/emails/emails.php @@ -1,5 +1,5 @@
-
+
@@ -8,7 +8,7 @@
- + @@ -36,7 +36,7 @@ echo ''; echo ''; echo ''; echo ''; } ?> @@ -57,9 +57,9 @@
Deseja realmente excluir este email da lista de envio?
- diff --git a/application/views/financeiro/lancamentos.php b/application/views/financeiro/lancamentos.php index 20eef4903..ea9b94136 100644 --- a/application/views/financeiro/lancamentos.php +++ b/application/views/financeiro/lancamentos.php @@ -1,4 +1,4 @@ - + @@ -25,173 +25,170 @@ } +
-permission->checkPermission($this->session->userdata('permissao'), 'aLancamento')) { ?> - - - -
-
-
- - + permission->checkPermission($this->session->userdata('permissao'), 'aLancamento')) { ?> + + + +
+ +
+ + +
-
- - -
+
+ + +
-
- - -
+
+ + +
-
- - -
+
+ + +
-
- - -
+
+ + +
-
- - -
+
+ + +
-
-   - -
- -
+
+ +
+ +
-
-
-
- - - -
Lançamentos Financeiros
+
+
+
+ + + +
Lançamentos Financeiros
-
+
-
- - -
Código Para Status' . $status[$r->status] . '' . date('d/m/Y H:i:s', strtotime($r->date)) . ''; - echo ' '; + echo ' '; echo '
- - - - - - - - - - - - - - - - +
+ + +
#TipoCliente / FornecedorDescriçãoVencimentoStatusObservaçõesValorAções
Nenhum lançamento encontrado
+ + + + + + + + + + + + + + + + '; - } - foreach ($results as $r) { - $vencimento = date(('d/m/Y'), strtotime($r->data_vencimento)); - if ($r->baixado == 0) { - $status = 'Pendente'; - } else { - $status = 'Pago'; - }; - if ($r->tipo == 'receita') { - $label = 'success'; - } else { - $label = 'important'; - } - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; - } ?> - - - - - - - - - - - - - - - -
#TipoCliente / FornecedorDescriçãoVencimentoStatusObservaçõesValorAções
Nenhum lançamento encontrado
' . $r->idLancamentos . '' . ucfirst($r->tipo) . '' . $r->cliente_fornecedor . '' . $r->descricao . '' . $vencimento . '' . $status . '' . $r->observacoes . ' R$ ' . number_format($r->valor, 2, ',', '.') . ''; - if ($this->permission->checkPermission($this->session->userdata('permissao'), 'eLancamento')) { - echo ''; - } - if ($this->permission->checkPermission($this->session->userdata('permissao'), 'dLancamento')) { - echo ''; - } - - echo '
Total Receitas: - R$
Total Despesas: - R$
Saldo: - R$ -
+ } + foreach ($results as $r) { + $vencimento = date(('d/m/Y'), strtotime($r->data_vencimento)); + if ($r->baixado == 0) { + $status = 'Pendente'; + } else { + $status = 'Pago'; + }; + if ($r->tipo == 'receita') { + $label = 'success'; + } else { + $label = 'important'; + } + echo ''; + echo '' . $r->idLancamentos . ''; + echo '' . ucfirst($r->tipo) . ''; + echo '' . $r->cliente_fornecedor . ''; + echo '' . $r->descricao . ''; + echo '' . $vencimento . ''; + echo '' . $status . ''; + echo '' . $r->observacoes . ''; + echo ' R$ ' . number_format($r->valor, 2, ',', '.') . ''; + echo ''; + if ($this->permission->checkPermission($this->session->userdata('permissao'), 'eLancamento')) { + echo ''; + } + if ($this->permission->checkPermission($this->session->userdata('permissao'), 'dLancamento')) { + echo ''; + } + + echo ''; + echo ''; + } ?> + + + + Total Receitas: + + R$ + + + + Total Despesas: + + R$ + + + + Saldo: + + R$ + + + + +
+ pagination->create_links(); ?>
-pagination->create_links(); ?> - - -