Esempio n. 1
0
        public void calcularTotal()
        {
            float acumulador = 0f;

            if (controladorV.listaEntrega == null)

            {
                if (interfazTarjeta.cb_importe.Checked != true)
                {
                    float importeParcialFactura = controladorV.venta.ImporteTotal;
                    float interesTotal          = importeParcialFactura * TarjetaColeccion.ElementAt(IndiceTarjeta).Interes / 100;
                    float total = importeParcialFactura + interesTotal;

                    TarjetaColeccion.ElementAt(IndiceTarjeta).ImporteTotalVentaCalculado = total;
                    //Tarjeta.ImporteTotalVentaCalculado = total;
                }
                else
                {
                    string otroImporte0          = interfazTarjeta.txt_otroImporte.Text;
                    float  otroImporte           = float.Parse(otroImporte0);
                    float  importeParcialFactura = otroImporte;
                    float  interesTotal          = otroImporte * TarjetaColeccion.ElementAt(IndiceTarjeta).Interes / 100;
                    float  total = importeParcialFactura + interesTotal;

                    TarjetaColeccion.ElementAt(IndiceTarjeta).ImporteTotalVentaCalculado = total;

                    //Tarjeta.ImporteTotalVentaCalculado = controladorV.venta.ImporteTotal + interesTotal;
                }
            }
            else
            {
                foreach (var item in controladorV.listaEntrega)
                {
                    acumulador += item.PrecioEntrega;
                }
                if (interfazTarjeta.cb_importe.Checked != true)
                {
                    float importeParcialFactura = controladorV.venta.ImporteTotal;
                    float suma         = importeParcialFactura + acumulador;
                    float interesTotal = suma * TarjetaColeccion.ElementAt(IndiceTarjeta).Interes / 100;
                    float total        = suma + interesTotal;

                    TarjetaColeccion.ElementAt(IndiceTarjeta).ImporteTotalVentaCalculado = total;

                    // Tarjeta.ImporteTotalVentaCalculado = total;
                }
                else
                {
                    string otroImporte0          = interfazTarjeta.txt_otroImporte.Text;
                    float  otroImporte           = float.Parse(otroImporte0);
                    float  importeParcialFactura = otroImporte;
                    float  interesTotal          = otroImporte * TarjetaColeccion.ElementAt(IndiceTarjeta).Interes / 100;
                    float  total = importeParcialFactura + interesTotal;

                    TarjetaColeccion.ElementAt(IndiceTarjeta).ImporteTotalVentaCalculado = total;

                    // Tarjeta.ImporteTotalVentaCalculado = controladorV.venta.ImporteTotal + interesTotal;
                }
            }
        }
        public void calcularTotal()
        {
            /////////////// REVISAR ESTO - DEBE IR CON COUNT?//////////
            //    if (controladorV.listaEntrega.Count==0)

            //  {
            if (interfazTarjeta.cb_importe.Checked != true)
            {
                float importeParcialFactura = controladorV.saldoAPagar;
                float interesTotal          = importeParcialFactura * TarjetaColeccion.ElementAt(IndiceTarjeta).Interes / 100;
                float total = importeParcialFactura + interesTotal;

                TarjetaColeccion.ElementAt(IndiceTarjeta).ImporteTotalVentaCalculado = total;
                //Tarjeta.ImporteTotalVentaCalculado = total;
            }
            else
            {
                string otroImporte0          = interfazTarjeta.txt_otroImporte.Text;
                float  importeParcialFactura = float.Parse(otroImporte0);
                float  interesTotal          = importeParcialFactura * TarjetaColeccion.ElementAt(IndiceTarjeta).Interes / 100;
                float  total = importeParcialFactura + interesTotal;

                TarjetaColeccion.ElementAt(IndiceTarjeta).ImporteTotalVentaCalculado = total;

                //Tarjeta.ImporteTotalVentaCalculado = controladorV.venta.ImporteTotal + interesTotal;
            }

            /* }
             *        else
             *          {
             *              foreach (var item in controladorV.listaEntrega)
             *              {
             *                  acumulador += item.PrecioEntrega;
             *              }
             *              if (interfazTarjeta.cb_importe.Checked != true)
             *              {
             *                  float importeParcialFactura = controladorV.venta.ImporteTotal;
             *                  float suma = importeParcialFactura + acumulador;
             *                  float interesTotal = suma * TarjetaColeccion.ElementAt(IndiceTarjeta).Interes / 100;
             *                  float total = suma + interesTotal;
             *
             *                  TarjetaColeccion.ElementAt(IndiceTarjeta).ImporteTotalVentaCalculado = total;
             *
             *                 // Tarjeta.ImporteTotalVentaCalculado = total;
             *
             *              }
             *              else
             *              {
             *                  string otroImporte0 = interfazTarjeta.txt_otroImporte.Text;
             *                  float otroImporte = float.Parse(otroImporte0);
             *                  float importeParcialFactura = otroImporte;
             *                  float interesTotal = otroImporte * TarjetaColeccion.ElementAt(IndiceTarjeta).Interes / 100;
             *                  float total = importeParcialFactura + interesTotal;
             *
             *                  TarjetaColeccion.ElementAt(IndiceTarjeta).ImporteTotalVentaCalculado = total;
             *
             *                  // Tarjeta.ImporteTotalVentaCalculado = controladorV.venta.ImporteTotal + interesTotal;
             *              }
             * }*/
        }
        public void opcionCalcularTomado()
        {
            if (validacion.campoVacio(interfazTarjeta.txt_interes.Text))
            {
                MessageBox.Show("No ingreso el interes", "Advertencia", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }

            else
            if (interfazTarjeta.cb_importe.Checked != true)
            {
                string importe = interfazTarjeta.lbl_importeFactura.Text;
                float  importeParcialFactura = float.Parse(importe);
                interfazTarjeta.tomarPorcentajeInteres();
                float interesTotal = importeParcialFactura * TarjetaColeccion.ElementAt(IndiceTarjeta).Interes / 100;
                float total        = importeParcialFactura + interesTotal;
                interfazTarjeta.lbl_importeTotal.Text = total.ToString("0.00");
            }
            else
            {
                string otroImporte0          = interfazTarjeta.txt_otroImporte.Text;
                float  otroImporte           = float.Parse(otroImporte0);
                float  importeParcialFactura = otroImporte;
                interfazTarjeta.tomarPorcentajeInteres();
                float interesTotal = importeParcialFactura * TarjetaColeccion.ElementAt(IndiceTarjeta).Interes / 100;
                float total        = importeParcialFactura + interesTotal;
                interfazTarjeta.lbl_importeTotal.Text = total.ToString("0.00");
            }
        }
Esempio n. 4
0
 public void cantidadTarjeta(int cantidadTarjeta)
 {
     for (int i = 0; i < cantidadTarjeta; i++)
     {
         TarjetaColeccion.Add(new Tarjeta()
         {
             CodigoTarjeta = i + 1
         });
     }
 }
Esempio n. 5
0
        public void opcionCalcularTomado()
        {
            float acumulador = 0f;

            if (validacion.campoVacio(interfazTarjeta.txt_interes.Text))
            {
                MessageBox.Show("No ingreso el interes", "Advertencia", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }

            else if (controladorV.listaEntrega == null)

            {
                if (interfazTarjeta.cb_importe.Checked != true)
                {
                    float importeParcialFactura = controladorV.venta.ImporteTotal;
                    interfazTarjeta.tomarPorcentajeInteres();
                    float interesTotal = importeParcialFactura * TarjetaColeccion.ElementAt(IndiceTarjeta).Interes / 100;
                    float total        = importeParcialFactura + interesTotal;
                    interfazTarjeta.lbl_importeTotal.Text = total.ToString("0.00");
                }
                else
                {
                    string otroImporte0          = interfazTarjeta.txt_otroImporte.Text;
                    float  otroImporte           = float.Parse(otroImporte0);
                    float  importeParcialFactura = otroImporte;
                    interfazTarjeta.tomarPorcentajeInteres();
                    float interesTotal = importeParcialFactura * TarjetaColeccion.ElementAt(IndiceTarjeta).Interes / 100;
                    float total        = importeParcialFactura + interesTotal;
                    interfazTarjeta.lbl_importeTotal.Text = total.ToString("0.00");
                }
            }

            else
            {
                if (interfazTarjeta.cb_importe.Checked != true)
                {
                    foreach (var item in controladorV.listaEntrega)
                    {
                        acumulador += item.PrecioEntrega;
                    }

                    float importeParcialFactura = controladorV.venta.ImporteTotal;
                    interfazTarjeta.tomarPorcentajeInteres();
                    float suma         = importeParcialFactura + acumulador;
                    float interesTotal = suma * TarjetaColeccion.ElementAt(IndiceTarjeta).Interes / 100;
                    float total        = suma + interesTotal;
                    interfazTarjeta.lbl_importeTotal.Text = total.ToString("0.00");
                }

                else
                {
                    foreach (var item in controladorV.listaEntrega)
                    {
                        acumulador += item.PrecioEntrega;
                    }

                    string otroImporte0          = interfazTarjeta.txt_otroImporte.Text;
                    float  otroImporte           = float.Parse(otroImporte0);
                    float  importeParcialFactura = otroImporte;
                    interfazTarjeta.tomarPorcentajeInteres();
                    float interesTotal = importeParcialFactura * TarjetaColeccion.ElementAt(IndiceTarjeta).Interes / 100;
                    float total        = importeParcialFactura + interesTotal;
                    interfazTarjeta.lbl_importeTotal.Text = total.ToString("0.00");
                }
            }
        }