Exemple #1
0
 //Edicao do item de uma nota já salva
 public XFrmAddItemNF_NEW(ItemMovimento itemSelect, FormTypeAction formTypeAction, XFrmNotaFiscal formPai) : this()
 {
     this.formPai        = formPai;
     this.itemSelect     = itemSelect;
     this.formTypeAction = formTypeAction;
     indexarCampos();
 }
Exemple #2
0
        public XFrmAddFuncionario(Funcionario funcionario, FormTypeAction action = FormTypeAction.Nenhum) : this()
        {
            this.funcAnt                = this.indexarFuncionario(funcionario);
            this.cbSituacao.ReadOnly    = false;
            this.dtDataAdmissao.Enabled = false;
            this.cbDepartamento.Enabled = false;
            this.cbFuncao.Enabled       = false;
            this.cbSituacao.Enabled     = false;
            this.txtSalario.Enabled     = false;

            var q = from p in funcionario.Eventos.Where(e => e.Removed == false)
                    select new EventoFuncionario()
            {
                Evento = p.Evento, IdEvento = p.IdEvento, Valor = p.Valor, IdFuncionario = p.IdFuncionario, IdRegistro = p.IdRegistro, Removed = p.Removed
            };

            this.eventosFuncionario = q.ToList();

            gridControlEvtFunc.DataSource = this.eventosFuncionario;

            if (action == FormTypeAction.Visualizar)
            {
                ComponenteUtil.DesabilitarComponentes(new Component[] { this.ribbon,
                                                                        this.navPaneHistoricoPai,
                                                                        this.navPaneHistDepartamento, this.navPaneHistFuncao, this.navPaneHistSalarial,
                                                                        this.navPaneInfoPessoais, this.navPaneEndereco, this.navPaneCTPS, navPaneDadosAdmissionais, navPaneDocumentos });
            }
        }
Exemple #3
0
        //Edição da nota fiscal
        public XFrmNotaFiscal(Movimento capaNF, FormTypeAction formTypeAction, TypeFiltroMovimento typeFiltroMovimento, Usuario currentUser) : this()
        {
            this.capa                = capaNF;
            this.formTypeAction      = formTypeAction;
            this.currentUser         = currentUser;
            this.typeFiltroMovimento = typeFiltroMovimento;
            this.lookUpTipoMovimento1.TypeFiltroMovimento = typeFiltroMovimento;
            btnEditNF.Visible = true;
            //deixar readyOnly os textEdits
            ComponenteUtil.ReadyOnly(true, getComponents()[0]);
            //desabilitar os componentes
            ComponenteUtil.DesabilitarComponentes(getComponents()[1]);
            //desabilitar os lookups ITS
            lookUpCentroCusto1.ReadOnlyMode();
            lookUpFormaPagamento1.ReadOnlyMode();
            lookUpMatrizFilial1.ReadyOnlyMode();
            lookUpCliFor1.ReadOnlyMode();
            lookUpTipoMovimento1.ReadOnlyMode();
            lookUpModeloDocFiscal1.ReadOnlyMode();
            lookUpLocalEstoque1.ReadOnlyMode();
            //desabilitar a ediçao se houver alguma parcela paga
            if (isParcelasPagas(capaNF) || capa.TipoMovimento.CategoriaTipoMovimento == TypeCategoriaTipoMovimento.Transferencia)
            {
                btnEditNF.Enabled = false;

                if (capa.TipoMovimento.CategoriaTipoMovimento == TypeCategoriaTipoMovimento.Transferencia)
                {
                    lbMensagem.Visible = true;
                }
            }
        }
Exemple #4
0
 //Edicao do item de uma nota já salva
 public XFrmAddItemPedidoCotacao(ItemMovimento itemSelect, FormTypeAction formTypeAction, XFrmPedidoCompraCotacao formPai) : this()
 {
     this.formPai        = formPai;
     this.itemSelect     = itemSelect;
     this.formTypeAction = formTypeAction;
     indexarCampos();
 }
        public XFrmAssitenteLancamentoFinanceiro(LancamentoFinanceiro lancamentoFinanceiro,
                                                 FormTypeAction action = FormTypeAction.Salvar)
            : this()
        {
            //evitar o erro
            //the entity wrapper stored in the proxy does not reference the same proxy
            //pq ele nao faz parte das opçoes do combo
            lancamentoFinanceiro.StatusLancamento = TypeStatusLancamentoFinanceiro.Aberto;
            //lançamento base
            //nao posso mexer no lançamento do grid
            this._lancamentoAtual = lancamentoFinanceiro.Clone();


            this._lancamentoAtual.IdLancamento = lancamentoFinanceiro.IdLancamento;
            this._lancamentoList         = new List <LancamentoFinanceiro>();
            this.txtTotalLancamento.Text = _lancamentoAtual.TotalLancamento.ToString("N2");
            this._action = action;

            if (action != FormTypeAction.Salvar)
            {
                lblDesId.Visible           = true;
                lblDescVencimento.Visible  = true; lblDescValor.Visible = true;
                lblId.Visible              = true;
                lblDataVencimento.Visible  = true;
                lblTotalLancamento.Visible = true;
            }


            lblId.Text              = lancamentoFinanceiro.IdLancamento.ToString();
            lblDataVencimento.Text  = _lancamentoAtual.DataVencimento.ToShortDateString();
            lblTotalLancamento.Text = _lancamentoAtual.TotalLancamento.ToString("N2");
            //cria uma lancamento utilizando o lançamento base
            this.gerarParcelamento(1, 30);
        }
Exemple #6
0
 public XFrmAddImpostoRegraFiscal(ImpostosRegraFiscal impostoTpMov, FormTypeAction acao) : this()
 {
     this.acao         = acao;
     this.ImpostoTpMov = impostoTpMov;
     this.cacheImposto = impostoTpMov.TipoImposto;
     this.cacheCst     = impostoTpMov.SituacaoTributaria;
     IndexarFormulario(impostoTpMov);
 }
 //edição
 public XFrmAddContaContabil(ContaContabil cct, FormTypeAction actionForm) : this()
 {
     this._currentConta   = cct;
     this._actionForm     = actionForm;
     this.Text            = "Conta contábil: " + cct.CodigoContaContabil + " - " + cct.DescricaoContaContabil;
     btnEditar.Visibility = DevExpress.XtraBars.BarItemVisibility.Always;
     btnSalvar.Visibility = DevExpress.XtraBars.BarItemVisibility.Never;
     IndexarCampos(cct);
     desativarComponents();
 }
Exemple #8
0
 public XFrmCheque(Cheque ch, FormTypeAction action = FormTypeAction.Alterar)
     : this()
 {
     this._chequeAnt = indexarDados(ch);
     if (action == FormTypeAction.Visualizar)
     {
         this.Enabled        = false;
         this.btnSalvar.Text = "Alterar";
     }
 }
Exemple #9
0
 public XFrmAddCfop(Cfops cfopAnt, FormTypeAction formTypeAction) : this()
 {
     this.cfopAnt        = cfopAnt;
     this.formTypeAction = formTypeAction;
     if (cfopAnt != null)
     {
         this.Text = cfopAnt.CodigoCfop;
         indexarCampos();
     }
 }
Exemple #10
0
        public XFrmSetMatrizFilial(EmpresaFilial f = null, FormTypeAction action = FormTypeAction.Selecionar)
        {
            InitializeComponent();
            this._action = action;

            if (f != null)
            {
                this.lookUpMatrizFilial1.Matriz = f.Matriz;
                this.lookUpMatrizFilial1.Filial = f;
            }
            this.IsInvoke = true;
        }
Exemple #11
0
        /// <summary>
        /// Valida a nota fiscal e retorna a lista de erros
        /// </summary>
        /// <param name="nota"></param>
        /// <returns></returns>
        public List <string> ValidarNotaFiscalInclusao(Movimento nota, FormTypeAction acao)
        {
            List <string> listaErros = new List <string>();
            var           msg        = "";

            //se a chave nao for valida, adicione a mensagem a lista de erros da validacao
            if (!ValidaTamanhoChaveAcesso(nota))
            {
                msg = "Tamanho da chave de acesso menor que 44 caracteres!";
                listaErros.Add(msg);
            }

            foreach (var item in nota.ItensMovimento)
            {
                //valida a regra fiscal
                if (!ValidarRegraFiscal(item))
                {
                    msg = "Regra fiscal não informada! Verifique todos os itens!";
                    listaErros.Add(msg);
                }
                //valida a operação
                if (!ValidaOperacaoEntradaSaida(nota.DirecaoMovimento, item.RegraFiscal))
                {
                    msg = "Operação inválida! Tipo da nota é de 'Saída' mas o tipo de movimento escolhido e para 'Entrada'.";
                    listaErros.Add(msg);
                }
                //valida o CFOP
                if (!ValidarCFOP(item))
                {
                    msg = "CFOP inválido ou não informado! Verifique todos os itens!";
                    listaErros.Add(msg);
                }
            }

            //validar o numero da nota somente se estiver criando uma nova. casos de update nao é necessario validar este ponto.
            if (acao != FormTypeAction.Visualizar)
            {
                string nfNum = ValidarNumeroNotaFiscal(nota);

                if (nfNum != null)
                {
                    listaErros.Add(nfNum);
                }
            }

            return(listaErros);
        }
Exemple #12
0
        private void selecionar(FormTypeAction action)
        {
            var txtCodBar = txtCodigoBarrasProduto.Text;

            if (String.IsNullOrWhiteSpace(txtCodBar))
            {
                return;
            }

            var split = txtCodBar.Split('*');

            Decimal qtde = 0;
            Produto p    = this.gridViewProdutos.GetFocusedRow() as Produto;
            bool    flag = false;

            if (txtCodBar.Contains("*") && split.Length > 1)
            {
                qtde = ParseUtil.ToDecimal(split[0]);
            }
            else
            {
                //minimo
                qtde = 1;
            }

            if (p == null)
            {
                lblDescricaoProduto.ForeColor = Color.Red;
                lblDescricaoProduto.Text      = "Nenhum produto encontrado";
            }
            else
            {
                p.QuantidadeProduto = qtde;
                flag = this._xFrmProposta.AddProduto(p, qtde);
                //this.Hide();
            }

            if (action == FormTypeAction.Selecionar && flag)
            {
                this.Hide();
            }
        }
 public XFrmAddLancamentoExtrato(ExtratoBancario extrato, FormTypeAction acao = FormTypeAction.Nenhum) : this()
 {
     this._extratoAnt = extrato;
     this._acao       = acao;
     IndexarDados(extrato);
 }
Exemple #14
0
 public XFrmAddRegraFiscal(RegraFiscal tipoMov, FormTypeAction acao) : this()
 {
     this.tipoMovimento = tipoMov;
     this.acao          = acao;
     IndexarFormulario(tipoMov);
 }
 public XFrmParametrizarMovimentoView(TipoMovimento tipoMovimento, FormTypeAction acao) : this()
 {
     this.current_tipoMovimento = tipoMovimento;
     this.formTypeAction        = acao;
     indexarCampos();
 }
Exemple #16
0
 public XFrmAddSituacaoTributaria(SituacaoTributaria cstAnt, FormTypeAction formTypeAction) : this()
 {
     this.cstAnt         = cstAnt;
     this.formTypeAction = formTypeAction;
     //indexarCampos();
 }
 public XFrmAddImpostoItemNf(ImpostoItemMovimento imposto, FormTypeAction acao) : this()
 {
     this.acao        = acao; //Alterar
     this.impostoEdit = imposto;
     IndexarFormulario();
 }
Exemple #18
0
 public XFrmAddImposto(TipoImposto impostoAnt, FormTypeAction formTypeAction) : this()
 {
     this.impostoAnt     = impostoAnt;
     this.formTypeAction = formTypeAction;
     indexarCampos();
 }
Exemple #19
0
 public XFrmAddPais(LocalEstoque localEstAnt, FormTypeAction formTypeAction) : this()
 {
     this.localEstAnt    = localEstAnt;
     this.formTypeAction = formTypeAction;
     indexarCampos();
 }