summaryrefslogtreecommitdiff
path: root/Codemerx/Gestor.Model/Model.Domain.Financeiro
diff options
context:
space:
mode:
authorLucas Faria Mendes <lucas.fariamo08@gmail.com>2026-03-30 13:38:18 +0000
committerLucas Faria Mendes <lucas.fariamo08@gmail.com>2026-03-30 13:38:18 +0000
commit1f4e14b2e973ee7de337fd4866d9a5ceff5cb6d1 (patch)
treee1c3b20ea08f0cf71122a1e73f0d395f8fd83874 /Codemerx/Gestor.Model/Model.Domain.Financeiro
parent674ca83ba9243a9e95a7568c797668dab6aee26a (diff)
downloadgestor-1f4e14b2e973ee7de337fd4866d9a5ceff5cb6d1.tar.gz
gestor-1f4e14b2e973ee7de337fd4866d9a5ceff5cb6d1.zip
chore: location
Diffstat (limited to 'Codemerx/Gestor.Model/Model.Domain.Financeiro')
-rw-r--r--Codemerx/Gestor.Model/Model.Domain.Financeiro/BancosContas.cs195
-rw-r--r--Codemerx/Gestor.Model/Model.Domain.Financeiro/Centro.cs93
-rw-r--r--Codemerx/Gestor.Model/Model.Domain.Financeiro/ControleFinanceiro.cs143
-rw-r--r--Codemerx/Gestor.Model/Model.Domain.Financeiro/ExtratoConta.cs97
-rw-r--r--Codemerx/Gestor.Model/Model.Domain.Financeiro/FiltroPersonalizado.cs54
-rw-r--r--Codemerx/Gestor.Model/Model.Domain.Financeiro/Fornecedor.cs430
-rw-r--r--Codemerx/Gestor.Model/Model.Domain.Financeiro/Lancamento.cs285
-rw-r--r--Codemerx/Gestor.Model/Model.Domain.Financeiro/Plano.cs68
-rw-r--r--Codemerx/Gestor.Model/Model.Domain.Financeiro/Planos.cs165
-rw-r--r--Codemerx/Gestor.Model/Model.Domain.Financeiro/RelatorioLancamentos.cs132
-rw-r--r--Codemerx/Gestor.Model/Model.Domain.Financeiro/Relatorios/DadosFechamento.cs82
-rw-r--r--Codemerx/Gestor.Model/Model.Domain.Financeiro/Relatorios/DadosFechamentoAnalitico.cs154
-rw-r--r--Codemerx/Gestor.Model/Model.Domain.Financeiro/Relatorios/FechamentoFinanceiro.cs25
-rw-r--r--Codemerx/Gestor.Model/Model.Domain.Financeiro/Relatorios/FechamentoFinanceiroAnalitico.cs25
-rw-r--r--Codemerx/Gestor.Model/Model.Domain.Financeiro/Relatorios/FiltroFinanceiro.cs55
-rw-r--r--Codemerx/Gestor.Model/Model.Domain.Financeiro/Saldo.cs89
-rw-r--r--Codemerx/Gestor.Model/Model.Domain.Financeiro/SinteticoFinanceiro.cs60
-rw-r--r--Codemerx/Gestor.Model/Model.Domain.Financeiro/TipoConta.cs62
-rw-r--r--Codemerx/Gestor.Model/Model.Domain.Financeiro/Transferencia.cs76
19 files changed, 2290 insertions, 0 deletions
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<List<KeyValuePair<string, string>>> ValidationEvent
+ {
+ get
+ {
+ BancosContas bancosConta = this;
+ return new Func<List<KeyValuePair<string, string>>>(bancosConta.Validate);
+ }
+ }
+
+ public BancosContas()
+ {
+ }
+
+ public List<TupleList> Log()
+ {
+ string nome;
+ List<TupleList> tupleLists = new List<TupleList>();
+ TupleList tupleList = new TupleList();
+ ObservableCollection<Tuple<string, string, string>> observableCollection = new ObservableCollection<Tuple<string, string, string>>()
+ {
+ new Tuple<string, string, string>("DESCRIÇÃO", (string.IsNullOrWhiteSpace(this.Descricao) ? "" : this.Descricao), ""),
+ new Tuple<string, string, string>("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<string, string, string>("BANCO", nome, ""));
+ observableCollection.Add(new Tuple<string, string, string>("CONTA CORRENTE/POUPANÇA", (string.IsNullOrWhiteSpace(this.Conta) ? "" : this.Conta), ""));
+ observableCollection.Add(new Tuple<string, string, string>("ATIVO", (this.Ativo ? "SIM" : "NÃO"), ""));
+ observableCollection.Add(new Tuple<string, string, string>("OBSERVAÇÕES", (string.IsNullOrWhiteSpace(this.Observacao) ? "" : this.Observacao), ""));
+ tupleList.Tuples = observableCollection;
+ tupleLists.Add(tupleList);
+ return tupleLists;
+ }
+
+ public List<KeyValuePair<string, string>> Validate()
+ {
+ List<KeyValuePair<string, string>> keyValuePairs = new List<KeyValuePair<string, string>>();
+ if (string.IsNullOrWhiteSpace(this.Descricao))
+ {
+ keyValuePairs.AddValue<string, string>("Descricao|DESCRIÇÃO", Messages.Obrigatorio, true);
+ }
+ if (this.Banco == null)
+ {
+ keyValuePairs.AddValue<string, string>("Banco", Messages.Obrigatorio, true);
+ }
+ if (string.IsNullOrWhiteSpace(this.Agencia))
+ {
+ keyValuePairs.AddValue<string, string>("Agencia|AGÊNCIA", Messages.Obrigatorio, true);
+ }
+ if (string.IsNullOrWhiteSpace(this.Conta))
+ {
+ keyValuePairs.AddValue<string, string>("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<List<KeyValuePair<string, string>>> ValidationEvent
+ {
+ get
+ {
+ Centro centro = this;
+ return new Func<List<KeyValuePair<string, string>>>(centro.Validate);
+ }
+ }
+
+ public Centro()
+ {
+ }
+
+ public List<TupleList> Log()
+ {
+ return new List<TupleList>()
+ {
+ new TupleList()
+ {
+ Tuples = new ObservableCollection<Tuple<string, string, string>>()
+ {
+ new Tuple<string, string, string>("NOME", (string.IsNullOrWhiteSpace(this.Descricao) ? "" : this.Descricao), ""),
+ new Tuple<string, string, string>("ATIVO", (this.Ativo ? "SIM" : "NÃO"), "")
+ }
+ }
+ };
+ }
+
+ public List<KeyValuePair<string, string>> Validate()
+ {
+ List<KeyValuePair<string, string>> keyValuePairs = ValidationHelper.AddValue();
+ if (string.IsNullOrWhiteSpace(this.Descricao))
+ {
+ keyValuePairs.AddValue<string, string>("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<List<KeyValuePair<string, string>>> ValidationEvent
+ {
+ get
+ {
+ ControleFinanceiro controleFinanceiro = this;
+ return new Func<List<KeyValuePair<string, string>>>(controleFinanceiro.Validate);
+ }
+ }
+
+ public ControleFinanceiro()
+ {
+ }
+
+ public List<KeyValuePair<string, string>> Validate()
+ {
+ bool id;
+ bool flag;
+ bool id1;
+ List<KeyValuePair<string, string>> keyValuePairs = ValidationHelper.AddValue();
+ if (this.Fornecedor == null)
+ {
+ keyValuePairs.AddValue<string, string>("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<string, string>("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<string, string>("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<string, string>("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<string, string>("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<string, string>("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<List<KeyValuePair<string, string>>> ValidationEvent
+ {
+ get
+ {
+ Fornecedor fornecedor = this;
+ return new Func<List<KeyValuePair<string, string>>>(fornecedor.Validate);
+ }
+ }
+
+ public Fornecedor()
+ {
+ }
+
+ public List<TupleList> Log()
+ {
+ string description;
+ string str;
+ string str1;
+ string str2;
+ string str3;
+ string description1;
+ List<TupleList> tupleLists = new List<TupleList>();
+ TupleList tupleList = new TupleList();
+ ObservableCollection<Tuple<string, string, string>> observableCollection = new ObservableCollection<Tuple<string, string, string>>()
+ {
+ new Tuple<string, string, string>("NOME DO FORNECEDOR", (string.IsNullOrWhiteSpace(this.Nome) ? "" : this.Nome), ""),
+ new Tuple<string, string, string>("DOCUMENTO", (string.IsNullOrWhiteSpace(this.Documento) ? "" : this.Documento), ""),
+ new Tuple<string, string, string>("CEP", (string.IsNullOrWhiteSpace(base.Cep) ? "" : base.Cep), ""),
+ new Tuple<string, string, string>("ENDEREÇO", (string.IsNullOrWhiteSpace(base.Endereco) ? "" : base.Endereco), ""),
+ new Tuple<string, string, string>("NÚMERO", (string.IsNullOrWhiteSpace(base.Numero) ? "" : base.Numero), ""),
+ new Tuple<string, string, string>("COMPLEMENTO", (string.IsNullOrWhiteSpace(base.Complemento) ? "" : base.Complemento), ""),
+ new Tuple<string, string, string>("BAIRRO", (string.IsNullOrWhiteSpace(base.Bairro) ? "" : base.Bairro), ""),
+ new Tuple<string, string, string>("CIDADE", (string.IsNullOrWhiteSpace(base.Cidade) ? "" : base.Cidade), ""),
+ new Tuple<string, string, string>("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<string, string, string>("TIPO DO PRIMEIRO TELEFONE", description, ""));
+ observableCollection.Add(new Tuple<string, string, string>("PRIMEIRO PREFIXO", (string.IsNullOrWhiteSpace(this.Prefixo1) ? "" : this.Prefixo1), ""));
+ observableCollection.Add(new Tuple<string, string, string>("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<string, string, string>("TIPO DO SEGUNDO TELEFONE", str, ""));
+ observableCollection.Add(new Tuple<string, string, string>("SEGUNDO PREFIXO", (string.IsNullOrWhiteSpace(this.Prefixo2) ? "" : this.Prefixo2), ""));
+ observableCollection.Add(new Tuple<string, string, string>("SEGUNDO TELEFONE", (string.IsNullOrWhiteSpace(this.Telefone2) ? "" : this.Telefone2), ""));
+ observableCollection.Add(new Tuple<string, string, string>("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<string, string, string>("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<string, string, string>("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<string, string, string>("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<string, string, string>("TIPO DE PAGAMENTO", description1, ""));
+ observableCollection.Add(new Tuple<string, string, string>("OBSERVAÇÕES", (string.IsNullOrWhiteSpace(this.Observacao) ? "" : this.Observacao), ""));
+ tupleList.Tuples = observableCollection;
+ tupleLists.Add(tupleList);
+ return tupleLists;
+ }
+
+ public List<KeyValuePair<string, string>> Validate()
+ {
+ int? nullable;
+ int? nullable1;
+ List<KeyValuePair<string, string>> 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<string, string>("Nome", Messages.NomeInvalido, true);
+ }
+ }
+ else
+ {
+ keyValuePairs.AddValue<string, string>("Nome", Messages.Obrigatorio, true);
+ }
+ if (!string.IsNullOrWhiteSpace(this.Nome) && this.Nome.Length > 60)
+ {
+ keyValuePairs.AddValue<string, string>("Nome", string.Format(Messages.MaiorQueLimite, 60), true);
+ }
+ if (!string.IsNullOrWhiteSpace(this.Documento) && !this.Documento.ValidacaoDocumento())
+ {
+ keyValuePairs.AddValue<string, string>("Documento", Messages.Invalido, true);
+ }
+ if (!string.IsNullOrWhiteSpace(this.Prefixo1) && !this.Prefixo1.ValidacaoPrefixo())
+ {
+ keyValuePairs.AddValue<string, string>("Prefixo1", Messages.Obrigatorio, true);
+ }
+ if (!string.IsNullOrWhiteSpace(this.Telefone1) && !this.Telefone1.ValidacaoTelefone())
+ {
+ keyValuePairs.AddValue<string, string>("Telefone1", Messages.Obrigatorio, true);
+ }
+ if (!string.IsNullOrWhiteSpace(this.Email) && !this.Email.ValidacaoEmail())
+ {
+ keyValuePairs.AddValue<string, string>("Email", Messages.Obrigatorio, true);
+ }
+ if (!string.IsNullOrWhiteSpace(base.Cidade) && base.Cidade.Length > 30)
+ {
+ keyValuePairs.AddValue<string, string>("Cidade", string.Format(Messages.MaiorQueLimite, 30), true);
+ }
+ if (!string.IsNullOrWhiteSpace(base.Bairro) && base.Bairro.Length > 60)
+ {
+ keyValuePairs.AddValue<string, string>("Bairro", string.Format(Messages.MaiorQueLimite, 60), true);
+ }
+ if (!string.IsNullOrWhiteSpace(base.Complemento) && base.Complemento.Length > 40)
+ {
+ keyValuePairs.AddValue<string, string>("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<List<KeyValuePair<string, string>>> ValidationEvent
+ {
+ get
+ {
+ Lancamento lancamento = this;
+ return new Func<List<KeyValuePair<string, string>>>(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<KeyValuePair<string, string>> Validate()
+ {
+ List<KeyValuePair<string, string>> keyValuePairs = ValidationHelper.AddValue();
+ keyValuePairs.AddRange(this.Controle.Validate());
+ if (string.IsNullOrWhiteSpace(this.Historico))
+ {
+ keyValuePairs.AddValue<string, string>("Historico", Messages.Obrigatorio, true);
+ }
+ else if (this.Historico.Length > 100)
+ {
+ keyValuePairs.AddValue<string, string>("Historico", string.Format(Messages.MaiorQueLimite, 100), true);
+ }
+ if (this.Valor <= decimal.Zero)
+ {
+ keyValuePairs.AddValue<string, string>("Valor", Messages.Obrigatorio, true);
+ }
+ decimal? valorPago = this.ValorPago;
+ decimal num = new decimal();
+ if ((valorPago.GetValueOrDefault() < num) & valorPago.HasValue)
+ {
+ keyValuePairs.AddValue<string, string>("ValorPago", Messages.Obrigatorio, true);
+ }
+ if (this.Conta == null)
+ {
+ keyValuePairs.AddValue<string, string>("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<string, string>("Documento", string.Format(Messages.MaiorQueLimite, 50), true);
+ }
+ if (!string.IsNullOrWhiteSpace(this.Competencia) && this.Competencia.Length > 8)
+ {
+ keyValuePairs.AddValue<string, string>("Competencia|COMPETÊNCIA", string.Format(Messages.MaiorQueLimite, 8), true);
+ }
+ if (!string.IsNullOrWhiteSpace(this.Complemento) && this.Complemento.Length > 50)
+ {
+ keyValuePairs.AddValue<string, string>("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<string, string>("Baixa", string.Format(Messages.DataInvalida, Array.Empty<object>()), true);
+ }
+ if (DateTime.Compare(this.Vencimento, new DateTime(1753, 1, 1)) < 0 || DateTime.Compare(this.Vencimento, new DateTime(9999, 12, 31)) > 0)
+ {
+ keyValuePairs.AddValue<string, string>("Vencimento", string.Format(Messages.DataInvalida, Array.Empty<object>()), 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<string, string>("Pagamento", string.Format(Messages.DataInvalida, Array.Empty<object>()), true);
+ }
+ if (!this.Baixa.HasValue && this.Baixado)
+ {
+ keyValuePairs.AddValue<string, string>("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<List<KeyValuePair<string, string>>> ValidationEvent
+ {
+ get
+ {
+ Plano plano = this;
+ return new Func<List<KeyValuePair<string, string>>>(plano.Validate);
+ }
+ }
+
+ public Plano()
+ {
+ }
+
+ public List<KeyValuePair<string, string>> Validate()
+ {
+ List<KeyValuePair<string, string>> keyValuePairs = ValidationHelper.AddValue();
+ if (string.IsNullOrWhiteSpace(this.Descricao))
+ {
+ keyValuePairs.AddValue<string, string>("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<List<KeyValuePair<string, string>>> ValidationEvent
+ {
+ get
+ {
+ Planos plano = this;
+ return new Func<List<KeyValuePair<string, string>>>(plano.Validate);
+ }
+ }
+
+ public Planos()
+ {
+ }
+
+ public List<TupleList> Log()
+ {
+ string descricao;
+ List<TupleList> tupleLists = new List<TupleList>();
+ TupleList tupleList = new TupleList();
+ ObservableCollection<Tuple<string, string, string>> observableCollection = new ObservableCollection<Tuple<string, string, string>>()
+ {
+ new Tuple<string, string, string>("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<string, string, string>("PLANO", descricao, ""));
+ observableCollection.Add(new Tuple<string, string, string>("ATIVO", (this.Ativo ? "SIM" : "NÃO"), ""));
+ Gestor.Model.Common.Sinal sinal = this.Sinal;
+ observableCollection.Add(new Tuple<string, string, string>("SINAL", this.Sinal.GetDescription(), ""));
+ tupleList.Tuples = observableCollection;
+ tupleLists.Add(tupleList);
+ return tupleLists;
+ }
+
+ public List<KeyValuePair<string, string>> Validate()
+ {
+ List<KeyValuePair<string, string>> keyValuePairs = ValidationHelper.AddValue();
+ if (string.IsNullOrWhiteSpace(this.Descricao))
+ {
+ keyValuePairs.AddValue<string, string>("Descricao", Messages.Obrigatorio, true);
+ }
+ if (this.Plano == null)
+ {
+ keyValuePairs.AddValue<string, string>("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<DadosFechamento> 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<DadosFechamentoAnalitico> 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<long> Centro
+ {
+ get;
+ set;
+ }
+
+ public List<long> Conta
+ {
+ get;
+ set;
+ }
+
+ public DateTime Fim
+ {
+ get;
+ set;
+ }
+
+ public DateTime Inicio
+ {
+ get;
+ set;
+ }
+
+ public List<long> Plano
+ {
+ get;
+ set;
+ }
+
+ public List<long> 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<List<KeyValuePair<string, string>>> ValidationEvent
+ {
+ get
+ {
+ Saldo saldo = this;
+ return new Func<List<KeyValuePair<string, string>>>(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<KeyValuePair<string, string>> Validate()
+ {
+ List<KeyValuePair<string, string>> 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<string, string>("DataInicio|ABERTURA", string.Format(Messages.DataInvalida, Array.Empty<object>()), 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<string, string>("DataFinal|FECHAMENTO", string.Format(Messages.DataInvalida, Array.Empty<object>()), 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<List<KeyValuePair<string, string>>> ValidationEvent
+ {
+ get
+ {
+ TipoConta tipoContum = this;
+ return new Func<List<KeyValuePair<string, string>>>(tipoContum.Validate);
+ }
+ }
+
+ public TipoConta()
+ {
+ }
+
+ public List<KeyValuePair<string, string>> Validate()
+ {
+ List<KeyValuePair<string, string>> keyValuePairs = ValidationHelper.AddValue();
+ if (string.IsNullOrWhiteSpace(this.Descricao))
+ {
+ keyValuePairs.AddValue<string, string>("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<List<KeyValuePair<string, string>>> ValidationEvent
+ {
+ get
+ {
+ return new Func<List<KeyValuePair<string, string>>>(this.Validate);
+ }
+ }
+
+ public decimal Valor
+ {
+ get;
+ set;
+ }
+
+ public Transferencia()
+ {
+ }
+
+ public List<KeyValuePair<string, string>> Validate()
+ {
+ List<KeyValuePair<string, string>> keyValuePairs = ValidationHelper.AddValue();
+ if (this.Origem == null)
+ {
+ keyValuePairs.AddValue<string, string>("Origem", Messages.Obrigatorio, true);
+ }
+ if (this.Destino == null)
+ {
+ keyValuePairs.AddValue<string, string>("Destino", Messages.Obrigatorio, true);
+ }
+ if (this.Origem != null && this.Destino != null && this.Origem.Id == this.Destino.Id)
+ {
+ keyValuePairs.AddValue<string, string>("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<string, string>("Data", string.Format(Messages.DataInvalida, Array.Empty<object>()), true);
+ }
+ if (this.Valor <= decimal.Zero)
+ {
+ keyValuePairs.AddValue<string, string>("Valor", Messages.Obrigatorio, true);
+ }
+ return keyValuePairs;
+ }
+ }
+} \ No newline at end of file