public frmLineaManual(frmNewVenta frmPOS)
 {
     InitializeComponent();
     this.frmPos = frmPOS;
 }
예제 #2
0
 public frmSelecVenta(frmNewVenta pos, DocumentoModel doc)
 {
     InitializeComponent();
     this.pos       = pos;
     this.documento = doc;
 }
예제 #3
0
 public frmBuscaCliente(frmNewVenta frmPOS)
 {
     InitializeComponent();
     frm = frmPOS;
 }
 public frmBuscaProductos(frmNewVenta frmPOS)
 {
     InitializeComponent();
     this.frmPos = frmPOS;
     config.getConfig();
 }
예제 #5
0
        public void getDoc(int tipo, int folio)
        {
            DocumentoModel documento = new DocumentoModel();

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

            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             = "Tipo Documento: " + nombreDoc + " Folio: " + folio;
            pos.textBoxOC.Text              = documento.NroOrdenCompra;
            pos.dateTimePickerFchEmis.Value = Convert.ToDateTime(documento.FchEmis);
            pos.textBoxCita.Text            = documento.NroCita;
            pos.textBoxSello.Text           = documento.Sello;
            pos.textBoxFormaPago.Text       = documento.formaPago;
            // 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     = detalle.PrcItem.ToString();
                pos.dtgwDetalle.Rows[n].Cells["precio"].Value          = detalle.PrcBruItem.ToString("N0", CultureInfo.CreateSpecificCulture("es-ES"));
                pos.dtgwDetalle.Rows[n].Cells["cantidad"].Value        = detalle.QtyItem.ToString("N0", CultureInfo.CreateSpecificCulture("es-ES")).Replace(",", ".");
                pos.dtgwDetalle.Rows[n].Cells["unmditem"].Value        = detalle.UnmdItem;
                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";
                    pos.dtgwDetalle.Rows[n].Cells["Total_Neto"].Value = "";
                }
                else
                {
                    pos.dtgwDetalle.Rows[n].Cells["exento"].Value = "False";
                }
                if (detalle.DscItem != null)
                {
                    pos.dtgwDetalle.Rows[n].Cells["DscItem"].Value = detalle.DscItem.ToString();
                }
            }
            // 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();
        }