From 1f4e14b2e973ee7de337fd4866d9a5ceff5cb6d1 Mon Sep 17 00:00:00 2001 From: Lucas Faria Mendes Date: Mon, 30 Mar 2026 10:38:18 -0300 Subject: chore: location --- .../Model.Domain.Financeiro/BancosContas.cs | 195 ++++++++++ .../Gestor.Model/Model.Domain.Financeiro/Centro.cs | 93 +++++ .../Model.Domain.Financeiro/ControleFinanceiro.cs | 143 +++++++ .../Model.Domain.Financeiro/ExtratoConta.cs | 97 +++++ .../Model.Domain.Financeiro/FiltroPersonalizado.cs | 54 +++ .../Model.Domain.Financeiro/Fornecedor.cs | 430 +++++++++++++++++++++ .../Model.Domain.Financeiro/Lancamento.cs | 285 ++++++++++++++ .../Gestor.Model/Model.Domain.Financeiro/Plano.cs | 68 ++++ .../Gestor.Model/Model.Domain.Financeiro/Planos.cs | 165 ++++++++ .../RelatorioLancamentos.cs | 132 +++++++ .../Relatorios/DadosFechamento.cs | 82 ++++ .../Relatorios/DadosFechamentoAnalitico.cs | 154 ++++++++ .../Relatorios/FechamentoFinanceiro.cs | 25 ++ .../Relatorios/FechamentoFinanceiroAnalitico.cs | 25 ++ .../Relatorios/FiltroFinanceiro.cs | 55 +++ .../Gestor.Model/Model.Domain.Financeiro/Saldo.cs | 89 +++++ .../Model.Domain.Financeiro/SinteticoFinanceiro.cs | 60 +++ .../Model.Domain.Financeiro/TipoConta.cs | 62 +++ .../Model.Domain.Financeiro/Transferencia.cs | 76 ++++ 19 files changed, 2290 insertions(+) create mode 100644 Codemerx/Gestor.Model/Model.Domain.Financeiro/BancosContas.cs create mode 100644 Codemerx/Gestor.Model/Model.Domain.Financeiro/Centro.cs create mode 100644 Codemerx/Gestor.Model/Model.Domain.Financeiro/ControleFinanceiro.cs create mode 100644 Codemerx/Gestor.Model/Model.Domain.Financeiro/ExtratoConta.cs create mode 100644 Codemerx/Gestor.Model/Model.Domain.Financeiro/FiltroPersonalizado.cs create mode 100644 Codemerx/Gestor.Model/Model.Domain.Financeiro/Fornecedor.cs create mode 100644 Codemerx/Gestor.Model/Model.Domain.Financeiro/Lancamento.cs create mode 100644 Codemerx/Gestor.Model/Model.Domain.Financeiro/Plano.cs create mode 100644 Codemerx/Gestor.Model/Model.Domain.Financeiro/Planos.cs create mode 100644 Codemerx/Gestor.Model/Model.Domain.Financeiro/RelatorioLancamentos.cs create mode 100644 Codemerx/Gestor.Model/Model.Domain.Financeiro/Relatorios/DadosFechamento.cs create mode 100644 Codemerx/Gestor.Model/Model.Domain.Financeiro/Relatorios/DadosFechamentoAnalitico.cs create mode 100644 Codemerx/Gestor.Model/Model.Domain.Financeiro/Relatorios/FechamentoFinanceiro.cs create mode 100644 Codemerx/Gestor.Model/Model.Domain.Financeiro/Relatorios/FechamentoFinanceiroAnalitico.cs create mode 100644 Codemerx/Gestor.Model/Model.Domain.Financeiro/Relatorios/FiltroFinanceiro.cs create mode 100644 Codemerx/Gestor.Model/Model.Domain.Financeiro/Saldo.cs create mode 100644 Codemerx/Gestor.Model/Model.Domain.Financeiro/SinteticoFinanceiro.cs create mode 100644 Codemerx/Gestor.Model/Model.Domain.Financeiro/TipoConta.cs create mode 100644 Codemerx/Gestor.Model/Model.Domain.Financeiro/Transferencia.cs (limited to 'Codemerx/Gestor.Model/Model.Domain.Financeiro') diff --git a/Codemerx/Gestor.Model/Model.Domain.Financeiro/BancosContas.cs b/Codemerx/Gestor.Model/Model.Domain.Financeiro/BancosContas.cs new file mode 100644 index 0000000..06eade3 --- /dev/null +++ b/Codemerx/Gestor.Model/Model.Domain.Financeiro/BancosContas.cs @@ -0,0 +1,195 @@ +using Gestor.Model.Attributes; +using Gestor.Model.Domain.Common; +using Gestor.Model.Domain.Generic; +using Gestor.Model.Domain.Seguros; +using Gestor.Model.Helper; +using Gestor.Model.Resources; +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.ComponentModel; +using System.Runtime.CompilerServices; + +namespace Gestor.Model.Domain.Financeiro +{ + public class BancosContas : DomainBase, IDomain + { + private string _descricao; + + private string _agencia; + + private string _conta; + + private string _observacao; + + [Description("AGÊNCIA")] + [Log(true)] + public string Agencia + { + get + { + string str = this._agencia; + if (str == null) + { + return null; + } + return str.ToUpper().Trim(); + } + set + { + this._agencia = value; + } + } + + [Log(true)] + public bool Ativo + { + get; + set; + } + + [Log(true)] + public Gestor.Model.Domain.Common.Banco Banco + { + get; + set; + } + + [Log(true)] + public string Conta + { + get + { + string str = this._conta; + if (str == null) + { + return null; + } + return str.ToUpper().Trim(); + } + set + { + this._conta = value; + } + } + + [Description("DESCRIÇÃO")] + [Log(true)] + [Name(true)] + public string Descricao + { + get + { + string str = this._descricao; + if (str != null) + { + return str.ToUpper(); + } + return null; + } + set + { + this._descricao = value; + } + } + + public long IdEmpresa { get; set; } = (long)1; + + [Description("OBSERVAÇÃO")] + [Log(true)] + public string Observacao + { + get + { + string str = this._observacao; + if (str != null) + { + return str.ToUpper(); + } + return null; + } + set + { + this._observacao = value; + } + } + + public bool Selecionado + { + get; + set; + } + + [JsonIgnore] + public Func>> ValidationEvent + { + get + { + BancosContas bancosConta = this; + return new Func>>(bancosConta.Validate); + } + } + + public BancosContas() + { + } + + public List Log() + { + string nome; + List tupleLists = new List(); + TupleList tupleList = new TupleList(); + ObservableCollection> observableCollection = new ObservableCollection>() + { + new Tuple("DESCRIÇÃO", (string.IsNullOrWhiteSpace(this.Descricao) ? "" : this.Descricao), ""), + new Tuple("AGÊNCIA", (string.IsNullOrWhiteSpace(this.Agencia) ? "" : this.Agencia), "") + }; + if (this.Banco == null) + { + nome = ""; + } + else + { + Gestor.Model.Domain.Common.Banco banco = this.Banco; + if (banco != null) + { + nome = banco.Nome; + } + else + { + nome = null; + } + } + observableCollection.Add(new Tuple("BANCO", nome, "")); + observableCollection.Add(new Tuple("CONTA CORRENTE/POUPANÇA", (string.IsNullOrWhiteSpace(this.Conta) ? "" : this.Conta), "")); + observableCollection.Add(new Tuple("ATIVO", (this.Ativo ? "SIM" : "NÃO"), "")); + observableCollection.Add(new Tuple("OBSERVAÇÕES", (string.IsNullOrWhiteSpace(this.Observacao) ? "" : this.Observacao), "")); + tupleList.Tuples = observableCollection; + tupleLists.Add(tupleList); + return tupleLists; + } + + public List> Validate() + { + List> keyValuePairs = new List>(); + if (string.IsNullOrWhiteSpace(this.Descricao)) + { + keyValuePairs.AddValue("Descricao|DESCRIÇÃO", Messages.Obrigatorio, true); + } + if (this.Banco == null) + { + keyValuePairs.AddValue("Banco", Messages.Obrigatorio, true); + } + if (string.IsNullOrWhiteSpace(this.Agencia)) + { + keyValuePairs.AddValue("Agencia|AGÊNCIA", Messages.Obrigatorio, true); + } + if (string.IsNullOrWhiteSpace(this.Conta)) + { + keyValuePairs.AddValue("Conta", Messages.Obrigatorio, true); + } + return keyValuePairs; + } + } +} \ No newline at end of file diff --git a/Codemerx/Gestor.Model/Model.Domain.Financeiro/Centro.cs b/Codemerx/Gestor.Model/Model.Domain.Financeiro/Centro.cs new file mode 100644 index 0000000..0236082 --- /dev/null +++ b/Codemerx/Gestor.Model/Model.Domain.Financeiro/Centro.cs @@ -0,0 +1,93 @@ +using Gestor.Model.Attributes; +using Gestor.Model.Domain.Generic; +using Gestor.Model.Domain.Seguros; +using Gestor.Model.Helper; +using Gestor.Model.Resources; +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.ComponentModel; +using System.Runtime.CompilerServices; + +namespace Gestor.Model.Domain.Financeiro +{ + public class Centro : DomainBase, IDomain + { + private string _descricao; + + [Log(true)] + public bool Ativo + { + get; + set; + } + + [Description("DESCRIÇÃO")] + [Log(true)] + [Name(true)] + public string Descricao + { + get + { + string str = this._descricao; + if (str != null) + { + return str.ToUpper(); + } + return null; + } + set + { + this._descricao = value; + } + } + + public long IdEmpresa { get; set; } = (long)1; + + public bool Selecionado + { + get; + set; + } + + [JsonIgnore] + public Func>> ValidationEvent + { + get + { + Centro centro = this; + return new Func>>(centro.Validate); + } + } + + public Centro() + { + } + + public List Log() + { + return new List() + { + new TupleList() + { + Tuples = new ObservableCollection>() + { + new Tuple("NOME", (string.IsNullOrWhiteSpace(this.Descricao) ? "" : this.Descricao), ""), + new Tuple("ATIVO", (this.Ativo ? "SIM" : "NÃO"), "") + } + } + }; + } + + public List> Validate() + { + List> keyValuePairs = ValidationHelper.AddValue(); + if (string.IsNullOrWhiteSpace(this.Descricao)) + { + keyValuePairs.AddValue("Descricao", Messages.Obrigatorio, true); + } + return keyValuePairs; + } + } +} \ No newline at end of file diff --git a/Codemerx/Gestor.Model/Model.Domain.Financeiro/ControleFinanceiro.cs b/Codemerx/Gestor.Model/Model.Domain.Financeiro/ControleFinanceiro.cs new file mode 100644 index 0000000..ad425c0 --- /dev/null +++ b/Codemerx/Gestor.Model/Model.Domain.Financeiro/ControleFinanceiro.cs @@ -0,0 +1,143 @@ +using Gestor.Model.Attributes; +using Gestor.Model.Domain.Generic; +using Gestor.Model.Helper; +using Gestor.Model.Resources; +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Runtime.CompilerServices; + +namespace Gestor.Model.Domain.Financeiro +{ + public class ControleFinanceiro : DomainBase, IDomain + { + private string _historico; + + [Description("CENTRO DE CUSTO")] + [Log(true)] + [Name(true)] + public Gestor.Model.Domain.Financeiro.Centro Centro + { + get; + set; + } + + [Description("FORNECEDOR")] + [Log(true)] + [Name(true)] + public Gestor.Model.Domain.Financeiro.Fornecedor Fornecedor + { + get; + set; + } + + public string Historico + { + get + { + string str = this._historico; + if (str != null) + { + return str.ToUpper(); + } + return null; + } + set + { + this._historico = value; + } + } + + [Description("QUANTIDADE DE PARCELAS")] + [Log(true)] + public int Parcelas + { + get; + set; + } + + [Description("PLANO DE CONTAS")] + [Log(true)] + [Name(true)] + public Planos Plano + { + get; + set; + } + + [JsonIgnore] + public Func>> ValidationEvent + { + get + { + ControleFinanceiro controleFinanceiro = this; + return new Func>>(controleFinanceiro.Validate); + } + } + + public ControleFinanceiro() + { + } + + public List> Validate() + { + bool id; + bool flag; + bool id1; + List> keyValuePairs = ValidationHelper.AddValue(); + if (this.Fornecedor == null) + { + keyValuePairs.AddValue("Fornecedor", Messages.Obrigatorio, true); + } + Gestor.Model.Domain.Financeiro.Fornecedor fornecedor = this.Fornecedor; + if (fornecedor != null) + { + id = fornecedor.Id == (long)0; + } + else + { + id = false; + } + if (id) + { + keyValuePairs.AddValue("Fornecedor|FORNECEDOR", string.Concat(Messages.Obrigatorio, "\nPROVAVELMENTE NÃO HÁ NENHUM FORNECEDOR INCLUÍDO\nACESSE A TELA DE CADASTRO DE FORNECEDORES PARA INCLUIR"), true); + } + if (this.Plano == null) + { + keyValuePairs.AddValue("Plano|PLANO DE CONTAS", string.Concat(Messages.Obrigatorio, "\nPROVAVELMENTE NÃO HÁ NENHUM PLANO DE CONTAS INCLUÍDO\nACESSE A TELA PLANO DE CONTAS PARA INCLUIR"), true); + } + Planos plano = this.Plano; + if (plano != null) + { + flag = plano.Id == (long)0; + } + else + { + flag = false; + } + if (flag) + { + keyValuePairs.AddValue("Plano|PLANO DE CONTAS", string.Concat(Messages.Obrigatorio, "\nPROVAVELMENTE NÃO HÁ NENHUM PLANO DE CONTAS INCLUÍDO\nACESSE A TELA PLANO DE CONTAS PARA INCLUIR"), true); + } + if (this.Centro == null) + { + keyValuePairs.AddValue("Centro|CENTRO DE CUSTOS", string.Concat(Messages.Obrigatorio, "\nPROVAVELMENTE NÃO HÁ NENHUM CENTRO DE CUSTOS INCLUÍDO\nACESSE A TELA CENTRO DE CUSTOS PARA INCLUIR"), true); + } + Gestor.Model.Domain.Financeiro.Centro centro = this.Centro; + if (centro != null) + { + id1 = centro.Id == (long)0; + } + else + { + id1 = false; + } + if (id1) + { + keyValuePairs.AddValue("Centro|CENTRO DE CUSTOS", string.Concat(Messages.Obrigatorio, "\nPROVAVELMENTE NÃO HÁ NENHUM CENTRO DE CUSTOS INCLUÍDO\nACESSE A TELA CENTRO DE CUSTOS PARA INCLUIR"), true); + } + return keyValuePairs; + } + } +} \ No newline at end of file diff --git a/Codemerx/Gestor.Model/Model.Domain.Financeiro/ExtratoConta.cs b/Codemerx/Gestor.Model/Model.Domain.Financeiro/ExtratoConta.cs new file mode 100644 index 0000000..7bfc742 --- /dev/null +++ b/Codemerx/Gestor.Model/Model.Domain.Financeiro/ExtratoConta.cs @@ -0,0 +1,97 @@ +using Gestor.Model.Attributes; +using Gestor.Model.Common; +using System; +using System.ComponentModel; +using System.Runtime.CompilerServices; + +namespace Gestor.Model.Domain.Financeiro +{ + public class ExtratoConta + { + private string _fornecedor; + + private string _historico; + + [Description("DATA BAIXA")] + [Tipo("DATA?")] + public DateTime? Baixa + { + get; + set; + } + + public bool Bold + { + get; + set; + } + + [Description("FORNECEDOR")] + public string Fornecedor + { + get + { + string str = this._fornecedor; + if (str != null) + { + return str.ToUpper(); + } + return null; + } + set + { + this._fornecedor = value; + } + } + + [Description("HISTÓRICO")] + public string Historico + { + get + { + string str = this._historico; + if (str != null) + { + return str.ToUpper(); + } + return null; + } + set + { + this._historico = value; + } + } + + public long IdLancamento + { + get; + set; + } + + public Gestor.Model.Common.Sinal Sinal + { + get; + set; + } + + [Description("TIPO PAGAMENTO")] + [Tipo("ENUM")] + public Gestor.Model.Common.TipoPagamento? TipoPagamento + { + get; + set; + } + + [Description("VALOR")] + [Tipo("VALOR?")] + public decimal? Valor + { + get; + set; + } + + public ExtratoConta() + { + } + } +} \ No newline at end of file diff --git a/Codemerx/Gestor.Model/Model.Domain.Financeiro/FiltroPersonalizado.cs b/Codemerx/Gestor.Model/Model.Domain.Financeiro/FiltroPersonalizado.cs new file mode 100644 index 0000000..897bab4 --- /dev/null +++ b/Codemerx/Gestor.Model/Model.Domain.Financeiro/FiltroPersonalizado.cs @@ -0,0 +1,54 @@ +using Gestor.Model.Attributes; +using Gestor.Model.Common; +using System; +using System.ComponentModel; +using System.Runtime.CompilerServices; + +namespace Gestor.Model.Domain.Financeiro +{ + public class FiltroPersonalizado + { + private string _descricao; + + [Description("DESCRIÇÃO DO FILTRO")] + public string Descricao + { + get + { + return this._descricao; + } + set + { + this._descricao = value; + if (!string.IsNullOrWhiteSpace(value)) + { + this.Icone = value.Substring(0, 1); + } + } + } + + public string Icone + { + get; + set; + } + + public long Id + { + get; + set; + } + + [Description("TIPO DO FILTRO")] + [Tipo("ENUM")] + public TipoFiltroFinanceiro Tipo + { + get; + set; + } + + public FiltroPersonalizado() + { + } + } +} \ No newline at end of file diff --git a/Codemerx/Gestor.Model/Model.Domain.Financeiro/Fornecedor.cs b/Codemerx/Gestor.Model/Model.Domain.Financeiro/Fornecedor.cs new file mode 100644 index 0000000..7bc6e4b --- /dev/null +++ b/Codemerx/Gestor.Model/Model.Domain.Financeiro/Fornecedor.cs @@ -0,0 +1,430 @@ +using Gestor.Model.Attributes; +using Gestor.Model.Common; +using Gestor.Model.Domain.Generic; +using Gestor.Model.Domain.Seguros; +using Gestor.Model.Helper; +using Gestor.Model.Resources; +using Gestor.Model.Validation; +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.ComponentModel; +using System.Runtime.CompilerServices; + +namespace Gestor.Model.Domain.Financeiro +{ + public class Fornecedor : EnderecoBase, IDomain + { + private string _nome; + + private string _documento; + + private string _email; + + private string _observacao; + + [Description("ATIVO")] + [Log(true)] + public bool Ativo + { + get; + set; + } + + [Log(true)] + public string Documento + { + get + { + string str = this._documento; + if (str == null) + { + return null; + } + return str.ToUpper().Trim(); + } + set + { + this._documento = value; + } + } + + [Description("E-MAIL")] + [Log(true)] + public string Email + { + get + { + string str = this._email; + if (str != null) + { + return str.ToLower(); + } + return null; + } + set + { + this._email = value; + } + } + + public new long Id + { + get; + set; + } + + public long? IdCentro + { + get; + set; + } + + public long? IdConta + { + get; + set; + } + + public long IdEmpresa + { + get; + set; + } + + public long? IdPlano + { + get; + set; + } + + [Log(true)] + [Name(true)] + public string Nome + { + get + { + string str = this._nome; + if (str != null) + { + return str.ToUpper(); + } + return null; + } + set + { + object upper; + this._nome = value; + if (value != null) + { + upper = value.ToUpper(); + } + else + { + upper = null; + } + this.NomeSocial = string.Format("{0} - {1}", upper, this.Id); + } + } + + [Description("NOME SOCIAL")] + [Log(true)] + public string NomeSocial + { + get; + set; + } + + [Description("OBSERVAÇÃO")] + [Log(true)] + public string Observacao + { + get + { + string str = this._observacao; + if (str != null) + { + return str.ToUpper(); + } + return null; + } + set + { + this._observacao = value; + } + } + + [Description("PREFIXO 1")] + [Log(true)] + public string Prefixo1 + { + get; + set; + } + + [Description("PREFIXO 2")] + [Log(true)] + public string Prefixo2 + { + get; + set; + } + + [Description("TELEFONE 1")] + [Log(true)] + public string Telefone1 + { + get; + set; + } + + [Description("TELEFONE 2")] + [Log(true)] + public string Telefone2 + { + get; + set; + } + + public Gestor.Model.Common.TipoPagamento? TipoPagamento + { + get; + set; + } + + [Description("TIPO TELEFONE")] + [Log(true)] + public TipoTelefone? TipoTelefone1 + { + get; + set; + } + + [Description("TIPO TELEFONE 2")] + [Log(true)] + public TipoTelefone? TipoTelefone2 + { + get; + set; + } + + [JsonIgnore] + public Func>> ValidationEvent + { + get + { + Fornecedor fornecedor = this; + return new Func>>(fornecedor.Validate); + } + } + + public Fornecedor() + { + } + + public List Log() + { + string description; + string str; + string str1; + string str2; + string str3; + string description1; + List tupleLists = new List(); + TupleList tupleList = new TupleList(); + ObservableCollection> observableCollection = new ObservableCollection>() + { + new Tuple("NOME DO FORNECEDOR", (string.IsNullOrWhiteSpace(this.Nome) ? "" : this.Nome), ""), + new Tuple("DOCUMENTO", (string.IsNullOrWhiteSpace(this.Documento) ? "" : this.Documento), ""), + new Tuple("CEP", (string.IsNullOrWhiteSpace(base.Cep) ? "" : base.Cep), ""), + new Tuple("ENDEREÇO", (string.IsNullOrWhiteSpace(base.Endereco) ? "" : base.Endereco), ""), + new Tuple("NÚMERO", (string.IsNullOrWhiteSpace(base.Numero) ? "" : base.Numero), ""), + new Tuple("COMPLEMENTO", (string.IsNullOrWhiteSpace(base.Complemento) ? "" : base.Complemento), ""), + new Tuple("BAIRRO", (string.IsNullOrWhiteSpace(base.Bairro) ? "" : base.Bairro), ""), + new Tuple("CIDADE", (string.IsNullOrWhiteSpace(base.Cidade) ? "" : base.Cidade), ""), + new Tuple("ESTADO", (string.IsNullOrWhiteSpace(base.Estado) ? "" : base.Estado), "") + }; + TipoTelefone? tipoTelefone1 = this.TipoTelefone1; + if (!tipoTelefone1.HasValue) + { + description = ""; + } + else + { + tipoTelefone1 = this.TipoTelefone1; + if (tipoTelefone1.HasValue) + { + description = tipoTelefone1.GetValueOrDefault().GetDescription(); + } + else + { + description = null; + } + } + observableCollection.Add(new Tuple("TIPO DO PRIMEIRO TELEFONE", description, "")); + observableCollection.Add(new Tuple("PRIMEIRO PREFIXO", (string.IsNullOrWhiteSpace(this.Prefixo1) ? "" : this.Prefixo1), "")); + observableCollection.Add(new Tuple("PRIMEIRO TELEFONE", (string.IsNullOrWhiteSpace(this.Telefone1) ? "" : this.Telefone1), "")); + tipoTelefone1 = this.TipoTelefone2; + if (!tipoTelefone1.HasValue) + { + str = ""; + } + else + { + tipoTelefone1 = this.TipoTelefone2; + if (tipoTelefone1.HasValue) + { + str = tipoTelefone1.GetValueOrDefault().GetDescription(); + } + else + { + str = null; + } + } + observableCollection.Add(new Tuple("TIPO DO SEGUNDO TELEFONE", str, "")); + observableCollection.Add(new Tuple("SEGUNDO PREFIXO", (string.IsNullOrWhiteSpace(this.Prefixo2) ? "" : this.Prefixo2), "")); + observableCollection.Add(new Tuple("SEGUNDO TELEFONE", (string.IsNullOrWhiteSpace(this.Telefone2) ? "" : this.Telefone2), "")); + observableCollection.Add(new Tuple("E-MAIL", (string.IsNullOrWhiteSpace(this.Email) ? "" : this.Email), "")); + long? idPlano = this.IdPlano; + if (!idPlano.HasValue) + { + str1 = ""; + } + else + { + idPlano = this.IdPlano; + if (idPlano.HasValue) + { + str1 = idPlano.GetValueOrDefault().ToString(); + } + else + { + str1 = null; + } + } + observableCollection.Add(new Tuple("PLANO DE CONTAS", str1, "")); + idPlano = this.IdCentro; + if (!idPlano.HasValue) + { + str2 = ""; + } + else + { + idPlano = this.IdCentro; + if (idPlano.HasValue) + { + str2 = idPlano.GetValueOrDefault().ToString(); + } + else + { + str2 = null; + } + } + observableCollection.Add(new Tuple("CENTRO DE CUSTO", str2, "")); + idPlano = this.IdConta; + if (!idPlano.HasValue) + { + str3 = ""; + } + else + { + idPlano = this.IdConta; + if (idPlano.HasValue) + { + str3 = idPlano.GetValueOrDefault().ToString(); + } + else + { + str3 = null; + } + } + observableCollection.Add(new Tuple("CONTA CORRENTE", str3, "")); + Gestor.Model.Common.TipoPagamento? tipoPagamento = this.TipoPagamento; + if (!tipoPagamento.HasValue) + { + description1 = ""; + } + else + { + tipoPagamento = this.TipoPagamento; + if (tipoPagamento.HasValue) + { + description1 = tipoPagamento.GetValueOrDefault().GetDescription(); + } + else + { + description1 = null; + } + } + observableCollection.Add(new Tuple("TIPO DE PAGAMENTO", description1, "")); + observableCollection.Add(new Tuple("OBSERVAÇÕES", (string.IsNullOrWhiteSpace(this.Observacao) ? "" : this.Observacao), "")); + tupleList.Tuples = observableCollection; + tupleLists.Add(tupleList); + return tupleLists; + } + + public List> Validate() + { + int? nullable; + int? nullable1; + List> keyValuePairs = ValidationHelper.AddValue(); + string nome = this.Nome; + if (nome != null) + { + nullable1 = new int?((int)nome.Trim().Split(new char[] { ' ' }).Length); + } + else + { + nullable = null; + nullable1 = nullable; + } + int? nullable2 = nullable1; + if (nullable2.HasValue) + { + nullable = nullable2; + if (nullable.GetValueOrDefault() <= 1 & nullable.HasValue) + { + keyValuePairs.AddValue("Nome", Messages.NomeInvalido, true); + } + } + else + { + keyValuePairs.AddValue("Nome", Messages.Obrigatorio, true); + } + if (!string.IsNullOrWhiteSpace(this.Nome) && this.Nome.Length > 60) + { + keyValuePairs.AddValue("Nome", string.Format(Messages.MaiorQueLimite, 60), true); + } + if (!string.IsNullOrWhiteSpace(this.Documento) && !this.Documento.ValidacaoDocumento()) + { + keyValuePairs.AddValue("Documento", Messages.Invalido, true); + } + if (!string.IsNullOrWhiteSpace(this.Prefixo1) && !this.Prefixo1.ValidacaoPrefixo()) + { + keyValuePairs.AddValue("Prefixo1", Messages.Obrigatorio, true); + } + if (!string.IsNullOrWhiteSpace(this.Telefone1) && !this.Telefone1.ValidacaoTelefone()) + { + keyValuePairs.AddValue("Telefone1", Messages.Obrigatorio, true); + } + if (!string.IsNullOrWhiteSpace(this.Email) && !this.Email.ValidacaoEmail()) + { + keyValuePairs.AddValue("Email", Messages.Obrigatorio, true); + } + if (!string.IsNullOrWhiteSpace(base.Cidade) && base.Cidade.Length > 30) + { + keyValuePairs.AddValue("Cidade", string.Format(Messages.MaiorQueLimite, 30), true); + } + if (!string.IsNullOrWhiteSpace(base.Bairro) && base.Bairro.Length > 60) + { + keyValuePairs.AddValue("Bairro", string.Format(Messages.MaiorQueLimite, 60), true); + } + if (!string.IsNullOrWhiteSpace(base.Complemento) && base.Complemento.Length > 40) + { + keyValuePairs.AddValue("Complemento", string.Format(Messages.MaiorQueLimite, 40), true); + } + return keyValuePairs; + } + } +} \ No newline at end of file diff --git a/Codemerx/Gestor.Model/Model.Domain.Financeiro/Lancamento.cs b/Codemerx/Gestor.Model/Model.Domain.Financeiro/Lancamento.cs new file mode 100644 index 0000000..2bdd404 --- /dev/null +++ b/Codemerx/Gestor.Model/Model.Domain.Financeiro/Lancamento.cs @@ -0,0 +1,285 @@ +using Gestor.Model.Attributes; +using Gestor.Model.Common; +using Gestor.Model.Domain.Generic; +using Gestor.Model.Helper; +using Gestor.Model.Resources; +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Runtime.CompilerServices; + +namespace Gestor.Model.Domain.Financeiro +{ + public class Lancamento : DomainBase, IDomain + { + private decimal? _valorPago; + + private string _historico; + + private string _documento; + + private string _complemento; + + private string _competencia; + + [Description("DATA DA BAIXA")] + [Log(true)] + public DateTime? Baixa + { + get; + set; + } + + public bool Baixado + { + get; + set; + } + + [Description("CÓDIGO BANCO")] + [Log(true)] + public string CodigoBanco + { + get; + set; + } + + [Description("COMPETÊNCIA")] + [Log(true)] + public string Competencia + { + get + { + string str = this._competencia; + if (str != null) + { + return str.ToUpper(); + } + return null; + } + set + { + this._competencia = value; + } + } + + [Log(true)] + public string Complemento + { + get + { + string str = this._complemento; + if (str != null) + { + return str.ToUpper(); + } + return null; + } + set + { + this._complemento = value; + } + } + + [Log(true)] + public BancosContas Conta + { + get; + set; + } + + public ControleFinanceiro Controle + { + get; + set; + } + + [Description("DATA LANÇAMENTO")] + [Log(true)] + public DateTime? DataLancamento + { + get; + set; + } + + [Log(true)] + public string Documento + { + get + { + string str = this._documento; + if (str != null) + { + return str.ToUpper(); + } + return null; + } + set + { + this._documento = value; + } + } + + [Description("HISTÓRICO")] + [Log(true)] + public string Historico + { + get + { + string str = this._historico; + if (str != null) + { + return str.ToUpper(); + } + return null; + } + set + { + this._historico = value; + } + } + + [Description("OBSERVAÇÃO")] + [Log(true)] + public string Observacao + { + get; + set; + } + + [Log(true)] + public DateTime? Pagamento + { + get; + set; + } + + [Log(true)] + public int Parcela + { + get; + set; + } + + public bool Selecionado + { + get; + set; + } + + [Log(true)] + public Gestor.Model.Common.Sinal Sinal + { + get; + set; + } + + [Description("TIPO PAGAMENTO")] + [Log(true)] + public Gestor.Model.Common.TipoPagamento TipoPagamento + { + get; + set; + } + + [JsonIgnore] + public Func>> ValidationEvent + { + get + { + Lancamento lancamento = this; + return new Func>>(lancamento.Validate); + } + } + + [Log(true)] + public decimal Valor + { + get; + set; + } + + [Description("VALOR PAGO")] + [Log(true)] + public decimal? ValorPago + { + get + { + return new decimal?(this._valorPago.GetValueOrDefault()); + } + set + { + this._valorPago = value; + } + } + + [Log(true)] + public DateTime Vencimento + { + get; + set; + } + + public Lancamento() + { + } + + public List> Validate() + { + List> keyValuePairs = ValidationHelper.AddValue(); + keyValuePairs.AddRange(this.Controle.Validate()); + if (string.IsNullOrWhiteSpace(this.Historico)) + { + keyValuePairs.AddValue("Historico", Messages.Obrigatorio, true); + } + else if (this.Historico.Length > 100) + { + keyValuePairs.AddValue("Historico", string.Format(Messages.MaiorQueLimite, 100), true); + } + if (this.Valor <= decimal.Zero) + { + keyValuePairs.AddValue("Valor", Messages.Obrigatorio, true); + } + decimal? valorPago = this.ValorPago; + decimal num = new decimal(); + if ((valorPago.GetValueOrDefault() < num) & valorPago.HasValue) + { + keyValuePairs.AddValue("ValorPago", Messages.Obrigatorio, true); + } + if (this.Conta == null) + { + keyValuePairs.AddValue("Conta|CONTA CORRENTE", string.Concat(Messages.Obrigatorio, "\nSE NÃO HOUVER NENHUMA CONTA CORRENTE CADASTRADA\nACESSE A TELA BANCOS E CONTAS PARA INCLUIR"), true); + } + if (!string.IsNullOrWhiteSpace(this.Documento) && this.Documento.Length > 50) + { + keyValuePairs.AddValue("Documento", string.Format(Messages.MaiorQueLimite, 50), true); + } + if (!string.IsNullOrWhiteSpace(this.Competencia) && this.Competencia.Length > 8) + { + keyValuePairs.AddValue("Competencia|COMPETÊNCIA", string.Format(Messages.MaiorQueLimite, 8), true); + } + if (!string.IsNullOrWhiteSpace(this.Complemento) && this.Complemento.Length > 50) + { + keyValuePairs.AddValue("Complemento", string.Format(Messages.MaiorQueLimite, 50), true); + } + if (this.Baixa.HasValue && (DateTime.Compare(this.Baixa.Value, new DateTime(1753, 1, 1)) < 0 || DateTime.Compare(this.Baixa.Value, new DateTime(9999, 12, 31)) > 0)) + { + keyValuePairs.AddValue("Baixa", string.Format(Messages.DataInvalida, Array.Empty()), true); + } + if (DateTime.Compare(this.Vencimento, new DateTime(1753, 1, 1)) < 0 || DateTime.Compare(this.Vencimento, new DateTime(9999, 12, 31)) > 0) + { + keyValuePairs.AddValue("Vencimento", string.Format(Messages.DataInvalida, Array.Empty()), true); + } + if (this.Pagamento.HasValue && (DateTime.Compare(this.Pagamento.Value, new DateTime(1753, 1, 1)) < 0 || DateTime.Compare(this.Pagamento.Value, new DateTime(9999, 12, 31)) > 0)) + { + keyValuePairs.AddValue("Pagamento", string.Format(Messages.DataInvalida, Array.Empty()), true); + } + if (!this.Baixa.HasValue && this.Baixado) + { + keyValuePairs.AddValue("Baixa", "NÃO É POSSÍVEL SALVAR UM DOCUMENTO SEM DATA DE BAIXA QUANDO O LANÇAMENTO POSSUÍ BAIXA", true); + } + return keyValuePairs; + } + } +} \ No newline at end of file diff --git a/Codemerx/Gestor.Model/Model.Domain.Financeiro/Plano.cs b/Codemerx/Gestor.Model/Model.Domain.Financeiro/Plano.cs new file mode 100644 index 0000000..9e9ab97 --- /dev/null +++ b/Codemerx/Gestor.Model/Model.Domain.Financeiro/Plano.cs @@ -0,0 +1,68 @@ +using Gestor.Model.Domain.Generic; +using Gestor.Model.Helper; +using Gestor.Model.Resources; +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.Runtime.CompilerServices; + +namespace Gestor.Model.Domain.Financeiro +{ + public class Plano : DomainBase, IDomain + { + private string _descricao; + + public bool Ativo + { + get; + set; + } + + public string Descricao + { + get + { + string str = this._descricao; + if (str != null) + { + return str.ToUpper(); + } + return null; + } + set + { + this._descricao = value; + } + } + + public bool Selecionado + { + get; + set; + } + + [JsonIgnore] + public Func>> ValidationEvent + { + get + { + Plano plano = this; + return new Func>>(plano.Validate); + } + } + + public Plano() + { + } + + public List> Validate() + { + List> keyValuePairs = ValidationHelper.AddValue(); + if (string.IsNullOrWhiteSpace(this.Descricao)) + { + keyValuePairs.AddValue("Descricao", Messages.Obrigatorio, true); + } + return keyValuePairs; + } + } +} \ No newline at end of file diff --git a/Codemerx/Gestor.Model/Model.Domain.Financeiro/Planos.cs b/Codemerx/Gestor.Model/Model.Domain.Financeiro/Planos.cs new file mode 100644 index 0000000..94e7528 --- /dev/null +++ b/Codemerx/Gestor.Model/Model.Domain.Financeiro/Planos.cs @@ -0,0 +1,165 @@ +using Gestor.Model.Attributes; +using Gestor.Model.Common; +using Gestor.Model.Domain.Generic; +using Gestor.Model.Domain.Seguros; +using Gestor.Model.Helper; +using Gestor.Model.Resources; +using Gestor.Model.Validation; +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.ComponentModel; +using System.Runtime.CompilerServices; + +namespace Gestor.Model.Domain.Financeiro +{ + public class Planos : DomainBase, IDomain + { + private string _descricao; + + private Gestor.Model.Common.Sinal _sinal; + + private string _nome; + + [Log(true)] + public bool Ativo + { + get; + set; + } + + [Description("DESCRIÇÃO")] + [Log(true)] + [Name(true)] + public string Descricao + { + get + { + string str = this._descricao; + if (str != null) + { + return str.ToUpper(); + } + return null; + } + set + { + this._descricao = value; + string str = (this.Sinal == Gestor.Model.Common.Sinal.Credito ? "(+)" : "(-)"); + this.Nome = string.Concat(value.ToUpper(), " ", str); + } + } + + [Log(true)] + public string Nome + { + get + { + return this._nome.ToUpper(); + } + set + { + this._nome = value; + } + } + + [Log(true)] + public Gestor.Model.Domain.Financeiro.Plano Plano + { + get; + set; + } + + public bool Selecionado + { + get; + set; + } + + [Log(true)] + public Gestor.Model.Common.Sinal Sinal + { + get + { + return this._sinal; + } + set + { + this._sinal = value; + string str = (value == Gestor.Model.Common.Sinal.Credito ? "(+)" : "(-)"); + this.Nome = string.Concat(this.Descricao, " ", str); + } + } + + [Description("TIPO CONTA")] + [Log(true)] + public Gestor.Model.Domain.Financeiro.TipoConta TipoConta + { + get; + set; + } + + [JsonIgnore] + public Func>> ValidationEvent + { + get + { + Planos plano = this; + return new Func>>(plano.Validate); + } + } + + public Planos() + { + } + + public List Log() + { + string descricao; + List tupleLists = new List(); + TupleList tupleList = new TupleList(); + ObservableCollection> observableCollection = new ObservableCollection>() + { + new Tuple("NOME", (string.IsNullOrWhiteSpace(this.Nome) ? "" : this.Nome), "") + }; + if (this.Plano == null) + { + descricao = ""; + } + else + { + Gestor.Model.Domain.Financeiro.Plano plano = this.Plano; + if (plano != null) + { + descricao = plano.Descricao; + } + else + { + descricao = null; + } + } + observableCollection.Add(new Tuple("PLANO", descricao, "")); + observableCollection.Add(new Tuple("ATIVO", (this.Ativo ? "SIM" : "NÃO"), "")); + Gestor.Model.Common.Sinal sinal = this.Sinal; + observableCollection.Add(new Tuple("SINAL", this.Sinal.GetDescription(), "")); + tupleList.Tuples = observableCollection; + tupleLists.Add(tupleList); + return tupleLists; + } + + public List> Validate() + { + List> keyValuePairs = ValidationHelper.AddValue(); + if (string.IsNullOrWhiteSpace(this.Descricao)) + { + keyValuePairs.AddValue("Descricao", Messages.Obrigatorio, true); + } + if (this.Plano == null) + { + keyValuePairs.AddValue("Plano", Messages.Obrigatorio, true); + } + return keyValuePairs; + } + } +} \ No newline at end of file diff --git a/Codemerx/Gestor.Model/Model.Domain.Financeiro/RelatorioLancamentos.cs b/Codemerx/Gestor.Model/Model.Domain.Financeiro/RelatorioLancamentos.cs new file mode 100644 index 0000000..6caa83a --- /dev/null +++ b/Codemerx/Gestor.Model/Model.Domain.Financeiro/RelatorioLancamentos.cs @@ -0,0 +1,132 @@ +using Gestor.Model.Attributes; +using System; +using System.ComponentModel; +using System.Runtime.CompilerServices; + +namespace Gestor.Model.Domain.Financeiro +{ + public class RelatorioLancamentos + { + [Description("DATA BAIXA")] + [Tipo("DATA?")] + public DateTime? Baixa + { + get; + set; + } + + [Description("CENTRO DE CUSTO")] + public string Centro + { + get; + set; + } + + [Description("COMPETÊNCIA")] + public string Competencia + { + get; + set; + } + + [Description("CONTA")] + public string Conta + { + get; + set; + } + + [Description("DOCUMENTO")] + public string Documento + { + get; + set; + } + + [Description("FORNECEDOR")] + public string Fornecedor + { + get; + set; + } + + [Description("HISTORICO")] + public string Historico + { + get; + set; + } + + [Description("OBSERVAÇÃO")] + public string Observacao + { + get; + set; + } + + [Description("PAGAMENTO")] + [Tipo("DATA?")] + public DateTime? Pagamento + { + get; + set; + } + + [Description("PARCELA")] + [Tipo("QUANTIDADE")] + public int Parcela + { + get; + set; + } + + [Description("PLANO DE CONTAS")] + public string Plano + { + get; + set; + } + + [Description("PLANOS")] + public string Planos + { + get; + set; + } + + [Description("SINAL")] + public string Sinal + { + get; + set; + } + + [Description("VALOR")] + [Tipo("VALOR")] + public decimal Valor + { + get; + set; + } + + [Description("VALOR PAGO")] + [Tipo("VALOR")] + public decimal? ValorPago + { + get; + set; + } + + [Description("VENCIMENTO")] + [Tipo("DATA")] + public DateTime Vencimento + { + get; + set; + } + + public RelatorioLancamentos() + { + } + } +} \ No newline at end of file diff --git a/Codemerx/Gestor.Model/Model.Domain.Financeiro/Relatorios/DadosFechamento.cs b/Codemerx/Gestor.Model/Model.Domain.Financeiro/Relatorios/DadosFechamento.cs new file mode 100644 index 0000000..fdaa81c --- /dev/null +++ b/Codemerx/Gestor.Model/Model.Domain.Financeiro/Relatorios/DadosFechamento.cs @@ -0,0 +1,82 @@ +using Gestor.Model.Attributes; +using System; +using System.ComponentModel; +using System.Runtime.CompilerServices; + +namespace Gestor.Model.Domain.Financeiro.Relatorios +{ + public class DadosFechamento + { + private string _planos; + + [Description("TOTAL CRÉDITO")] + [Tipo("VALOR")] + public decimal Credito + { + get; + set; + } + + [Description("TOTAL DÉBITO")] + [Tipo("VALOR")] + public decimal Debito + { + get; + set; + } + + [Description("% CRÉDITO")] + [Tipo("PERCENTUAL")] + public decimal PercentualCredito + { + get; + set; + } + + [Description("% DÉBITO")] + [Tipo("PERCENTUAL")] + public decimal PercentualDebito + { + get; + set; + } + + [Description("PLANO DE CONTAS")] + public string Planos + { + get + { + string str = this._planos; + if (str != null) + { + return str.ToUpper(); + } + return null; + } + set + { + this._planos = value; + } + } + + [Description("TOTAL CRÉDITO - TOTAL DÉBITO")] + [Tipo("VALOR")] + public decimal Soma + { + get; + set; + } + + [Description("% TOTAL DE CRÉDITO - % TOTAL DE DÉBITO")] + [Tipo("PERCENTUAL")] + public decimal SomaPercentual + { + get; + set; + } + + public DadosFechamento() + { + } + } +} \ No newline at end of file diff --git a/Codemerx/Gestor.Model/Model.Domain.Financeiro/Relatorios/DadosFechamentoAnalitico.cs b/Codemerx/Gestor.Model/Model.Domain.Financeiro/Relatorios/DadosFechamentoAnalitico.cs new file mode 100644 index 0000000..110118c --- /dev/null +++ b/Codemerx/Gestor.Model/Model.Domain.Financeiro/Relatorios/DadosFechamentoAnalitico.cs @@ -0,0 +1,154 @@ +using Gestor.Model.Attributes; +using System; +using System.ComponentModel; +using System.Runtime.CompilerServices; + +namespace Gestor.Model.Domain.Financeiro.Relatorios +{ + public class DadosFechamentoAnalitico + { + private string _nome; + + [Description("ABR")] + [Tipo("VALOR")] + public decimal? Abr + { + get; + set; + } + + [Description("AGO")] + [Tipo("VALOR")] + public decimal? Ago + { + get; + set; + } + + [Description("DEZ")] + [Tipo("VALOR")] + public decimal? Dez + { + get; + set; + } + + [Description("FEV")] + [Tipo("VALOR")] + public decimal? Fev + { + get; + set; + } + + [Description("JAN")] + [Tipo("VALOR")] + public decimal? Jan + { + get; + set; + } + + [Description("JUL")] + [Tipo("VALOR")] + public decimal? Jul + { + get; + set; + } + + [Description("JUN")] + [Tipo("VALOR")] + public decimal? Jun + { + get; + set; + } + + [Description("MAI")] + [Tipo("VALOR")] + public decimal? Mai + { + get; + set; + } + + [Description("MAR")] + [Tipo("VALOR")] + public decimal? Mar + { + get; + set; + } + + [Description("NOME")] + public string Nome + { + get + { + string str = this._nome; + if (str != null) + { + return str.ToUpper(); + } + return null; + } + set + { + this._nome = value; + } + } + + [Description("NOV")] + [Tipo("VALOR")] + public decimal? Nov + { + get; + set; + } + + [Description("OUT")] + [Tipo("VALOR")] + public decimal? Out + { + get; + set; + } + + [Description("% CRÉDITO")] + [Tipo("PERCENTUAL")] + public decimal PercentualCredito + { + get; + set; + } + + [Description("% DÉBITO")] + [Tipo("PERCENTUAL")] + public decimal PercentualDebito + { + get; + set; + } + + [Description("SET")] + [Tipo("VALOR")] + public decimal? Set + { + get; + set; + } + + [Description("TOTAL")] + [Tipo("VALOR")] + public decimal? Total + { + get; + set; + } + + public DadosFechamentoAnalitico() + { + } + } +} \ No newline at end of file diff --git a/Codemerx/Gestor.Model/Model.Domain.Financeiro/Relatorios/FechamentoFinanceiro.cs b/Codemerx/Gestor.Model/Model.Domain.Financeiro/Relatorios/FechamentoFinanceiro.cs new file mode 100644 index 0000000..53c72ad --- /dev/null +++ b/Codemerx/Gestor.Model/Model.Domain.Financeiro/Relatorios/FechamentoFinanceiro.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.Runtime.CompilerServices; + +namespace Gestor.Model.Domain.Financeiro.Relatorios +{ + public class FechamentoFinanceiro + { + public List Dados + { + get; + set; + } + + public string Plano + { + get; + set; + } + + public FechamentoFinanceiro() + { + } + } +} \ No newline at end of file diff --git a/Codemerx/Gestor.Model/Model.Domain.Financeiro/Relatorios/FechamentoFinanceiroAnalitico.cs b/Codemerx/Gestor.Model/Model.Domain.Financeiro/Relatorios/FechamentoFinanceiroAnalitico.cs new file mode 100644 index 0000000..73998d1 --- /dev/null +++ b/Codemerx/Gestor.Model/Model.Domain.Financeiro/Relatorios/FechamentoFinanceiroAnalitico.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.Runtime.CompilerServices; + +namespace Gestor.Model.Domain.Financeiro.Relatorios +{ + public class FechamentoFinanceiroAnalitico + { + public List Dados + { + get; + set; + } + + public string NomeConta + { + get; + set; + } + + public FechamentoFinanceiroAnalitico() + { + } + } +} \ No newline at end of file diff --git a/Codemerx/Gestor.Model/Model.Domain.Financeiro/Relatorios/FiltroFinanceiro.cs b/Codemerx/Gestor.Model/Model.Domain.Financeiro/Relatorios/FiltroFinanceiro.cs new file mode 100644 index 0000000..2f79ff0 --- /dev/null +++ b/Codemerx/Gestor.Model/Model.Domain.Financeiro/Relatorios/FiltroFinanceiro.cs @@ -0,0 +1,55 @@ +using System; +using System.Collections.Generic; +using System.Runtime.CompilerServices; + +namespace Gestor.Model.Domain.Financeiro.Relatorios +{ + public class FiltroFinanceiro + { + public List Centro + { + get; + set; + } + + public List Conta + { + get; + set; + } + + public DateTime Fim + { + get; + set; + } + + public DateTime Inicio + { + get; + set; + } + + public List Plano + { + get; + set; + } + + public List Planos + { + get; + set; + } + + public string Referencia + { + get; + set; + } + + public FiltroFinanceiro() + { + } + } +} \ No newline at end of file diff --git a/Codemerx/Gestor.Model/Model.Domain.Financeiro/Saldo.cs b/Codemerx/Gestor.Model/Model.Domain.Financeiro/Saldo.cs new file mode 100644 index 0000000..59731d3 --- /dev/null +++ b/Codemerx/Gestor.Model/Model.Domain.Financeiro/Saldo.cs @@ -0,0 +1,89 @@ +using Gestor.Model.Attributes; +using Gestor.Model.Domain.Generic; +using Gestor.Model.Helper; +using Gestor.Model.Resources; +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Runtime.CompilerServices; + +namespace Gestor.Model.Domain.Financeiro +{ + public class Saldo : DomainBase, IDomain + { + [Log(true)] + public BancosContas Conta + { + get; + set; + } + + [Description("DATA FINAL")] + [Log(true)] + public DateTime? DataFinal + { + get; + set; + } + + [Description("DATA INÍCIO")] + [Log(true)] + public DateTime? DataInicio + { + get; + set; + } + + [Log(true)] + public string Extrato + { + get; + set; + } + + [JsonIgnore] + public Func>> ValidationEvent + { + get + { + Saldo saldo = this; + return new Func>>(saldo.Validate); + } + } + + [Description("VALOR FINAL")] + [Log(true)] + public decimal? ValorFinal + { + get; + set; + } + + [Description("VALOR INÍCIO")] + [Log(true)] + public decimal ValorInicio + { + get; + set; + } + + public Saldo() + { + } + + public List> Validate() + { + List> keyValuePairs = ValidationHelper.AddValue(); + if (this.DataInicio.HasValue && (DateTime.Compare(this.DataInicio.Value, new DateTime(1753, 1, 1)) < 0 || DateTime.Compare(this.DataInicio.Value, new DateTime(9999, 12, 31)) > 0)) + { + keyValuePairs.AddValue("DataInicio|ABERTURA", string.Format(Messages.DataInvalida, Array.Empty()), true); + } + if (this.DataFinal.HasValue && (DateTime.Compare(this.DataFinal.Value, new DateTime(1753, 1, 1)) < 0 || DateTime.Compare(this.DataFinal.Value, new DateTime(9999, 12, 31)) > 0)) + { + keyValuePairs.AddValue("DataFinal|FECHAMENTO", string.Format(Messages.DataInvalida, Array.Empty()), true); + } + return keyValuePairs; + } + } +} \ No newline at end of file diff --git a/Codemerx/Gestor.Model/Model.Domain.Financeiro/SinteticoFinanceiro.cs b/Codemerx/Gestor.Model/Model.Domain.Financeiro/SinteticoFinanceiro.cs new file mode 100644 index 0000000..190d4ea --- /dev/null +++ b/Codemerx/Gestor.Model/Model.Domain.Financeiro/SinteticoFinanceiro.cs @@ -0,0 +1,60 @@ +using System; +using System.Runtime.CompilerServices; + +namespace Gestor.Model.Domain.Financeiro +{ + public class SinteticoFinanceiro + { + public BancosContas Conta + { + get; + set; + } + + public decimal Credito + { + get; + set; + } + + public decimal Debito + { + get; + set; + } + + public int Filtrados + { + get; + set; + } + + public decimal Liquido + { + get; + set; + } + + public decimal LiquidoPago + { + get; + set; + } + + public decimal LiquidoSelecionados + { + get; + set; + } + + public int Selecionados + { + get; + set; + } + + public SinteticoFinanceiro() + { + } + } +} \ No newline at end of file diff --git a/Codemerx/Gestor.Model/Model.Domain.Financeiro/TipoConta.cs b/Codemerx/Gestor.Model/Model.Domain.Financeiro/TipoConta.cs new file mode 100644 index 0000000..8e8cb6c --- /dev/null +++ b/Codemerx/Gestor.Model/Model.Domain.Financeiro/TipoConta.cs @@ -0,0 +1,62 @@ +using Gestor.Model.Domain.Generic; +using Gestor.Model.Helper; +using Gestor.Model.Resources; +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.Runtime.CompilerServices; + +namespace Gestor.Model.Domain.Financeiro +{ + public class TipoConta : DomainBase, IDomain + { + private string _descricao; + + public bool Ativo + { + get; + set; + } + + public string Descricao + { + get + { + string str = this._descricao; + if (str != null) + { + return str.ToUpper(); + } + return null; + } + set + { + this._descricao = value; + } + } + + [JsonIgnore] + public Func>> ValidationEvent + { + get + { + TipoConta tipoContum = this; + return new Func>>(tipoContum.Validate); + } + } + + public TipoConta() + { + } + + public List> Validate() + { + List> keyValuePairs = ValidationHelper.AddValue(); + if (string.IsNullOrWhiteSpace(this.Descricao)) + { + keyValuePairs.AddValue("Descricao", Messages.Obrigatorio, true); + } + return keyValuePairs; + } + } +} \ No newline at end of file diff --git a/Codemerx/Gestor.Model/Model.Domain.Financeiro/Transferencia.cs b/Codemerx/Gestor.Model/Model.Domain.Financeiro/Transferencia.cs new file mode 100644 index 0000000..8a12c2c --- /dev/null +++ b/Codemerx/Gestor.Model/Model.Domain.Financeiro/Transferencia.cs @@ -0,0 +1,76 @@ +using Gestor.Model.Domain.Generic; +using Gestor.Model.Helper; +using Gestor.Model.Resources; +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.Runtime.CompilerServices; + +namespace Gestor.Model.Domain.Financeiro +{ + public class Transferencia + { + public DateTime Data + { + get; + set; + } + + public BancosContas Destino + { + get; + set; + } + + public BancosContas Origem + { + get; + set; + } + + [JsonIgnore] + public Func>> ValidationEvent + { + get + { + return new Func>>(this.Validate); + } + } + + public decimal Valor + { + get; + set; + } + + public Transferencia() + { + } + + public List> Validate() + { + List> keyValuePairs = ValidationHelper.AddValue(); + if (this.Origem == null) + { + keyValuePairs.AddValue("Origem", Messages.Obrigatorio, true); + } + if (this.Destino == null) + { + keyValuePairs.AddValue("Destino", Messages.Obrigatorio, true); + } + if (this.Origem != null && this.Destino != null && this.Origem.Id == this.Destino.Id) + { + keyValuePairs.AddValue("CONTAS", "A CONTA DE ORIGEM NÃO PODE SER A MESMA QUE A DESTINO.", true); + } + if (DateTime.Compare(this.Data, new DateTime(1753, 1, 1)) < 0 || DateTime.Compare(this.Data, new DateTime(9999, 12, 31)) > 0) + { + keyValuePairs.AddValue("Data", string.Format(Messages.DataInvalida, Array.Empty()), true); + } + if (this.Valor <= decimal.Zero) + { + keyValuePairs.AddValue("Valor", Messages.Obrigatorio, true); + } + return keyValuePairs; + } + } +} \ No newline at end of file -- cgit v1.2.3