Ejemplo n.º 1
0
        private void FEfetuaPagamento_Shown(object sender, EventArgs e)
        {
            TipoPagamentoController      = new TipoPagamentoController();
            TotalTipoPagamentoController = new TotalTipoPagamentoController();
            //
            TotalVenda       = 0;
            Desconto         = 0;
            Acrescimo        = 0;
            TotalReceber     = 0;
            TotalRecebido    = 0;
            Troco            = 0;
            QuantidadeCartao = 0;

            if (FCaixa.VendaCabecalho.TaxaAcrescimo > 0)
            {
                FCaixa.VendaCabecalho.Acrescimo = Biblioteca.TruncaValor(FCaixa.VendaCabecalho.TaxaAcrescimo / 100 * FCaixa.VendaCabecalho.ValorVenda, Constantes.DECIMAIS_VALOR);
            }
            if (FCaixa.VendaCabecalho.TaxaDesconto > 0)
            {
                FCaixa.VendaCabecalho.Desconto = Biblioteca.TruncaValor(FCaixa.VendaCabecalho.TaxaDesconto / 100 * FCaixa.VendaCabecalho.ValorVenda, Constantes.DECIMAIS_VALOR);
            }

            // preenche valores nas variaveis
            TotalVenda    = FCaixa.VendaCabecalho.ValorVenda.Value;
            Acrescimo     = FCaixa.VendaCabecalho.Acrescimo.Value;
            Desconto      = FCaixa.VendaCabecalho.Desconto.Value;
            TotalReceber  = Biblioteca.TruncaValor(TotalVenda + Acrescimo - Desconto, Constantes.DECIMAIS_VALOR);
            SaldoRestante = TotalReceber;

            SegundoCartaoCancelado = false;
            TransacaoComTef        = false;
            CupomCancelado         = false;
            PodeFechar             = true;
            IndiceTransacaoTef     = -1;

            AtualizaLabelsValores();

            if (SaldoRestante > 0)
            {
                editValorPago.Text = SaldoRestante.ToString("0.00");
            }
            else
            {
                editValorPago.Text = "0.00";
            }

            IdVenda = FCaixa.VendaCabecalho.Id;

            // lista que vai acumular os meios de pagamento
            ListaTotalTipoPagamento = new List <TotalTipoPagamentoVO>();

            // tela padrão
            TelaPadrao();
            ComboTipoPagamento.Focus();
        }
        private void frmMovimentacaoCompra_Load(object sender, EventArgs e)
        {
            this.alteraBotoes(1);
            DALConexao cx = new DALConexao(DadosDaConexao.stringDeConexao);
            TipoPagamentoController modPaga = new TipoPagamentoController(cx);

            cboTipoDePagamento.DataSource     = modPaga.Localizar("");
            cboTipoDePagamento.DisplayMember  = "tpa_nome";
            cboTipoDePagamento.ValueMember    = "tpa_cod";
            cboNumeroDeParcelas.SelectedIndex = 0;
        }
Ejemplo n.º 3
0
        public FEncerraMovimento()
        {
            // Required for Windows Form Designer support
            InitializeComponent();
            ConfiguraDataSet();
            TipoPagamentoController      = new TipoPagamentoController();
            TotalTipoPagamentoController = new TotalTipoPagamentoController();
            MovimentoController          = new MovimentoController();
            FechamentoController         = new FechamentoController();
            OperadorController           = new OperadorController();
            FormCreate();
            ComboTipoPagamento.Focus();

            //TODO:  Carregue os valores de fechamento já gravados no banco
        }