public void getDoc(int tipo, int folio)
        {
            DocumentoModel documento = new DocumentoModel();

            documento = documento.getDocumento(tipo, folio);
            frmPuntoVenta pos = new frmPuntoVenta(documento);

            pos.textBoxRutRecep.Text     = documento.RUTRecep;
            pos.textBoxRutRecep.Enabled  = false;
            pos.labelRznSocRecep.Text    = documento.RznSocRecep;
            pos.labelGiroRecep.Text      = documento.GiroRecep;
            pos.labelTelefonoRecep.Text  = documento.TelRecep;
            pos.labelDireccionRecep.Text = documento.DirRecep;
            pos.labelCiudadRecep.Text    = documento.CiudadRecep;
            pos.labelComunaRecep.Text    = documento.CmnaRecep;
            pos.lblNomForm.Text          = nombreDoc;

            // Cargo Detalle
            foreach (Detalle detalle in documento.detalle)
            {
                Int32 n = pos.dtgwDetalle.Rows.Add();
                pos.dtgwDetalle.Rows[n].Cells["elimina"].Value         = "-";
                pos.dtgwDetalle.Rows[n].Cells["item"].Value            = n + 1;
                pos.dtgwDetalle.Rows[n].Cells["codigo"].Value          = detalle.VlrCodigo;
                pos.dtgwDetalle.Rows[n].Cells["nombre"].Value          = detalle.NmbItem;
                pos.dtgwDetalle.Rows[n].Cells["Precio_Neto"].Value     = Decimal.Round(detalle.PrcItem);
                pos.dtgwDetalle.Rows[n].Cells["precio"].Value          = detalle.PrcBruItem.ToString("N0", CultureInfo.CreateSpecificCulture("es-ES"));
                pos.dtgwDetalle.Rows[n].Cells["cantidad"].Value        = detalle.QtyItem;
                pos.dtgwDetalle.Rows[n].Cells["desc"].Value            = detalle.DescuentoPct;
                pos.dtgwDetalle.Rows[n].Cells["Monto_Descuento"].Value = detalle.DescuentoMonto.ToString("N0", CultureInfo.CreateSpecificCulture("es-ES"));
                pos.dtgwDetalle.Rows[n].Cells["Total_Neto"].Value      = detalle.MontoItem.ToString("N0", CultureInfo.CreateSpecificCulture("es-ES"));
                pos.dtgwDetalle.Rows[n].Cells["total"].Value           = detalle.MontoBruItem.ToString("N0", CultureInfo.CreateSpecificCulture("es-ES"));
                if (detalle.IndExe == "1")
                {
                    pos.dtgwDetalle.Rows[n].Cells["exento"].Value = "True";
                }
                else
                {
                    pos.dtgwDetalle.Rows[n].Cells["exento"].Value = "False";
                }
            }
            // Cargo Totales
            //pos.textBoxDctoGlobal.Text = documento.dscRcgGlobal; // TODO
            pos.labelSubTotal.Text  = documento.MntNeto.ToString("N0", CultureInfo.CreateSpecificCulture("es-ES"));
            pos.labelMtoExento.Text = documento.MntExe.ToString("N0", CultureInfo.CreateSpecificCulture("es-ES"));
            pos.labelIva.Text       = documento.IVA.ToString("N0", CultureInfo.CreateSpecificCulture("es-ES"));
            //pos.labelImpAdic.Text = documento.imptoReten; // TODO
            pos.labelMtoTotal.Text = documento.MntTotal.ToString("N0", CultureInfo.CreateSpecificCulture("es-ES"));
            //Cargo las referencias

            pos.ShowDialog();
        }
 public frmBuscaCliente(frmPuntoVenta frmPOS)
 {
     InitializeComponent();
     frm = frmPOS;
 }
Esempio n. 3
0
 public frmBuscaProductos(frmPuntoVenta frmPOS)
 {
     InitializeComponent();
     this.frmPos = frmPOS;
     config.getConfig();
 }
Esempio n. 4
0
 public frmSelecVenta(frmPuntoVenta pos)
 {
     InitializeComponent();
     this.pos = pos;
 }