Skip to content

Commit

Permalink
feature/release (#1948)
Browse files Browse the repository at this point in the history
* Corrigido versão inicial de migrations

* feat: release

* Apply php-cs-fixer changes

Co-authored-by: Pr3d4dor <Pr3d4dor@users.noreply.github.com>
  • Loading branch information
Pr3d4dor and Pr3d4dor authored Oct 28, 2022
1 parent fe58043 commit d66d8bd
Show file tree
Hide file tree
Showing 86 changed files with 856 additions and 882 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,16 @@ 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.38.1] - 2022-10-28
### Fixed

- Correções em editarVenda.php corrigido erro para permitir adicionar desconto em venda com valor superior a mil reais, erro de mascará, consequentemente foi atualizado imprimirVenda.php e imprimirVendaTermica.php para tratar o mesmo problema. [@Rodrigo-Paz](https://github.com/Rodrigo-Paz)
- Correções no relatorioFinanceiro.php valor total que não estava informado assim como o valor total do relatorio visto que nao puxava vendas sem desconto, foi corrigido e adicionado simbolo de % no lugar de R$ para o campo desconto. [@Rodrigo-Paz](https://github.com/Rodrigo-Paz)

### Fixed

- Correções gerais de bugs. [@Wilmerson](https://github.com/willph)

## [4.38.0] - 2022-04-29

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

![MapOS](https://raw.githubusercontent.com/RamonSilva20/mapos/master/assets/img/logo.png)

![version](https://img.shields.io/badge/version-4.38.0-blue.svg?longCache=true&style=flat-square)
![version](https://img.shields.io/badge/version-4.38.1-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)
Expand Down
2 changes: 1 addition & 1 deletion application/config/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
/**
* App current version
*/
$config['app_version'] = '4.38.0';
$config['app_version'] = '4.38.1';

/**
* Nome do sistema
Expand Down
1 change: 0 additions & 1 deletion application/controllers/Arquivos.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

class Arquivos extends MY_Controller
{

/**
* author: Ramon Silva
* email: silva018-mg@yahoo.com.br
Expand Down
1 change: 0 additions & 1 deletion application/controllers/Clientes.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

class Clientes extends MY_Controller
{

/**
* author: Ramon Silva
* email: silva018-mg@yahoo.com.br
Expand Down
1 change: 0 additions & 1 deletion application/controllers/Cobrancas.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

class Cobrancas extends MY_Controller
{

/**
* author: Ramon Silva
* email: silva018-mg@yahoo.com.br
Expand Down
37 changes: 16 additions & 21 deletions application/controllers/Financeiro.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

class Financeiro extends MY_Controller
{

/**
* author: Ramon Silva
* email: silva018-mg@yahoo.com.br
Expand Down Expand Up @@ -145,11 +144,11 @@ public function adicionarReceita()
}

$desconto = $valor_desconto;
//cria variavel para pegar o valor total ja sem o desconto e soma com o desconto
//cria variavel para pegar o valor total ja sem o desconto e soma com o desconto
$total_sem_desconto = $valor + $valor_desconto ;
$valor = $total_sem_desconto;
//cria variavel para pegar o valor total ja com o desconto e diminui com o desconto
$total_com_desconto = $valor - $valor_desconto;
$total_com_desconto = $valor - $valor_desconto;
$valor_desconto = $total_com_desconto;

if (!validate_money($valor_desconto)) {
Expand Down Expand Up @@ -196,19 +195,16 @@ public function adicionarReceita()
redirect($urlAtual);
}

function adicionarReceita_parc()
public function adicionarReceita_parc()
{


//$this->load->library('form_validation');
//$this->data['custom_error'] = '';
$urlAtual = $this->input->post('urlAtual');
if (!$this->permission->checkPermission($this->session->userdata('permissao'), 'aLancamento')) {
$this->session->set_flashdata('error', 'Você não tem permissão para adicionar lançamentos.');
redirect(base_url());
} else {

//Se o valor_desconto for vázio, seta a variavel com valor 0, se não for vazio recebe o valor de desconto
//Se o valor_desconto for vázio, seta a variavel com valor 0, se não for vazio recebe o valor de desconto
if (empty($this->input->post('desconto_parc'))) {
$valor_desconto = "0";
} else {
Expand All @@ -232,7 +228,7 @@ function adicionarReceita_parc()


//cria variavel para pegar o valor total ja com o desconto e diminui com o desconto
$total_com_desconto = $valorparcelas + $desconto_por_parcela;
$total_com_desconto = $valorparcelas + $desconto_por_parcela;



Expand All @@ -259,13 +255,12 @@ function adicionarReceita_parc()
$comissao = $this->input->post('comissao');

if (!validate_money($comissao)) {
$comissao = str_replace(array(',', '.'), array('', ''), $comissao);
$comissao = str_replace([',', '.'], ['', ''], $comissao);
}

if ($entrada == 0) {
$loops = 1;
while ($loops <= $qtdparcelas_parc) {

$myDateTimeISO = $dia_base_pgto;
$loopsmes = $loops - 1;
$addThese = $loopsmes;
Expand All @@ -276,10 +271,10 @@ function adicionarReceita_parc()
//Descobre se o dia do mês caiu
$myNewDayOfMonth = date_format($myDateTime, 'j');
if ($myDayOfMonth > 28 && $myNewDayOfMonth < 4) {
//Em caso afirmativo, corrija voltando o número de dias que transbordaram
//Em caso afirmativo, corrija voltando o número de dias que transbordaram
date_modify($myDateTime, "-$myNewDayOfMonth days");
}
$data = array(
$data = [
'descricao' => $this->input->post('descricao_parc') . ' - Parcelamento de R$' . $descricao_parc_valor .' [' . $loops . '/' . $qtdparcelas_parc . ']',
'valor' => $total_com_desconto,
'desconto' => $desconto_por_parcela,
Expand All @@ -293,10 +288,10 @@ function adicionarReceita_parc()
'tipo' => $this->input->post('tipo_parc'),
'usuarios_id' => $this->session->userdata('id'),

);
];


if ($this->financeiro_model->add('lancamentos', $data) == TRUE) {
if ($this->financeiro_model->add('lancamentos', $data) == true) {
$this->session->set_flashdata('success', 'Lançamento adicionado com sucesso!');
log_info('Adicionou um lançamento em Financeiro');
} else {
Expand All @@ -308,7 +303,7 @@ function adicionarReceita_parc()
redirect($urlAtual);
} else {
$desconto_entrada = "0";
$data1 = array(
$data1 = [
'descricao' => $this->input->post('descricao_parc') . ' - Entrada do parc. de R$' . $descricao_parc_valor .' ',
'valor' => $entrada,
'desconto' => $desconto_entrada,
Expand All @@ -324,7 +319,7 @@ function adicionarReceita_parc()



);
];
// if (empty($data['valor_desconto'])) {
// $data['valor_desconto'] = "0";
// }
Expand All @@ -347,7 +342,7 @@ function adicionarReceita_parc()
date_modify($myDateTime, "-$myNewDayOfMonth days");
}

$data = array(
$data = [
'descricao' => $this->input->post('descricao_parc') . ' - Parcelamento de R$' . $descricao_parc_valor .' [' . $loops . '/' . $qtdparcelas_parc . ']',
'valor' => $total_com_desconto,
'desconto' => $desconto_por_parcela,
Expand All @@ -361,13 +356,13 @@ function adicionarReceita_parc()
'tipo' => $this->input->post('tipo_parc'),
'usuarios_id' => $this->session->userdata('id'),

);
];

// if (empty($data['valor_desconto'])) {
// $data['valor_desconto'] = "0";
// }

if ($this->financeiro_model->add('lancamentos', $data) == TRUE) {
if ($this->financeiro_model->add('lancamentos', $data) == true) {
$this->session->set_flashdata('success', 'Lançamento adicionado com sucesso!');
log_info('Adicionou um lançamento em Financeiro');
} else {
Expand Down Expand Up @@ -491,7 +486,7 @@ public function editar()


$valor = $this->input->post('valor');
//Se o valor_desconto for vázio, seta a variavel com valor 0, se não for vazio recebe o valor de desconto
//Se o valor_desconto for vázio, seta a variavel com valor 0, se não for vazio recebe o valor de desconto
if (empty($this->input->post('valor_desconto_editar'))) {
$valor_desconto = "0";
} else {
Expand Down
1 change: 0 additions & 1 deletion application/controllers/Garantias.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

class Garantias extends MY_Controller
{

/**
* author: Wilmerson Felipe
* email: will.phelipe@gmail.com
Expand Down
1 change: 0 additions & 1 deletion application/controllers/Mapos.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
}
class Mapos extends MY_Controller
{

/**
* author: Ramon Silva
* email: silva018-mg@yahoo.com.br
Expand Down
1 change: 0 additions & 1 deletion application/controllers/Mine.php
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,6 @@ public function imprimirCompra($id = null)
public function minha_ordem_de_servico($y = null, $when = null)
{
if (($y != null) && (is_numeric($y))) {

// Do not forget this number -> 44023
// function sending => y = (7653 * ID) + 44023
// function recieving => x = (y - 44023) / 7653
Expand Down
1 change: 0 additions & 1 deletion application/controllers/Os.php
Original file line number Diff line number Diff line change
Expand Up @@ -788,7 +788,6 @@ public function anexar()
$upload_data = $this->upload->data();

if ($upload_data['is_image'] == 1) {

// set the resize config
$resize_conf = [

Expand Down
1 change: 0 additions & 1 deletion application/controllers/Permissoes.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

class Permissoes extends MY_Controller
{

/**
* author: Ramon Silva
* email: silva018-mg@yahoo.com.br
Expand Down
1 change: 0 additions & 1 deletion application/controllers/Produtos.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

class Produtos extends MY_Controller
{

/**
* author: Ramon Silva
* email: silva018-mg@yahoo.com.br
Expand Down
1 change: 0 additions & 1 deletion application/controllers/Relatorios.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

class Relatorios extends MY_Controller
{

/**
* author: Ramon Silva
* email: silva018-mg@yahoo.com.br
Expand Down
1 change: 0 additions & 1 deletion application/controllers/Servicos.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

class Servicos extends MY_Controller
{

/**
* author: Ramon Silva
* email: silva018-mg@yahoo.com.br
Expand Down
1 change: 0 additions & 1 deletion application/controllers/Usuarios.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

class Usuarios extends MY_Controller
{

/**
* author: Ramon Silva
* email: silva018-mg@yahoo.com.br
Expand Down
1 change: 0 additions & 1 deletion application/controllers/Vendas.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

class Vendas extends MY_Controller
{

/**
* author: Ramon Silva
* email: silva018-mg@yahoo.com.br
Expand Down
5 changes: 2 additions & 3 deletions application/libraries/Sqltoci.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,6 @@ public function generate($tables = null)

## if write file, check if we can
if ($this->write_file) {

/* make subdir */
$path = $this->path . '/' . $this->file_name;

Expand Down Expand Up @@ -235,8 +234,8 @@ public function generate($tables = null)
if ($column_default == 'CURRENT_TIMESTAMP') {
$up .= PHP_EOL."\t\t\t"."'`$column[Field]` $column[Type] " . ($column['Null'] == 'NO' ? 'NOT NULL' : 'NULL') .
(
# if its timestamp column, don't '' around default value .... crap way, but should work for now
$column['Default'] ? ' DEFAULT ' . ($column['Type'] == 'timestamp' ? $column['Default'] : '' . $column['Default'] . '') : ''
# if its timestamp column, don't '' around default value .... crap way, but should work for now
$column['Default'] ? ' DEFAULT ' . ($column['Type'] == 'timestamp' ? $column['Default'] : '' . $column['Default'] . '') : ''
)
. " $column[Extra]',";
} else {
Expand Down
1 change: 0 additions & 1 deletion application/models/Arquivos_model.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

class Arquivos_model extends CI_Model
{

/**
* author: Ramon Silva
* email: silva018-mg@yahoo.com.br
Expand Down
1 change: 0 additions & 1 deletion application/models/Clientes_model.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?php
class Clientes_model extends CI_Model
{

/**
* author: Ramon Silva
* email: silva018-mg@yahoo.com.br
Expand Down
1 change: 0 additions & 1 deletion application/models/Cobrancas_model.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

class Cobrancas_model extends CI_Model
{

/**
* author: Ramon Silva
* email: silva018-mg@yahoo.com.br
Expand Down
1 change: 0 additions & 1 deletion application/models/Conecte_model.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

class Conecte_model extends CI_Model
{

/**
* author: Ramon Silva
* email: silva018-mg@yahoo.com.br
Expand Down
1 change: 0 additions & 1 deletion application/models/Email_model.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?php
class Email_model extends CI_Model
{

/**
* author: Ramon Silva
* email: silva018-mg@yahoo.com.br
Expand Down
19 changes: 9 additions & 10 deletions application/models/Financeiro_model.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

class Financeiro_model extends CI_Model
{

/**
* author: Ramon Silva
* email: silva018-mg@yahoo.com.br
Expand Down Expand Up @@ -61,7 +60,7 @@ public function getEstatisticasFinanceiro2()
SUM(CASE WHEN baixado = 0 AND tipo = 'receita' THEN valor_desconto END) as total_receita_pendente,
SUM(CASE WHEN baixado = 0 AND tipo = 'despesa' THEN valor_desconto END) as total_despesa_pendente FROM lancamentos";

return $this->db->query($sql)->row();
return $this->db->query($sql)->row();
}

public function getById($id)
Expand All @@ -81,14 +80,14 @@ public function add($table, $data)
return false;
}

function add1($table,$data1){
$this->db->insert($table, $data1);
if ($this->db->affected_rows() == '1')
{
return TRUE;
}
return FALSE;
public function add1($table, $data1)
{
$this->db->insert($table, $data1);
if ($this->db->affected_rows() == '1') {
return true;
}
return false;
}

public function edit($table, $data, $fieldID, $ID)
Expand Down
1 change: 0 additions & 1 deletion application/models/Garantias_model.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

class Garantias_model extends CI_Model
{

/**
* author: Wilmerson Felipe
* email: will.phelipe@gmail.com
Expand Down
1 change: 0 additions & 1 deletion application/models/Mapos_model.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?php
class Mapos_model extends CI_Model
{

/**
* author: Ramon Silva
* email: silva018-mg@yahoo.com.br
Expand Down
Loading

0 comments on commit d66d8bd

Please sign in to comment.