示例#1
0
        public void agregoProductoFactura(VistaFacturas _vf)
        {
            bool existe   = false;
            int  num_fila = 0;


            if (cont_fila == 0)
            {
                _vf.dgvFactura.Rows.Add(_cpf.txtCodigo.Text, _cpf.txtDescripcion.Text, _cpf.txtPrecio.Text, _cpf.txtCantidad.Text);

                double precio   = Convert.ToDouble(_vf.dgvFactura.Rows[cont_fila].Cells[2].Value);
                double cantidad = Convert.ToDouble(_vf.dgvFactura.Rows[cont_fila].Cells[3].Value);

                double importe = precio * cantidad;

                _vf.dgvFactura.Rows[cont_fila].Cells[4].Value = importe;

                cont_fila++;

                _vf.txtCantProd.Text = (_vf.dgvFactura.RowCount).ToString();
            }
            else
            {
                foreach (DataGridViewRow Fila in _vf.dgvFactura.Rows)
                {
                    if (Fila.Cells[0].Value.ToString() == _cpf.txtCodigo.Text)
                    {
                        existe   = true;
                        num_fila = Fila.Index;
                    }
                }

                if (existe == true)
                {
                    _vf.dgvFactura.Rows[num_fila].Cells[3].Value = (Convert.ToInt32(_cpf.txtCantidad.Text) + Convert.ToInt32(_vf.dgvFactura.Rows[num_fila].Cells[3].Value)).ToString();


                    double importe = (Convert.ToDouble(_vf.dgvFactura.Rows[num_fila].Cells[2].Value) * Convert.ToDouble(_vf.dgvFactura.Rows[num_fila].Cells[3].Value));


                    _vf.dgvFactura.Rows[num_fila].Cells[4].Value = importe;


                    _vf.txtCantProd.Text = (_vf.dgvFactura.RowCount).ToString();
                }
                else
                {
                    num_fila = _vf.dgvFactura.Rows.Add(_cpf.txtCodigo.Text, _cpf.txtDescripcion.Text, _cpf.txtPrecio.Text, _cpf.txtCantidad.Text);

                    double importe = (Convert.ToDouble(_vf.dgvFactura.Rows[num_fila].Cells[2].Value) * Convert.ToDouble(_vf.dgvFactura.Rows[num_fila].Cells[3].Value));

                    _vf.dgvFactura.Rows[num_fila].Cells[4].Value = importe;

                    cont_fila++;
                }

                _vf.txtCantProd.Text = (_vf.dgvFactura.RowCount).ToString();
            }
            sacoTotal(_vf);
        }
        public void controloFacturaYhabilito2doTab(VistaFacturas _vf)
        {
            if (_vf.dgvFactura.Rows.Count <= 0)
            {
                ((Control)_vf.formaDePago).Enabled   = false;
                ((Control)_vf.Observaciones).Enabled = false;
                _vf.btnGeneroRemito.Enabled          = false;

                if (_vf.cmbFormaDePago.SelectedIndex == 0)
                {
                    _vf.panelEfectivo.Visible = false;
                }


                if (_vf.cmbFormaDePago.SelectedIndex == 1)
                {
                    _vf.panelTC.Visible       = false;
                    _vf.panelTarjetaC.Visible = false;
                }

                if (_vf.cmbFormaDePago.SelectedIndex == 2)
                {
                    _vf.panelFacturaCuotas.Visible = false;
                }
            }
            else
            {
                ((Control)_vf.formaDePago).Enabled   = true;
                ((Control)_vf.Observaciones).Enabled = true;
                _vf.btnGeneroRemito.Enabled          = true;
            }
        }
示例#3
0
 public void habilitoConfirmar(VistaFacturas _vf)
 {
     if (_vf.cmbBoxTipoCliente.SelectedIndex == 0)
     {
         _vf.btnConfirmarFacturaRegis.Visible = true;
         _vf.btnConfirmarFacturaRegis.Enabled = true;
     }
 }
示例#4
0
        //------------------------------------------------------------------------------------------------------------------------------
        public void traigoDatosnecesarios(VistaFacturas _vf)
        {
            _vfcc.dtpFechaInicial.Text = _vf.dtpFacturaFecha.Text;

            _vfcc.dtpFechaVto.Text = _vf.dtpFacturaFecha.Text;

            _vfcc.txtNroFactura.Text = _vf.txtNroFactura.Text;
            _vf.txtSaldo.Text        = _vf.txtNetoImp.Text;
        }
        public vistaEncabezadoFacturaController(VistaFacturas vf)
        {
            _fac_dao = new FacturasDao();

            _vf = vf;

            _pf_ctr = new productosFacturaController(_vf);

            _vfcc = new vistaFacturaCuotasCC_Controller(_vf);
        }
 public void agregoDatosTarjeta(VistaFacturas _vf)
 {
     if (_vf.txtNombreC.Text != "" && _vf.txtBanco.Text != "" && _vf.txtEmpresaTarjeta.Text != "")
     {
         if (_vf.txtImporte4.Text == "" && _vf.txtImporte5.Text == "" && _vf.txtImporte6.Text == "")
         {
             _vf.txtObservaciones.Text = (" El Cliente abono el/los productos con tarjeta de credito, en 3 cuotas con un recargo del 2.5%." +
                                          " Cada cuota tiene un valor de $ " + _vf.txtImporte1.Text) +
                                         "\n" + "\n" + " Titular Tarjeta: " + _vf.txtNombreC.Text.ToUpper() + "\n" + " Empresa tarjeta: " + _vf.txtEmpresaTarjeta.Text.ToUpper() + "\n" + " Banco: " + _vf.txtBanco.Text.ToUpper();
         }
         else
         {
             _vf.txtObservaciones.Text = (" El Cliente abono el/los productos con tarjeta de credito, en 6 cuotas con un recargo del 5%." +
                                          " Cada cuota tiene un valor de $ " + _vf.txtImporte1.Text) +
                                         "\n" + "\n" + " Titular Tarjeta: " + _vf.txtNombreC.Text.ToUpper() + "\n" + " Empresa tarjeta: " + _vf.txtEmpresaTarjeta.Text.ToUpper() + "\n" + " Banco: " + _vf.txtBanco.Text.ToUpper();
         }
     }
 }
示例#7
0
        public void bindDataCliente(VistaFacturas _vf)
        {
            _vf.txtIDCliente.Text  = _ccf.dgvClientesFactura.CurrentRow.Cells[0].Value.ToString();
            _vf.txtDNICliente.Text = _ccf.dgvClientesFactura.CurrentRow.Cells[1].Value.ToString();


            _vf.txtCuit.Text = _ccf.dgvClientesFactura.CurrentRow.Cells[2].Value.ToString();

            _vf.txtSitIVA.Text = _ccf.dgvClientesFactura.CurrentRow.Cells[6].Value.ToString();

            _vf.txtNombreCliente.Text = _ccf.dgvClientesFactura.CurrentRow.Cells[3].Value.ToString() + ' ' + _ccf.dgvClientesFactura.CurrentRow.Cells[4].Value.ToString();
            _vf.txtDomicilio.Text     = obtengoLetrasString(_ccf.dgvClientesFactura.CurrentRow.Cells[5].Value.ToString().ToUpper());
            _vf.txtNroDomicilio.Text  = obtengoNumerosString(_ccf.dgvClientesFactura.CurrentRow.Cells[5].Value.ToString());

            _ccf.Close();

            _vf.txtSitIVA.Enabled = true;

            _vf.btnAgregarProducto.Enabled = true;
        }
        public decimal calculoImporteXCuota(VistaFacturas _vf)
        {
            decimal recargoCuota;
            decimal importe = Convert.ToDecimal(_vf.txtEfectivo.Text);

            if (_ft.cmbBoxCantCuotas.SelectedIndex == 0)
            {
                decimal ImportePorcuota = importe / 3;

                recargoCuota = (ImportePorcuota * 0.0235M) + ImportePorcuota;

                return(recargoCuota);
            }
            else
            {
                decimal ImportePorcuota = importe / 6;

                recargoCuota = (ImportePorcuota * 0.05M) + ImportePorcuota;

                return(recargoCuota);
            }
        }
示例#9
0
        public void sacoTotal(VistaFacturas _vf)
        {
            //VOY SUMANDO TOTAL DE LOS IMPORTES DE CADA PRODUCTO

            foreach (DataGridViewRow dgv in _vf.dgvFactura.Rows)
            {
                if (dgv.Index == 0)
                {
                    if (_vf.txtSitIVA.Text == "RESPONSABLE INSCRIPTO")
                    {
                        neto = Convert.ToDecimal(dgv.Cells[4].Value);



                        _vf.txtNeto.Text = neto.ToString("N");

                        _vf.txtRecuperoValorOr.Text = neto.ToString("N");

                        total = Math.Round(neto, 2);

                        _vf.txtTotal.Text           = total.ToString("N");
                        _vf.txtTotalFormaDpago.Text = total.ToString("N");
                        _vf.txtEfectivo.Text        = total.ToString("N");
                        _vf.txtNetoImp.Text         = total.ToString("N");

                        _vf.txtIVA.Text = "0 %";
                    }
                    else
                    {
                        neto = Convert.ToDecimal(dgv.Cells[4].Value);

                        _vf.txtNeto.Text = neto.ToString("N");

                        _vf.txtRecuperoValorOr.Text = neto.ToString("N");

                        total = Math.Round((neto * 0.21M) + neto, 2);

                        _vf.txtTotal.Text           = total.ToString("N");
                        _vf.txtTotalFormaDpago.Text = total.ToString("N");
                        _vf.txtEfectivo.Text        = total.ToString("N");
                        _vf.txtNetoImp.Text         = total.ToString("N");

                        _vf.txtIVA.Text = "21 %";
                    }
                }
                else
                {
                    if (_vf.txtSitIVA.Text == "RESPONSABLE INSCRIPTO")
                    {
                        _vf.txtIVA.Text = "0 %";

                        neto = Convert.ToDecimal(dgv.Cells[4].Value) + Convert.ToDecimal(_vf.txtNeto.Text);

                        _vf.txtNeto.Text = neto.ToString();

                        total = Math.Round(neto, 2);

                        _vf.txtRecuperoValorOr.Text = neto.ToString("N");
                        _vf.txtNetoImp.Text         = total.ToString("N");
                        _vf.txtTotal.Text           = total.ToString("N");
                        _vf.txtTotalFormaDpago.Text = total.ToString("N");
                        _vf.txtEfectivo.Text        = total.ToString("N");
                    }
                    else
                    {
                        _vf.txtIVA.Text = "21 %";

                        neto = Convert.ToDecimal(dgv.Cells[4].Value) + Convert.ToDecimal(_vf.txtNeto.Text);

                        _vf.txtNeto.Text = neto.ToString();

                        total = Math.Round((neto * 0.21M) + neto, 2);

                        _vf.txtRecuperoValorOr.Text = neto.ToString("N");
                        _vf.txtNetoImp.Text         = total.ToString("N");
                        _vf.txtTotal.Text           = total.ToString("N");
                        _vf.txtTotalFormaDpago.Text = total.ToString("N");
                        _vf.txtEfectivo.Text        = total.ToString("N");
                    }
                }
            }
        }
示例#10
0
 public clientesFacturaController(VistaFacturas vf)
 {
     _vf = vf;
 }
示例#11
0
 public VentanaPrincipal(VistaFacturas vf)
 {
     vistaf = vf;
 }
示例#12
0
        private void btnFacturacion_Click(object sender, EventArgs e)
        {
            VistaFacturas VF = new VistaFacturas(_user.Username);

            VF.Show();
        }
示例#13
0
 public LoginForm(VistaFacturas vf)
 {
     _vf = vf;
 }
        //-----------------------------------------------------------------------------------------------------------------------------------------

        //FUNCION QUE CALCULA LAS CUOTAS EN CASO DE SELECCIONAR FORMA DE PAGO TARJETA DE CREDITO
        public void pagoTarjetaCalculoCuotas(VistaFacturas _vf)
        {
            decimal cuotaIndividual;

            //EN CASO DE SELECCIONAR 3 CUOTAS
            if (_ft.cmbBoxCantCuotas.SelectedIndex == 0)
            {
                //HABILITO BOTON DE CONFIRMAR FACTURA CLIENTES EVENTUALES


                _vf.btnConfirmarFacturaRegis.Visible = true;
                _vf.btnConfirmarFacturaRegis.Enabled = true;


                _vf.formaDePago.Enabled = true;

                _vf.txtImporteAbonado.Enabled = false;

                _vf.txtNombreC.Text        = "";
                _vf.txtBanco.Text          = "";
                _vf.txtEmpresaTarjeta.Text = "";

                _vf.txtImporte1.Enabled = false;
                _vf.txtImporte2.Enabled = false;
                _vf.txtImporte3.Enabled = false;
                _vf.txtImporte4.Enabled = false;
                _vf.txtImporte5.Enabled = false;
                _vf.txtImporte6.Enabled = false;
                _vf.txtFechaC1.Enabled  = false;
                _vf.txtFechaC2.Enabled  = false;
                _vf.txtFechaC3.Enabled  = false;
                _vf.txtFechaC4.Enabled  = false;
                _vf.txtFechaC5.Enabled  = false;
                _vf.txtFechaC6.Enabled  = false;

                _vf.txtRecargo.Text = "2.35%";

                //CUOTA 1
                _vf.txtImporte1.Text = Math.Round(calculoImporteXCuota(_vf), 2).ToString();

                //CUOTA 2
                _vf.txtImporte2.Text = Math.Round(calculoImporteXCuota(_vf), 2).ToString();

                //CUOTA 3
                _vf.txtImporte3.Text = Math.Round(calculoImporteXCuota(_vf), 2).ToString();

                _vf.txtImporte4.Text = "";
                _vf.txtImporte5.Text = "";
                _vf.txtImporte6.Text = "";


                _vf.dtpFacturaFecha.Text = DateTime.Today.ToString();

                DateTime fecha1 = Convert.ToDateTime(_vf.dtpFacturaFecha.Text).AddMonths(1);
                DateTime fecha2 = Convert.ToDateTime(fecha1).AddMonths(1);
                DateTime fecha3 = Convert.ToDateTime(fecha2).AddMonths(1);

                _vf.txtFechaC1.Text = fecha1.ToShortDateString();
                _vf.txtFechaC2.Text = fecha2.ToShortDateString();
                _vf.txtFechaC3.Text = fecha3.ToShortDateString();
                _vf.txtFechaC4.Text = "";
                _vf.txtFechaC5.Text = "";
                _vf.txtFechaC6.Text = "";


                _vf.txtObservaciones.Text = " El Cliente abono el/los productos con tarjeta de credito, en 3 cuotas con un recargo del 2.5%." +
                                            " Cada cuota tiene un valor de $ " + _vf.txtImporte1.Text;


                _vf.txtObservaciones.Enabled = false;


                cuotaIndividual = Math.Round(Convert.ToDecimal(_vf.txtImporte1.Text) * 3, 2);

                _vf.txtTotal.Text           = cuotaIndividual.ToString();
                _vf.txtTotalFormaDpago.Text = cuotaIndividual.ToString();

                _ft.Close();
            }

            //EN CASO DE SELECCIONAR 6 CUOTAS
            else
            {
                _vf.formaDePago.Enabled = true;

                _vf.txtImporteAbonado.Enabled = false;


                _vf.txtNombreC.Text        = "";
                _vf.txtBanco.Text          = "";
                _vf.txtEmpresaTarjeta.Text = "";

                _vf.txtImporte1.Enabled = false;
                _vf.txtImporte2.Enabled = false;
                _vf.txtImporte3.Enabled = false;
                _vf.txtImporte4.Enabled = false;
                _vf.txtImporte5.Enabled = false;
                _vf.txtImporte6.Enabled = false;

                _vf.txtFechaC1.Enabled = false;
                _vf.txtFechaC2.Enabled = false;
                _vf.txtFechaC3.Enabled = false;
                _vf.txtFechaC4.Enabled = false;
                _vf.txtFechaC5.Enabled = false;
                _vf.txtFechaC6.Enabled = false;

                _vf.txtRecargo.Text = "5%";

                //CUOTA 1
                _vf.txtImporte1.Text = Math.Round(calculoImporteXCuota(_vf), 2).ToString();
                //CUOTA 2
                _vf.txtImporte2.Text = Math.Round(calculoImporteXCuota(_vf), 2).ToString();
                //CUOTA 3
                _vf.txtImporte3.Text = Math.Round(calculoImporteXCuota(_vf), 2).ToString();
                //CUOTA 4
                _vf.txtImporte4.Text = Math.Round(calculoImporteXCuota(_vf), 2).ToString();
                //CUOTA 5
                _vf.txtImporte5.Text = Math.Round(calculoImporteXCuota(_vf), 2).ToString();
                //CUOTA 6
                _vf.txtImporte6.Text = Math.Round(calculoImporteXCuota(_vf), 2).ToString();


                _vf.dtpFacturaFecha.Text = DateTime.Today.AddMonths(1).ToString();

                DateTime fecha1 = Convert.ToDateTime(_vf.dtpFacturaFecha.Text).AddMonths(1);
                DateTime fecha2 = Convert.ToDateTime(fecha1).AddMonths(1);
                DateTime fecha3 = Convert.ToDateTime(fecha2).AddMonths(1);
                DateTime fecha4 = Convert.ToDateTime(fecha3).AddMonths(1);
                DateTime fecha5 = Convert.ToDateTime(fecha4).AddMonths(1);
                DateTime fecha6 = Convert.ToDateTime(fecha5).AddMonths(1);

                _vf.txtFechaC1.Text = fecha1.ToShortDateString();
                _vf.txtFechaC2.Text = fecha2.ToShortDateString();
                _vf.txtFechaC3.Text = fecha3.ToShortDateString();
                _vf.txtFechaC4.Text = fecha4.ToShortDateString();
                _vf.txtFechaC5.Text = fecha5.ToShortDateString();
                _vf.txtFechaC6.Text = fecha6.ToShortDateString();


                _vf.txtObservaciones.Text = (" El Cliente abono el/los productos con tarjeta de credito, en 6 cuotas con un recargo del 5%." +
                                             " Cada cuota tiene un valor de $ " + _vf.txtImporte1.Text);

                _vf.txtObservaciones.Enabled = false;

                cuotaIndividual = Math.Round(Convert.ToDecimal(_vf.txtImporte1.Text) * 6, 2);

                _vf.txtTotal.Text           = cuotaIndividual.ToString();
                _vf.txtTotalFormaDpago.Text = cuotaIndividual.ToString();

                _ft.Close();
            }
        }
示例#15
0
 public FacturasDao(VistaFacturas vf)
 {
     _vf = vf;
 }
示例#16
0
        public void pagoCC_CalculoCuotas_Observaciones(VistaFacturas _vf)
        {
            //EN CASO DE SELECCIONAR 6 CUOTAS
            if (_vfcc.cmbBoxCantCuotas.SelectedIndex == 0)
            {
                //_vf.txtRecargoCC.Text = "2.5%";



                _vf.txtObservaciones.Text =

                    " Cantidad de cuotas que va a abonar el cliente: " + _vfcc.cmbBoxCantCuotas.SelectedItem.ToString() +
                    ", anticipo día: " + _vfcc.dtpFechaInicial.Text + "." + "\n"
                    + " Importe Total: $ " + _vf.txtTotal.Text + "." + "\n" +
                    " Saldo(descontando anticipacion): $ " + _vf.txtSaldoAnticipo.Text
                    + " en cuotas mensuales de $ " + _vf.txtAnticipo.Text + " c/u" + "\n" +
                    " que se abonaran a partir del dia " + _vfcc.dtpFechaInicial.Value.Day.ToString() + " hasta el día " + _vfcc.dtpFechaVto.Value.Day + " de " + _vfcc.dtpFechaVto.Value.Year + " de cada mes";



                _vf.txtObservaciones.Enabled = false;
            }

            //EN CASO DE SELECCIONAR 8 CUOTAS
            if (_vfcc.cmbBoxCantCuotas.SelectedIndex == 1)
            {
                //_vf.txtRecargoCC.Text = "5%";



                _vf.txtObservaciones.Text =

                    " Cantidad de cuotas que va a abonar el cliente: " + _vfcc.cmbBoxCantCuotas.SelectedItem.ToString() +
                    ", anticipo día: " + _vfcc.dtpFechaInicial.Text + "." + "\n"
                    + " Importe Total : $ " + _vf.txtTotal.Text + "." + "\n" +
                    " Saldo(descontando anticipacion): $ " + _vf.txtSaldoAnticipo.Text
                    + " en cuotas mensuales de $ " + _vf.txtAnticipo.Text + " c/u" + "\n" +
                    " que se abonaran a partir del dia" + _vfcc.dtpFechaInicial.Value.Day.ToString() + " hasta el día " + _vfcc.dtpFechaVto.Value.Day + " de " + _vfcc.dtpFechaVto.Value.Year + " de cada mes";

                _vf.txtObservaciones.Enabled = false;
            }

            ////EN CASO DE SELECCIONAR 8 CUOTAS
            //if (_vfcc.cmbBoxCantCuotas.SelectedIndex == 2)
            //{
            //    //_vf.txtRecargoCC.Text = "10%";



            //    _vf.txtObservaciones.Text =
            //                " Cantidad de cuotas que va a abonar el cliente: " + _vfcc.cmbBoxCantCuotas.SelectedItem.ToString() +
            //                ", anticipo día: " + _vfcc.dtpFechaInicial.Text + "." + "\n"
            //                + " Importe Total(con recargo por abonar en cuotas): $ " + _vf.txtTotal.Text + "." + "\n" +
            //                " Saldo(descontando anticipacion): $ " + _vf.txtSaldoAnticipo.Text
            //                + " en cuotas mensuales de $ " + _vf.txtAnticipo.Text + " c/u" + "\n" +
            //                " que se abonaran a partir del dia " + _vfcc.dtpFechaInicial.Value.Day.ToString() + " hasta el día " + _vfcc.dtpFechaVto.Value.Day + " de " + _vfcc.dtpFechaVto.Value.Year + " de cada mes";


            //    _vf.txtObservaciones.Enabled = false;
            //}
        }
示例#17
0
 //--------------------------------------------------------------------------------------------------------------------------------------------------
 public productosFacturaController(VistaFacturas vf)
 {
     _vf = vf;
 }
示例#18
0
        //------------------------------------------------------------------------------------------------------------------------------
        public void generoCuotasDGV(VistaFacturas _vf)
        {
            int     num_fila;
            decimal saldoFinal;

            foreach (DataGridViewRow Fila in _vf.dgvFacturaCuotas.Rows)
            {
                num_fila = Fila.Index;
            }

            if (_vfcc.cmbBoxCantCuotas.SelectedIndex >= 0)
            {
                cantidadCuotas = Convert.ToInt32(_vfcc.cmbBoxCantCuotas.SelectedValue);

                if (_vf.dgvFacturaCuotas.RowCount == 0)
                {
                    _vf.txtNeto.Text = _vf.txtRecuperoValorOr.Text;

                    _vf.dgvFacturaCuotas.Rows.Add(cantidadCuotas);

                    _vf.txtSaldo.Text = _vf.txtNetoImp.Text;

                    _vf.txtTotal.Text = _vf.txtSaldo.Text;

                    _vf.txtTotalFormaDpago.Text = _vf.txtSaldo.Text;

                    saldoFinal = Convert.ToDecimal(_vf.txtSaldo.Text);

                    for (num_fila = 0; num_fila < cantidadCuotas; num_fila++)
                    {
                        _vf.dgvFacturaCuotas.Rows[num_fila].Cells[0].Value = _vfcc.txtNroFactura.Text;

                        _vf.dgvFacturaCuotas.Rows[num_fila].Cells[1].Value = (num_fila + 1).ToString();

                        _vf.dgvFacturaCuotas.Rows[num_fila].Cells[2].Value = sacoImportexCantCuotas(_vf.txtSaldo.Text);



                        if (num_fila != 0)
                        {
                            _vfcc.dtpFechaInicial.Text = Convert.ToDateTime(_vf.dtpFacturaFecha.Text).ToShortDateString();


                            DateTime fechaInicial = Convert.ToDateTime(_vf.dgvFacturaCuotas.Rows[num_fila - 1].Cells[3].Value).AddMonths(1);

                            DateTime fechaVto = Convert.ToDateTime(_vf.dgvFacturaCuotas.Rows[num_fila - 1].Cells[4].Value).AddMonths(1);


                            _vf.dgvFacturaCuotas.Rows[num_fila].Cells[3].Value = fechaInicial.ToShortDateString();
                            _vf.dgvFacturaCuotas.Rows[num_fila].Cells[4].Value = fechaVto.ToShortDateString();

                            _vf.dgvFacturaCuotas.Rows[num_fila].Cells[5].Value             = "Pendiente";
                            _vf.dgvFacturaCuotas.Rows[num_fila].DefaultCellStyle.BackColor = Color.Red;
                            _vf.dgvFacturaCuotas.Rows[num_fila].DefaultCellStyle.ForeColor = Color.White;
                        }
                        else
                        {
                            _vf.txtAnticipo.Text = sacoImportexCantCuotas(saldoFinal.ToString());

                            _vf.txtSaldoAnticipo.Text = (saldoFinal - Convert.ToDecimal(_vf.txtAnticipo.Text)).ToString();

                            _vfcc.dtpFechaInicial.Text = _vf.dtpFacturaFecha.Text;

                            _vf.dgvFacturaCuotas.Rows[num_fila].Cells[3].Value = _vfcc.dtpFechaInicial.Text;
                            _vf.dgvFacturaCuotas.Rows[num_fila].Cells[4].Value = _vfcc.dtpFechaVto.Text;

                            _vf.dgvFacturaCuotas.Rows[num_fila].Cells[5].Value             = "Abonada";
                            _vf.dgvFacturaCuotas.Rows[num_fila].DefaultCellStyle.BackColor = Color.Blue;
                            _vf.dgvFacturaCuotas.Rows[num_fila].DefaultCellStyle.ForeColor = Color.White;
                        }
                    }
                }
                else
                {
                    _vf.txtNeto.Text = _vf.txtRecuperoValorOr.Text;

                    _vf.dgvFacturaCuotas.Rows.Clear();

                    _vf.dgvFacturaCuotas.Rows.Add(cantidadCuotas);


                    _vf.txtSaldo.Text = _vf.txtNetoImp.Text;

                    _vf.txtNetoImp.Text = _vf.txtSaldo.Text;

                    _vf.txtTotalFormaDpago.Text = _vf.txtSaldo.Text;

                    for (num_fila = 0; num_fila < cantidadCuotas; num_fila++)
                    {
                        _vf.dgvFacturaCuotas.Rows[num_fila].Cells[0].Value = _vfcc.txtNroFactura.Text;

                        _vf.dgvFacturaCuotas.Rows[num_fila].Cells[1].Value = (num_fila + 1).ToString();

                        _vf.dgvFacturaCuotas.Rows[num_fila].Cells[2].Value = sacoImportexCantCuotas(_vf.txtSaldo.Text);


                        if (num_fila != 0)
                        {
                            _vfcc.dtpFechaInicial.Text = _vf.dtpFacturaFecha.Text;
                            DateTime fechaInicial = Convert.ToDateTime(_vf.dgvFacturaCuotas.Rows[num_fila - 1].Cells[3].Value).AddMonths(1);
                            DateTime fechaVto     = Convert.ToDateTime(_vf.dgvFacturaCuotas.Rows[num_fila - 1].Cells[3].Value).AddMonths(1);


                            _vf.dgvFacturaCuotas.Rows[num_fila].Cells[3].Value = fechaInicial.ToShortDateString();
                            _vf.dgvFacturaCuotas.Rows[num_fila].Cells[4].Value = fechaVto.ToShortDateString();

                            _vf.dgvFacturaCuotas.Rows[num_fila].Cells[5].Value             = "Pendiente";
                            _vf.dgvFacturaCuotas.Rows[num_fila].DefaultCellStyle.BackColor = Color.Red;
                            _vf.dgvFacturaCuotas.Rows[num_fila].DefaultCellStyle.ForeColor = Color.White;
                        }
                        else
                        {
                            _vf.txtAnticipo.Text = sacoImportexCantCuotas(_vf.txtSaldo.Text);

                            _vf.txtSaldoAnticipo.Text = (Convert.ToDecimal(_vf.txtSaldo.Text) - Convert.ToDecimal(_vf.txtAnticipo.Text)).ToString();

                            _vfcc.dtpFechaInicial.Text = _vf.dtpFacturaFecha.Text;

                            _vf.dgvFacturaCuotas.Rows[num_fila].Cells[3].Value = _vfcc.dtpFechaInicial.Text;
                            _vf.dgvFacturaCuotas.Rows[num_fila].Cells[4].Value = _vfcc.dtpFechaVto.Text;

                            _vf.dgvFacturaCuotas.Rows[num_fila].Cells[5].Value             = "Abonada";
                            _vf.dgvFacturaCuotas.Rows[num_fila].DefaultCellStyle.BackColor = Color.Blue;
                            _vf.dgvFacturaCuotas.Rows[num_fila].DefaultCellStyle.ForeColor = Color.White;
                        }
                    }
                }
            }
        }
示例#19
0
        public vistaFacturaCuotasCC_Controller(VistaFacturas vf)
        {
            _vf = vf;

            _fac_dao = new FacturasDao();
        }
示例#20
0
 //------------------------------------------------------------------------------------------------------------------------------
 public void cambioSeleccionCuotas(VistaFacturas _vf)
 {
     _vf.txtNeto.Text = _vf.txtNetoImp.Text;
 }