Ejemplo n.º 1
0
        public List<BESVTD_COTI> Get_SVPR_DETA(BESVTD_COTI oBe)
        {
            if (HttpContext.Current.Session["COD_COMP"] == null)
                return new List<BESVTD_COTI>();

            var oBr = new BRSVTD_COTI();

            oBe.COD_TIPO_DOCU = 1;
            var oList = oBr.Get_SVPR_COTI_DETA_LIST(oBe);

            return oList;
        }
Ejemplo n.º 2
0
 /// <summary>
 /// OBTENER EL RESULTADO DE CUALQUIER CONSULTA
 /// </summary>
 /// <param name="oBe"></param>
 /// <returns></returns>
 public List<BESVTD_COTI> Get_SVPR_COTI_GROU_DETA_LIST(BESVTD_COTI oBe)
 {
     try
     {
         using (IDataReader oDr = oDa.Get_SVPR_COTI_GROU_DETA_LIST(oBe))
         {
             List<BESVTD_COTI> oList = new List<BESVTD_COTI>();
             IList iList = oList;
             ((IList)iList).LoadFromReader<BESVTD_COTI>(oDr);
             Dispose(false);
             return (oList);
         }
     }
     catch (Exception ex)
     {
         throw new ArgumentException(ex.Message);
     }
 }
Ejemplo n.º 3
0
        public IDataReader Get_SVPR_COTI_DETA_LIST(BESVTD_COTI oBe)
        {
            var ALF_NOMB_PROC = "";
            if (oBe.COD_TIPO_DOCU == 1)
                ALF_NOMB_PROC = "SVPR_COTI_DETA_LIST";
            else if (oBe.COD_TIPO_DOCU == 2)
                ALF_NOMB_PROC = "SVPR_OVEN_DETA_LIST";
            else if (oBe.COD_TIPO_DOCU == 3)
                ALF_NOMB_PROC = "SVPR_GREM_DETA_LIST";
            else if (oBe.COD_TIPO_DOCU == 4)
                ALF_NOMB_PROC = "SVPR_DVEN_DETA_LIST";
            else if (oBe.COD_TIPO_DOCU == 5)
                ALF_NOMB_PROC = "SVPR_NCRE_DETA_LIST";

            try
            {
                if (ocn.State == ConnectionState.Closed) ocn.Open();
                var ocmd = odb.GetStoredProcCommand(ALF_NOMB_PROC,
                                                                    oBe.COD_COTI,
                                                                    oBe.COD_ARTI,
                                                                    oBe.ALF_ARTI,
                                                                    oBe.NUM_PREC_UNIT,
                                                                    oBe.NUM_PORC_DESC,
                                                                    oBe.NUM_DESC,
                                                                    oBe.NUM_CANT,
                                                                    oBe.NUM_STOC_REAL,
                                                                    oBe.NUM_STOC_VIRT,
                                                                    oBe.NUM_IMPO,
                                                                    oBe.COD_USUA_CREA,
                                                                    oBe.COD_USUA_MODI,
                                                                    oBe.NUM_ACCI);
                ocmd.CommandTimeout = 2000;
                var odr = odb.ExecuteReader(ocmd);
                Dispose(false);
                return (odr);
            }
            finally
            {
                ocn.Close();
            }
        }
Ejemplo n.º 4
0
        /// <summary>
        /// INVOCAR EL CUADRO DE BUSQUEDA PARA LA NOTA DE CREDITO
        /// </summary>
        public void SearchSalesCreditNote()
        {
            ClearControl();
            using (var oForm = new xfSearchQuote(5, SESSION_COMP))
            {
                if (oForm.ShowDialog() == DialogResult.OK)
                {
                    LoadBranch(oForm.oBe.COD_SOCI_NEGO);
                    txtCOD_SOCI_NEGO.Text = oForm.oBe.COD_SOCI_NEGO.ToString();
                    beALF_NOMB.Text = oForm.oBe.ALF_NOMB;
                    txtALF_DIRE_FISC.Text = oForm.oBe.ALF_DIRE;
                    txtALF_TELE.Text = "";
                    txtALF_FAXX.Text = "";
                    txtALF_CONT.Text = oForm.oBe.ALF_CONT;
                    lueCOD_SUCU.EditValue = oForm.oBe.COD_SUCU;
                    txtNUM_DESC.Text = oForm.oBe.NUM_DESC.ToString("#,##0.00");
                    txtALF_NUME_FACT.Text = oForm.oBe.ALF_NUME_DOCU;
                    beALF_GUIA_REMI_STOR.Text = oForm.oBe.ALF_NUME_DOCU;
                    COD_DVEN = oForm.oBe.COD_DVEN;
                    txtNUM_NCRE.Text = oForm.oBe.COD_NCRE.ToString();
                    deFEC_REGI.EditValue = oForm.oBe.FEC_REGI;
                    deFEC_DOCU.EditValue = oForm.oBe.FEC_DOCU;
                    deFEC_VENC.EditValue = oForm.oBe.FEC_PAGO;
                    txtALF_ESTA.Text = oForm.oBe.ALF_ESTA;
                    lueCOD_MONE.EditValue = oForm.oBe.COD_MONE;
                    lueALF_SERI.EditValue = oForm.oBe.ALF_SERI;
                    txtNUM_CORR.Text = oForm.oBe.NUM_CORR.ToString("0000000");
                    lueCOD_ALMA.EditValue = oForm.oBe.COD_ALMA;
                    txtALF_NUME_IDEN.Text = oForm.oBe.ALF_NUME_IDEN;
                    chkIGV.Checked = oForm.oBe.IND_IMPU;
                    chkIND_LIQU.Checked = oForm.oBe.IND_LIQU;

                    meALF_OBSE.Text = oForm.oBe.ALF_OBSE;
                    lblALF_SONN.Text = oForm.oBe.ALF_TOTA;

                    txtNUM_SUBT.Text = oForm.oBe.NUM_SUBT.ToString("#,##0.00");
                    txtNUM_IGVV.Text = oForm.oBe.NUM_IGVV.ToString("#,##0.00");
                    txtNUM_TOTA.Text = oForm.oBe.NUM_TOTA.ToString("#,##0.00");

                    var oBeSu = new BESVMD_SOCI_NEGO_SUCU();
                    var oBrSu = new BRSVMD_SOCI_NEGO_SUCU();

                    oBeSu.NUM_ACCI = 5;
                    oBeSu.COD_SOCI_NEGO = oForm.oBe.COD_SOCI_NEGO;
                    var oListTC = oBrSu.Get_SVPR_SOCI_NEGO_SUCU_LIST(oBeSu);

                    lueCOD_SUCU.Properties.DataSource = oListTC;
                    lueCOD_SUCU.Properties.Columns.Clear();
                    lueCOD_SUCU.Properties.Columns.Add(new LookUpColumnInfo("ALF_SUCU", 100, "Sucursal"));
                    lueCOD_SUCU.Properties.DisplayMember = "ALF_SUCU";
                    lueCOD_SUCU.Properties.ValueMember = "COD_SOCI_NEGO_SUCU";
                    lueCOD_SUCU.EditValue = oForm.oBe.COD_SUCU;

                    var oBe = new BESVTD_COTI();
                    var oBr = new BRSVTD_COTI();

                    oBe.COD_COTI = oForm.oBe.COD_DVEN;
                    oBe.NUM_ACCI = 5;
                    oBe.COD_TIPO_DOCU = 4;
                    var oList = oBr.Get_SVPR_COTI_DETA_LIST(oBe);

                    oList.ForEach(obj =>
                    {
                        oListArti.Add(obj);
                    });
                    gdvArticles.RefreshData();

                    var oBeG = new BESVTD_COTI_GROU();
                    var oBrG = new BRSVTD_COTI_GROU();

                    oBeG.COD_COTI = oForm.oBe.COD_DVEN;
                    oBeG.NUM_ACCI = 5;
                    oBeG.COD_TIPO_DOCU = 4;
                    var oListG = oBrG.Get_SVPR_COTI_GROU_LIST(oBeG);

                    oListG.ForEach(obj =>
                    {
                        oListGroup.Add(obj);
                    });
                    gdvGroups.RefreshData();

                    var oBeDG = new BESVTD_COTI();
                    var oBrDG = new BRSVTD_COTI_GROU_DETA();

                    oBeDG.COD_COTI = oForm.oBe.COD_DVEN;
                    oBeDG.NUM_ACCI = 5;
                    oBeDG.COD_TIPO_DOCU = 4;
                    var oListDG = oBrDG.Get_SVPR_COTI_GROU_DETA_LIST(oBeDG);

                    oListDG.ForEach(obj =>
                    {
                        oListArtiGroup.Add(obj);
                    });
                    ListArticleCompletedUpdate();
                    gdvArticlesCompleted.RefreshData();
                    gdvArticlesGroup.RefreshData();
                }
            }
        }
Ejemplo n.º 5
0
        /// <summary>
        /// PRESENTAR LA ORDEN DE VENTA CON LA INFORMACION PROVENIENTE DE LA COTIZACION
        /// </summary>
        /// <param name="COD_COTI"></param>
        public void SearchInvoice(int COD_DVENp)
        {
            ClearControl();
            StateControl(false);

            beALF_NOMB.Enabled = false;
            lueCOD_SUCU.Properties.ReadOnly = true;
            lueCOD_MONE.Properties.ReadOnly = true;
            lueCOD_ALMA.Properties.ReadOnly = true;
            txtNUM_DESC.Properties.ReadOnly = true;
            gcaNUM_CANT.OptionsColumn.AllowEdit = false;
            gcaNUM_CANT.OptionsColumn.AllowFocus = false;
            gcaNUM_CANT.OptionsColumn.ReadOnly = true;
            var oBe = new BESVTC_COTI();
            var oBr = new BRSVTC_COTI();
            oBe.ALF_NUME_IDEN = COD_DVENp.ToString();
            oBe.COD_TIPO_DOCU = 4;
            oBe.COD_COMP = SESSION_COMP;
            oBe.NUM_ACCI = 9;

            var oListDV = oBr.Get_SVPR_COTI_BUSC(oBe);
            LoadBranch(oListDV[0].COD_SOCI_NEGO);
            txtCOD_SOCI_NEGO.Text = oListDV[0].COD_SOCI_NEGO.ToString();
            beALF_NOMB.Text = oListDV[0].ALF_NOMB;
            txtALF_DIRE_FISC.Text = oListDV[0].ALF_DIRE;
            txtALF_TELE.Text = "";
            txtALF_FAXX.Text = "";
            txtALF_CONT.Text = oListDV[0].ALF_CONT;
            lueCOD_SUCU.EditValue = oListDV[0].COD_SUCU;
            txtNUM_DESC.Text = oListDV[0].NUM_DESC.ToString("#,##0.00");
            txtALF_NUME_FACT.Text = oListDV[0].ALF_NUME_SUNA;
            beALF_GUIA_REMI_STOR.Text = oListDV[0].ALF_NUME_DOCU;
            COD_DVEN = oListDV[0].COD_DVEN;
            txtNUM_NCRE.Text = string.Empty;
            deFEC_REGI.EditValue = DateTime.Today;
            deFEC_DOCU.EditValue = DateTime.Today;
            deFEC_VENC.EditValue = DateTime.Today;
            txtALF_ESTA.Text = oListDV[0].ALF_ESTA;
            lueCOD_MONE.EditValue = oListDV[0].COD_MONE;
            lueCOD_ALMA.EditValue = oListDV[0].COD_ALMA;
            txtALF_NUME_IDEN.Text = oListDV[0].ALF_NUME_IDEN;
            chkIGV.Checked = oListDV[0].IND_IMPU;
            chkIND_LIQU.Checked = oListDV[0].IND_LIQU;

            meALF_OBSE.Text = oListDV[0].ALF_OBSE;
            lblALF_SONN.Text = oListDV[0].ALF_TOTA;

            txtNUM_SUBT.Text = oListDV[0].NUM_SUBT.ToString("#,##0.00");
            txtNUM_IGVV.Text = oListDV[0].NUM_IGVV.ToString("#,##0.00");
            txtNUM_TOTA.Text = oListDV[0].NUM_TOTA.ToString("#,##0.00");

            var oBeSu = new BESVMD_SOCI_NEGO_SUCU();
            var oBrSu = new BRSVMD_SOCI_NEGO_SUCU();

            oBeSu.NUM_ACCI = 5;
            oBeSu.COD_SOCI_NEGO = oListDV[0].COD_SOCI_NEGO;
            var oListTC = oBrSu.Get_SVPR_SOCI_NEGO_SUCU_LIST(oBeSu);

            lueCOD_SUCU.Properties.DataSource = oListTC;
            lueCOD_SUCU.Properties.Columns.Clear();
            lueCOD_SUCU.Properties.Columns.Add(new LookUpColumnInfo("ALF_SUCU", 100, "Sucursal"));
            lueCOD_SUCU.Properties.DisplayMember = "ALF_SUCU";
            lueCOD_SUCU.Properties.ValueMember = "COD_SOCI_NEGO_SUCU";
            lueCOD_SUCU.EditValue = oListDV[0].COD_SUCU;

            var oBeD = new BESVTD_COTI();
            var oBrD = new BRSVTD_COTI();

            oBeD.COD_COTI = oListDV[0].COD_DVEN;
            oBeD.NUM_ACCI = 5;
            oBeD.COD_TIPO_DOCU = 4;
            var oList = oBrD.Get_SVPR_COTI_DETA_LIST(oBeD);

            oList.ForEach(obj =>
            {
                oListArti.Add(obj);
            });
            gdvArticles.RefreshData();

            var oBeG = new BESVTD_COTI_GROU();
            var oBrG = new BRSVTD_COTI_GROU();

            oBeG.COD_COTI = oListDV[0].COD_DVEN;
            oBeG.NUM_ACCI = 5;
            oBeG.COD_TIPO_DOCU = 4;
            var oListG = oBrG.Get_SVPR_COTI_GROU_LIST(oBeG);

            oListG.ForEach(obj =>
            {
                oListGroup.Add(obj);
            });
            gdvGroups.RefreshData();

            var oBeDG = new BESVTD_COTI();
            var oBrDG = new BRSVTD_COTI_GROU_DETA();

            oBeDG.COD_COTI = oListDV[0].COD_DVEN;
            oBeDG.NUM_ACCI = 5;
            oBeDG.COD_TIPO_DOCU = 4;
            var oListDG = oBrDG.Get_SVPR_COTI_GROU_DETA_LIST(oBeDG);

            oListDG.ForEach(obj =>
            {
                oListArtiGroup.Add(obj);
            });
            ListArticleCompletedUpdate();
            gdvArticlesCompleted.RefreshData();
            gdvArticlesGroup.RefreshData();
        }
Ejemplo n.º 6
0
        public void SearchDetailReferralGuide(int COD_GREM)
        {
            var oBeC = new BESVTD_COTI();
            var oBrC = new BRSVTD_COTI();

            oBeC.COD_COTI = COD_GREM;
            oBeC.NUM_ACCI = 5;
            oBeC.COD_TIPO_DOCU = 3;
            var oListC = oBrC.Get_SVPR_COTI_DETA_LIST(oBeC);

            oListC.ForEach(obj =>
            {
                //if (oListArti.Count(objA => objA.COD_ARTI == obj.COD_ARTI) > 0)
                //{
                //    var NUM_CANT = oListArti.Find(objIi => objIi.COD_ARTI == obj.COD_ARTI).NUM_CANT;
                //    var NUM_IMPO = oListArti.Find(objIi => objIi.COD_ARTI == obj.COD_ARTI).NUM_IMPO;

                //    oListArti.Find(objIi => objIi.COD_ARTI == obj.COD_ARTI).NUM_CANT = NUM_CANT + obj.NUM_CANT;
                //    oListArti.Find(objIi => objIi.COD_ARTI == obj.COD_ARTI).NUM_IMPO = NUM_IMPO + obj.NUM_IMPO;
                //}
                //else
                //{
                oListArti.Add(obj);
                //}
            });
            gdvArticles.RefreshData();
            ListArticleCompletedUpdate();
            gdvArticlesCompleted.RefreshData();
            txtNUM_SUBT.Text = (oListArtiCompleted.Sum(obj => obj.NUM_IMPO)).ToString("#,##0.00");
            txtNUM_IGVV.Text = (Convert.ToDecimal(txtNUM_SUBT.Text) * (chkIGV.Checked ? SESSION_PORC_IMPU : Convert.ToDecimal("0.00"))).ToString("#,##0.00");
            txtNUM_TOTA.Text = (Convert.ToDecimal(txtNUM_SUBT.Text) + Convert.ToDecimal(txtNUM_IGVV.Text)).ToString("#,##0.00");
            ALF_TOTA(Convert.ToDecimal(txtNUM_TOTA.Text));
        }
Ejemplo n.º 7
0
        /// <summary>
        /// AL REALIZAR CLIC AL BOTON DE QUITAR ARTICULO AL DETALLE DEL GRUPO
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void sbREMOVE_Click(object sender, EventArgs e)
        {
            try
            {
                if (string.IsNullOrEmpty(txtNUM_CANT_REMO.Text))
                    throw new ArgumentException("Ingrese correctamente la cantidad que desea quitar");
                if (Convert.ToInt32(txtNUM_CANT_REMO.Text) <= 0)
                    throw new ArgumentException("Ingrese correctamente la cantidad que desea quitar");

                if (gdvArticlesGroup.RowCount > 0)
                {
                    if (gdvArticlesGroup.FocusedRowHandle >= 0)
                    {
                        var oBeA = new BESVTD_COTI();
                        var oBe = (BESVTD_COTI)gdvArticlesGroup.GetRow(gdvArticlesGroup.FocusedRowHandle);

                        oBeA.COD_ARTI = oBe.COD_ARTI;
                        oBeA.ALF_CODI_ARTI = oBe.ALF_CODI_ARTI;
                        oBeA.ALF_ARTI = oBe.ALF_ARTI;
                        oBeA.NUM_PREC_UNIT = oBe.NUM_PREC_UNIT;
                        oBeA.NUM_PORC_DESC = oBe.NUM_PORC_DESC;
                        oBeA.NUM_DESC = oBe.NUM_DESC;
                        oBeA.NUM_CANT = oBe.NUM_CANT;
                        oBeA.NUM_CANT_DESP = oBe.NUM_CANT_DESP;
                        oBeA.NUM_STOC_REAL = oBe.NUM_STOC_REAL;
                        oBeA.NUM_STOC_VIRT = oBe.NUM_STOC_VIRT;
                        oBeA.NUM_CANT_REAL_DISP = oBe.NUM_CANT_REAL_DISP;
                        oBeA.NUM_CANT_REAL_COMP_PEDI = oBe.NUM_CANT_REAL_COMP_PEDI;
                        oBeA.NUM_STOC_COMP = oBe.NUM_STOC_COMP;
                        oBeA.NUM_STOC_VIRT_COMP = oBe.NUM_STOC_VIRT_COMP;
                        oBeA.NUM_CANT_VIRT_DISP = oBe.NUM_CANT_VIRT_DISP;
                        oBeA.NUM_CANT_VIRT_COMP_PEDI = oBe.NUM_CANT_VIRT_COMP_PEDI;

                        if (oBeA.NUM_CANT < Convert.ToInt32(txtNUM_CANT_REMO.Text))
                            throw new ArgumentException("No existe la cantidad suficiente");

                        oBeA.COD_COTI_GROU = ((BESVTD_COTI_GROU)gdvGroups.GetRow(gdvGroups.FocusedRowHandle)).COD_COTI_GROU;
                        ((BESVTD_COTI)gdvArticlesGroup.GetRow(gdvArticlesGroup.FocusedRowHandle)).NUM_CANT = oBeA.NUM_CANT - Convert.ToInt32(txtNUM_CANT_REMO.Text);

                        if (((BESVTD_COTI)gdvArticlesGroup.GetRow(gdvArticlesGroup.FocusedRowHandle)).NUM_CANT == 0)
                        {
                            oListArtiGroup.Remove(oBe);
                        }
                        oBeA.NUM_CANT = Convert.ToInt32(txtNUM_CANT_REMO.Text);
                        oBeA.NUM_IMPO = oBeA.NUM_CANT * (oBeA.NUM_PREC_UNIT - oBeA.NUM_DESC);
                        oBe.NUM_IMPO = oBe.NUM_CANT * (oBe.NUM_PREC_UNIT - oBe.NUM_DESC);
                        txtNUM_CANT_ADDD.Text = oBe.NUM_CANT.ToString();
                        //if (oListArti.Count(obj => obj.COD_ARTI == oBeA.COD_ARTI && obj.COD_COTI_GROU == oBeA.COD_COTI_GROU) > 0)
                        //{
                        //    oListArti.Find(obj => obj.COD_ARTI == oBeA.COD_ARTI && obj.COD_COTI_GROU == oBeA.COD_COTI_GROU).NUM_CANT = oListArti.Find(obj => obj.COD_ARTI == oBeA.COD_ARTI && obj.COD_COTI_GROU == oBeA.COD_COTI_GROU).NUM_CANT + oBeA.NUM_CANT;
                        //    oListArti.Find(obj => obj.COD_ARTI == oBeA.COD_ARTI && obj.COD_COTI_GROU == oBeA.COD_COTI_GROU).NUM_IMPO = oListArti.Find(obj => obj.COD_ARTI == oBeA.COD_ARTI && obj.COD_COTI_GROU == oBeA.COD_COTI_GROU).NUM_IMPO + oBeA.NUM_IMPO;
                        //}
                        //else
                        //{
                        oListArti.Add(oBeA);
                        //}
                        ListArticleCompletedUpdate();
                        gdvArticlesCompleted.RefreshData();
                        gdvArticlesGroup.RefreshData();
                        gdvArticles.RefreshData();
                    }
                }
            }
            catch (Exception ex)
            {
                XtraMessageBox.Show(ex.Message, "Sistema", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Ejemplo n.º 8
0
        /// <summary>
        /// AGREGAR ARTICULO
        /// </summary>
        public void AddArticle()
        {
            try
            {
                using (var oForm = new xfSearchArticleSales(SESSION_COMP))
                {
                    if (oForm.ShowDialog() == DialogResult.OK)
                    {
                        //if (oForm.oBe.ALF_CODI_ARTI.ToUpper().Equals("SERVICIO"))
                        //    throw new ArgumentException("Solo se puede agregar servicio");

                        var oBe = new BESVTD_COTI();
                        oBe.COD_ARTI = oForm.oBe.COD_ARTI;
                        oBe.ALF_CODI_ARTI = oForm.oBe.ALF_CODI_ARTI;
                        oBe.ALF_ARTI = oForm.oBe.ALF_ARTI;
                        oBe.NUM_PREC_UNIT = oForm.oBe.NUM_PREC;
                        oBe.NUM_PORC_DESC = oForm.oBe.NUM_DESC;
                        oBe.NUM_DESC = oBe.NUM_PREC_UNIT * oForm.oBe.NUM_DESC;
                        oBe.NUM_CANT = 1;
                        oBe.NUM_IMPO = oBe.NUM_CANT * (oBe.NUM_PREC_UNIT - (oBe.NUM_PREC_UNIT * oForm.oBe.NUM_DESC));
                        oListArti.Add(oBe);
                        ListArticleCompletedUpdate();
                        gdvArticlesCompleted.RefreshData();
                        gdvArticles.RefreshData();
                        txtNUM_SUBT.Text = (oListArti.Sum(obj => obj.NUM_IMPO) + oListArtiGroup.Sum(obj => obj.NUM_IMPO)).ToString("#,##0.00");
                        txtNUM_IGVV.Text = (Convert.ToDecimal(txtNUM_SUBT.Text) * (chkIGV.Checked ? SESSION_PORC_IMPU : Convert.ToDecimal("0.00"))).ToString("#,##0.00");
                        txtNUM_TOTA.Text = (Convert.ToDecimal(txtNUM_SUBT.Text) + Convert.ToDecimal(txtNUM_IGVV.Text)).ToString("#,##0.00");
                        ALF_TOTA(Convert.ToDecimal(txtNUM_TOTA.Text));
                    }
                }
            }
            catch (Exception ex)
            {
                XtraMessageBox.Show(ex.Message, "Sistema", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Ejemplo n.º 9
0
        /// <summary>
        /// ACTUALIZAR LA LISTA DE ARTICULOS COMPLETA
        /// </summary>
        private void ListArticleCompletedUpdate()
        {
            var oListTemporal = new List<BESVTD_COTI>();
            oListArti.ForEach(obj =>
            {
                var oBeAdd = new BESVTD_COTI();
                oBeAdd.COD_ARTI = obj.COD_ARTI;
                oBeAdd.ALF_ARTI = obj.ALF_ARTI;
                oBeAdd.ALF_CODI_ARTI = obj.ALF_CODI_ARTI;
                oBeAdd.NUM_PREC_UNIT = obj.NUM_PREC_UNIT;
                oBeAdd.NUM_PORC_DESC = obj.NUM_PORC_DESC;
                oBeAdd.NUM_DESC = obj.NUM_DESC;
                oBeAdd.NUM_CANT = obj.NUM_CANT;
                oBeAdd.NUM_IMPO = obj.NUM_IMPO;
                oBeAdd.NUM_CANT_DESP = obj.NUM_CANT_DESP;
                oBeAdd.NUM_STOC_REAL = obj.NUM_STOC_REAL;
                oBeAdd.NUM_STOC_VIRT = obj.NUM_STOC_VIRT;
                oBeAdd.NUM_CANT_REAL_DISP = obj.NUM_CANT_REAL_DISP;
                oBeAdd.NUM_CANT_REAL_COMP_PEDI = obj.NUM_CANT_REAL_COMP_PEDI;
                oBeAdd.NUM_STOC_COMP = obj.NUM_STOC_COMP;
                oBeAdd.NUM_STOC_VIRT_COMP = obj.NUM_STOC_VIRT_COMP;
                oBeAdd.NUM_CANT_VIRT_DISP = obj.NUM_CANT_VIRT_DISP;
                oBeAdd.NUM_CANT_VIRT_COMP_PEDI = obj.NUM_CANT_VIRT_COMP_PEDI;
                oListTemporal.Add(oBeAdd);
            });
            oListArtiGroup.ForEach(obj =>
            {
                var oBeAdd = new BESVTD_COTI();
                oBeAdd.COD_ARTI = obj.COD_ARTI;
                oBeAdd.ALF_ARTI = obj.ALF_ARTI;
                oBeAdd.ALF_CODI_ARTI = obj.ALF_CODI_ARTI;
                oBeAdd.NUM_PREC_UNIT = obj.NUM_PREC_UNIT;
                oBeAdd.NUM_PORC_DESC = obj.NUM_PORC_DESC;
                oBeAdd.NUM_DESC = obj.NUM_DESC;
                oBeAdd.NUM_CANT = obj.NUM_CANT;
                oBeAdd.NUM_IMPO = obj.NUM_IMPO;
                oBeAdd.NUM_CANT_DESP = obj.NUM_CANT_DESP;
                oBeAdd.NUM_STOC_REAL = obj.NUM_STOC_REAL;
                oBeAdd.NUM_STOC_VIRT = obj.NUM_STOC_VIRT;
                oBeAdd.NUM_CANT_REAL_DISP = obj.NUM_CANT_REAL_DISP;
                oBeAdd.NUM_CANT_REAL_COMP_PEDI = obj.NUM_CANT_REAL_COMP_PEDI;
                oBeAdd.NUM_STOC_COMP = obj.NUM_STOC_COMP;
                oBeAdd.NUM_STOC_VIRT_COMP = obj.NUM_STOC_VIRT_COMP;
                oBeAdd.NUM_CANT_VIRT_DISP = obj.NUM_CANT_VIRT_DISP;
                oBeAdd.NUM_CANT_VIRT_COMP_PEDI = obj.NUM_CANT_VIRT_COMP_PEDI;
                oListTemporal.Add(oBeAdd);
            });
            oListArtiCompleted.Clear();
            oListTemporal.ForEach(obj =>
            {
                //if (oListArtiCompleted.Count(objI => objI.COD_ARTI == obj.COD_ARTI) > 0)
                //{
                //    var NUM_CANT = oListArtiCompleted.Find(objIi => objIi.COD_ARTI == obj.COD_ARTI).NUM_CANT;
                //    var NUM_IMPO = oListArtiCompleted.Find(objIi => objIi.COD_ARTI == obj.COD_ARTI).NUM_IMPO;

                //    oListArtiCompleted.Find(objIi => objIi.COD_ARTI == obj.COD_ARTI).NUM_CANT = NUM_CANT + obj.NUM_CANT;
                //    oListArtiCompleted.Find(objIi => objIi.COD_ARTI == obj.COD_ARTI).NUM_IMPO = NUM_IMPO + obj.NUM_IMPO;
                //}
                //else
                //{
                oListArtiCompleted.Add(obj);
                //}
            });
        }
Ejemplo n.º 10
0
        private void sbADD_Click(object sender, EventArgs e)
        {
            try
            {
                if (gdvGroups.RowCount == 0)
                    throw new ArgumentException("No existen kit definidos");
                if (gdvArticles.RowCount > 0)
                {
                    if (gdvArticles.FocusedRowHandle >= 0)
                    {
                        var oBeA = new BESVTD_COTI();
                        var oBe = (BESVTD_COTI)gdvArticles.GetRow(gdvArticles.FocusedRowHandle);

                        oBeA.COD_ARTI = oBe.COD_ARTI;
                        oBeA.ALF_CODI_ARTI = oBe.ALF_CODI_ARTI;
                        oBeA.ALF_ARTI = oBe.ALF_ARTI;
                        oBeA.NUM_PREC_UNIT = oBe.NUM_PREC_UNIT;
                        oBeA.NUM_PORC_DESC = oBe.NUM_PORC_DESC;
                        oBeA.NUM_DESC = oBe.NUM_DESC;
                        oBeA.NUM_CANT = oBe.NUM_CANT;

                        if (oBeA.NUM_CANT < Convert.ToInt32(txtNUM_CANT_ADDD.Text))
                            throw new ArgumentException("No existe la cantidad suficiente");

                        oBeA.COD_COTI_GROU = ((BESVTD_COTI_GROU)gdvGroups.GetRow(gdvGroups.FocusedRowHandle)).COD_COTI_GROU;
                        ((BESVTD_COTI)gdvArticles.GetRow(gdvArticles.FocusedRowHandle)).NUM_CANT = oBeA.NUM_CANT - Convert.ToInt32(txtNUM_CANT_ADDD.Text);

                        if (((BESVTD_COTI)gdvArticles.GetRow(gdvArticles.FocusedRowHandle)).NUM_CANT == 0)
                        {
                            oListArti.Remove(oBe);
                        }
                        oBeA.NUM_CANT = Convert.ToInt32(txtNUM_CANT_ADDD.Text);
                        oBeA.NUM_IMPO = oBeA.NUM_CANT * (oBeA.NUM_PREC_UNIT - oBeA.NUM_DESC);
                        oBe.NUM_IMPO = oBe.NUM_CANT * (oBe.NUM_PREC_UNIT - oBe.NUM_DESC);
                        txtNUM_CANT_ADDD.Text = oBe.NUM_CANT.ToString();
                        //if (oListArtiGroup.Count(obj => obj.COD_ARTI == oBeA.COD_ARTI && obj.COD_COTI_GROU == oBeA.COD_COTI_GROU) > 0)
                        //{
                        //    oListArtiGroup.Find(obj => obj.COD_ARTI == oBeA.COD_ARTI && obj.COD_COTI_GROU == oBeA.COD_COTI_GROU).NUM_CANT = oListArtiGroup.Find(obj => obj.COD_ARTI == oBeA.COD_ARTI && obj.COD_COTI_GROU == oBeA.COD_COTI_GROU).NUM_CANT + oBeA.NUM_CANT;
                        //    oListArtiGroup.Find(obj => obj.COD_ARTI == oBeA.COD_ARTI && obj.COD_COTI_GROU == oBeA.COD_COTI_GROU).NUM_IMPO = oListArtiGroup.Find(obj => obj.COD_ARTI == oBeA.COD_ARTI && obj.COD_COTI_GROU == oBeA.COD_COTI_GROU).NUM_IMPO + oBeA.NUM_IMPO;
                        //}
                        //else
                        //{
                            oListArtiGroup.Add(oBeA);
                        //}

                        gdvArticlesGroup.RefreshData();
                        gdvArticles.RefreshData();
                    }
                }
            }
            catch (Exception ex)
            {
                XtraMessageBox.Show(ex.Message, "Sistema", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Ejemplo n.º 11
0
        public void SearchQuote()
        {
            ClearControl();
            using (var oForm = new xfSearchQuote(1,SESSION_COMP))
            {
                if (oForm.ShowDialog() == DialogResult.OK)
                {
                    LoadBranch(oForm.oBe.COD_SOCI_NEGO);
                    txtCOD_SOCI_NEGO.Text = oForm.oBe.COD_SOCI_NEGO.ToString();
                    beALF_NOMB.Text = oForm.oBe.ALF_NOMB;
                    txtALF_DIRE_FISC.Text = oForm.oBe.ALF_DIRE;
                    txtALF_TELE.Text = "";
                    txtALF_FAXX.Text = "";
                    txtALF_CONT.Text = oForm.oBe.ALF_CONT;
                    lueCOD_SUCU.EditValue = oForm.oBe.COD_SUCU;
                    txtNUM_DESC.Text = oForm.oBe.NUM_DESC.ToString("#,##0.00");
                    txtNUM_COTI.Text = oForm.oBe.COD_COTI.ToString();
                    deFEC_REGI.EditValue = oForm.oBe.FEC_REGI;
                    deFEC_DOCU.EditValue = oForm.oBe.FEC_DOCU;
                    deFEC_VENC.EditValue = oForm.oBe.FEC_VENC;
                    txtALF_ESTA.Text = oForm.oBe.ALF_ESTA;
                    lueCOD_MONE.EditValue = oForm.oBe.COD_MONE;
                    lueCOD_PROY.EditValue = oForm.oBe.COD_PROY;
                    ALF_EJEC_COME = oForm.oBe.ALF_EJEC_COME;
                    txtALF_ATEN.Text = oForm.oBe.ALF_ATEN;
                    lkeCOD_MOTI.EditValue = oForm.oBe.COD_MOTI;
                    mmoALF_COND_COME.Text = oForm.oBe.ALF_COND_COME;
                    lueCOD_EJEC_COME.EditValue = oForm.oBe.COD_EJEC_COME;
                    chkIGV.Checked = oForm.oBe.IND_IMPU;

                    meALF_OBSE.Text = oForm.oBe.ALF_OBSE;
                    lblALF_SONN.Text = oForm.oBe.ALF_TOTA;

                    txtNUM_SUBT.Text = oForm.oBe.NUM_SUBT.ToString("#,##0.00");
                    txtNUM_IGVV.Text = oForm.oBe.NUM_IGVV.ToString("#,##0.00");
                    txtNUM_TOTA.Text = oForm.oBe.NUM_TOTA.ToString("#,##0.00");

                    var oBe = new BESVTD_COTI();
                    var oBr = new BRSVTD_COTI();

                    oBe.COD_COTI = oForm.oBe.COD_COTI;
                    oBe.NUM_ACCI = 5;
                    oBe.COD_TIPO_DOCU = 1;
                    var oList = oBr.Get_SVPR_COTI_DETA_LIST(oBe);

                    oList.ForEach(obj =>
                    {
                        oListArti.Add(obj);
                    });
                    gdvArticles.RefreshData();

                    var oBeG = new BESVTD_COTI_GROU();
                    var oBrG = new BRSVTD_COTI_GROU();

                    oBeG.COD_COTI = oForm.oBe.COD_COTI;
                    oBeG.NUM_ACCI = 5;
                    oBeG.COD_TIPO_DOCU = 1;
                    var oListG = oBrG.Get_SVPR_COTI_GROU_LIST(oBeG);

                    oListG.ForEach(obj =>
                    {
                        oListGroup.Add(obj);
                    });
                    gdvGroups.RefreshData();

                    var oBeDG = new BESVTD_COTI();
                    var oBrDG = new BRSVTD_COTI_GROU_DETA();

                    oBeDG.COD_COTI = oForm.oBe.COD_COTI;
                    oBeDG.NUM_ACCI = 5;
                    oBeDG.COD_TIPO_DOCU = 1;
                    var oListDG = oBrDG.Get_SVPR_COTI_GROU_DETA_LIST(oBeDG);

                    oListDG.ForEach(obj =>
                    {
                        oListArtiGroup.Add(obj);
                    });
                    gdvArticlesGroup.RefreshData();

                    var oBeTC = new BESVMD_SOCI_NEGO_SUCU();
                    var oBrTC = new BRSVMD_SOCI_NEGO_SUCU();

                    oBeTC.NUM_ACCI = 5;
                    oBeTC.COD_SOCI_NEGO = oForm.oBe.COD_SOCI_NEGO;
                    var oListTC = oBrTC.Get_SVPR_SOCI_NEGO_SUCU_LIST(oBeTC);

                    lueCOD_SUCU.Properties.DataSource = oListTC;
                    lueCOD_SUCU.Properties.Columns.Clear();
                    lueCOD_SUCU.Properties.Columns.Add(new LookUpColumnInfo("ALF_SUCU", 100, "Sucursal"));
                    lueCOD_SUCU.Properties.DisplayMember = "ALF_SUCU";
                    lueCOD_SUCU.Properties.ValueMember = "COD_SOCI_NEGO_SUCU";

                    lueCOD_SUCU.EditValue = oForm.oBe.COD_SUCU;
                }
            }
        }
Ejemplo n.º 12
0
        public void AddArticle()
        {
            try
            {
                var obr = new BRPurchase();
                var TIPO_CAMB = obr.Get_PSGN_SPLS_SVMC_TIPO_CAMB(SESSION_COMP, 1);
                using(var oForm = new xfSearchArticleSales(SESSION_COMP))
                {
                    if (oForm.ShowDialog() == DialogResult.OK)
                    {
                        var oBe = new BESVTD_COTI();
                        oBe.COD_ARTI = oForm.oBe.COD_ARTI;
                        oBe.ALF_CODI_ARTI = oForm.oBe.ALF_CODI_ARTI;
                        oBe.ALF_ARTI = oForm.oBe.ALF_ARTI;
                        if (lueCOD_MONE.EditValue.ToString().Equals("2"))
                        {
                            oBe.NUM_PREC_UNIT = oForm.oBe.NUM_PREC;
                        }
                        else
                        {
                            oBe.NUM_PREC_UNIT = Math.Round(oForm.oBe.NUM_PREC*TIPO_CAMB,2);
                        }

                        oBe.NUM_PORC_DESC = Convert.ToDecimal(txtNUM_DESC.Text.Replace("%", ""));
                        oBe.NUM_DESC = oBe.NUM_PREC_UNIT * decimal.Round((oBe.NUM_PORC_DESC/decimal.Parse("100.00")),2);
                        oBe.NUM_CANT = 1;
                        oBe.NUM_IMPO = oBe.NUM_CANT * (oBe.NUM_PREC_UNIT - (oBe.NUM_PREC_UNIT * decimal.Round((oBe.NUM_PORC_DESC / decimal.Parse("100.00")), 2)));
                        oListArti.Add(oBe);
                        gdvArticles.RefreshData();
                        txtNUM_SUBT.Text = (oListArti.Sum(obj => obj.NUM_IMPO) + oListArtiGroup.Sum(obj => obj.NUM_IMPO)).ToString("#,##0.00");
                        txtNUM_IGVV.Text = (Convert.ToDecimal(txtNUM_SUBT.Text) * (chkIGV.Checked?SESSION_PORC_IMPU:Convert.ToDecimal("0.00"))).ToString("#,##0.00");
                        txtNUM_TOTA.Text = (Convert.ToDecimal(txtNUM_SUBT.Text) + Convert.ToDecimal(txtNUM_IGVV.Text)).ToString("#,##0.00");
                        ALF_TOTA(Convert.ToDecimal(txtNUM_TOTA.Text));
                    }
                }
            }
            catch (Exception ex)
            {
                XtraMessageBox.Show(ex.Message,"Sistema",MessageBoxButtons.OK,MessageBoxIcon.Error);
            }
        }
Ejemplo n.º 13
0
        /// <summary>
        /// PRESENTAR LA ORDEN DE VENTA CON LA INFORMACION PROVENIENTE DE LA COTIZACION
        /// </summary>
        /// <param name="COD_COTI"></param>
        public void SearchSalesOrder(int COD_COTI)
        {
            ClearControl();
            StateControl(false);
            var oBe = new BESVTC_COTI();
            var oBr = new BRSVTC_COTI();
            oBe.ALF_NUME_IDEN = COD_COTI.ToString();
            oBe.COD_COMP = SESSION_COMP;
            oBe.COD_TIPO_DOCU = 1;
            oBe.NUM_ACCI = 6;

            var oList = oBr.Get_SVPR_COTI_BUSC(oBe);
            LoadBranch(oList[0].COD_SOCI_NEGO);
            txtCOD_SOCI_NEGO.Text = oList[0].COD_SOCI_NEGO.ToString();
            beALF_NOMB.Text = oList[0].ALF_NOMB;
            txtALF_DIRE_FISC.Text = oList[0].ALF_DIRE;
            txtALF_TELE.Text = "";
            txtALF_FAXX.Text = "";
            txtALF_CONT.Text = oList[0].ALF_CONT;
            lueCOD_SUCU.EditValue = oList[0].COD_SUCU;
            txtNUM_DESC.Text = oList[0].NUM_DESC.ToString("#,##0.00");
            txtCOD_COTI.Text = oList[0].COD_COTI.ToString();
            deFEC_REGI.EditValue = DateTime.Today;
            deFEC_DOCU.EditValue = DateTime.Today;
            deFEC_VENC.EditValue = DateTime.Today.AddDays(oList[0].NUM_DIAS);
            lueCOD_MONE.EditValue = oList[0].COD_MONE;
            lkeCOD_MOTI.EditValue = oList[0].COD_MOTI;
            chkIGV.Checked = oList[0].IND_IMPU;

            meALF_OBSE.Text = oList[0].ALF_OBSE;
            lblALF_SONN.Text = oList[0].ALF_TOTA;

            txtNUM_SUBT.Text = oList[0].NUM_SUBT.ToString("#,##0.00");
            txtNUM_IGVV.Text = oList[0].NUM_IGVV.ToString("#,##0.00");
            txtNUM_TOTA.Text = oList[0].NUM_TOTA.ToString("#,##0.00");

            var oBeSu = new BESVMD_SOCI_NEGO_SUCU();
            var oBrSu = new BRSVMD_SOCI_NEGO_SUCU();

            oBeSu.NUM_ACCI = 5;
            oBeSu.COD_SOCI_NEGO = oList[0].COD_SOCI_NEGO;
            var oListSu = oBrSu.Get_SVPR_SOCI_NEGO_SUCU_LIST(oBeSu);

            lueCOD_SUCU.Properties.DataSource = oListSu;
            lueCOD_SUCU.Properties.Columns.Clear();
            lueCOD_SUCU.Properties.Columns.Add(new LookUpColumnInfo("ALF_SUCU", 100, "Sucursal"));
            lueCOD_SUCU.Properties.DisplayMember = "ALF_SUCU";
            lueCOD_SUCU.Properties.ValueMember = "COD_SOCI_NEGO_SUCU";
            lueCOD_SUCU.EditValue = oList[0].COD_SUCU;

            var oBeC = new BESVTD_COTI();
            var oBrC = new BRSVTD_COTI();

            oBeC.COD_COTI = oList[0].COD_COTI;
            oBeC.NUM_ACCI = 5;
            oBeC.COD_TIPO_DOCU = 1;
            var oListC = oBrC.Get_SVPR_COTI_DETA_LIST(oBeC);

            oListC.ForEach(obj =>
            {
                oListArti.Add(obj);
            });
            gdvArticles.RefreshData();

            var oBeG = new BESVTD_COTI_GROU();
            var oBrG = new BRSVTD_COTI_GROU();

            oBeG.COD_COTI = oList[0].COD_COTI;
            oBeG.NUM_ACCI = 5;
            oBeG.COD_TIPO_DOCU = 1;
            var oListG = oBrG.Get_SVPR_COTI_GROU_LIST(oBeG);

            oListG.ForEach(obj =>
            {
                oListGroup.Add(obj);
            });
            gdvGroups.RefreshData();

            var oBeDG = new BESVTD_COTI();
            var oBrDG = new BRSVTD_COTI_GROU_DETA();

            oBeDG.COD_COTI = oList[0].COD_COTI;
            oBeDG.NUM_ACCI = 5;
            oBeDG.COD_TIPO_DOCU = 1;
            var oListDG = oBrDG.Get_SVPR_COTI_GROU_DETA_LIST(oBeDG);

            oListDG.ForEach(obj =>
            {
                oListArtiGroup.Add(obj);
            });
            ListArticleCompletedUpdate();
            gdvArticlesCompleted.RefreshData();
            gdvArticlesGroup.RefreshData();
        }
Ejemplo n.º 14
0
        /// <summary>
        /// GUARDAR
        /// </summary>
        public void Save()
        {
            if (lueCOD_ALMA.Properties.ReadOnly) return;
            try
            {
                gdvArticles.CloseEditor();
                gdvArticles.RefreshData();
                gdvGroups.CloseEditor();
                gdvGroups.RefreshData();
                gdvArticlesCompleted.CloseEditor();
                gdvArticlesCompleted.RefreshData();
                if (string.IsNullOrEmpty(txtCOD_SOCI_NEGO.Text))
                    throw new ArgumentException("Seleccione un cliente");
                if (lueCOD_SUCU.EditValue==null)
                    throw new ArgumentException("Seleccione la sucursal");
                if (oListArti.Count == 0 && oListArtiGroup.Count==0)
                    throw new ArgumentException("Agregar articulos a la lista");
                if (lueCOD_MONE.EditValue == null)
                    throw new ArgumentException("Seleccione la moneda");
                if (lueCOD_ALMA.EditValue == null)
                    throw new ArgumentException("Seleccione almacén");

                var oBe = new BESVTC_COTI();
                var oBr = new BRSVTC_COTI();

                if (string.IsNullOrEmpty(txtNUM_OVEN.Text))
                {
                    oBe.NUM_ACCI = 1;
                }
                else
                {
                    oBe.NUM_ACCI = 2;
                    oBe.COD_OVEN=Convert.ToInt32(txtNUM_OVEN.Text);
                    oBe.COD_DOCU_SECU = oBe.COD_OVEN;
                }

                oBe.COD_SOCI_NEGO = Convert.ToInt32(txtCOD_SOCI_NEGO.Text);
                oBe.ALF_NOMB = beALF_NOMB.Text;
                oBe.ALF_DIRE = txtALF_DIRE_FISC.Text;
                oBe.ALF_CONT = txtALF_CONT.Text;
                oBe.COD_SUCU=Convert.ToInt32(lueCOD_SUCU.EditValue);
                oBe.COD_MONE = Convert.ToInt32(lueCOD_MONE.EditValue);
                oBe.COD_ALMA = Convert.ToInt32(lueCOD_ALMA.EditValue);
                oBe.NUM_DESC = Convert.ToDecimal(txtNUM_DESC.Text.Replace("%",""));
                oBe.FEC_DOCU = deFEC_DOCU.DateTime;
                oBe.FEC_VENC = deFEC_VENC.DateTime;
                oBe.FEC_ENTR = deFEC_ENTR.DateTime;

                oBe.LST_COTI = oListArti;
                oBe.LST_COTI_DETA = oListArtiCompleted;
                oBe.LST_COTI_GROU = oListGroup;
                oBe.LST_COTI_ARTI_GROU = oListArtiGroup;

                oBe.NUM_SUBT = decimal.Parse(txtNUM_SUBT.Text);
                oBe.NUM_IGVV = decimal.Parse(txtNUM_IGVV.Text);
                oBe.NUM_TOTA = decimal.Parse(txtNUM_TOTA.Text);

                oBe.ALF_OBSE = meALF_OBSE.Text;
                oBe.ALF_TOTA = lblALF_SONN.Text;
                oBe.COD_TIPO_DOCU = 2;
                oBe.COD_DOCU_INIC=Convert.ToInt32(txtCOD_COTI.Text);
                oBe.COD_MOTI = Convert.ToInt32(lkeCOD_MOTI.EditValue);
                oBe.IND_IMPU = chkIGV.Checked;

                oBe.COD_USUA_CREA = SESSION_USER;
                oBe.COD_USUA_MODI = SESSION_USER;
                oBe.COD_COMP = SESSION_COMP;

                oBe.IND_FACT = chkIND_FACT.Checked;

                oBr.Set_SVPR_COTI(oBe);

                txtNUM_OVEN.Text = oBe.COD_DOCU_SECU.ToString();
                XtraMessageBox.Show("Operación realizada con exito!!!!", "Sistema", MessageBoxButtons.OK, MessageBoxIcon.Information);
                StateControl(true);
                var oBe_ = new BESVTD_COTI();
                var oBr_ = new BRSVTD_COTI();

                oBe_.COD_COTI = Convert.ToInt32(txtNUM_OVEN.Text);
                oBe_.NUM_ACCI = 9;
                oBe_.COD_TIPO_DOCU = 2;
                var oList = oBr_.Get_SVPR_COTI_DETA_LIST(oBe_);
                oListArtiCompleted.Clear();
                oList.ForEach(obj =>
                {
                    oListArtiCompleted.Add(obj);
                });
                gdvArticlesCompleted.RefreshData();
            }
            catch (Exception ex)
            {
                XtraMessageBox.Show(ex.Message,"Sistema",MessageBoxButtons.OK,MessageBoxIcon.Error);
            }
        }
        /// <summary>
        /// INVOCAR EL CUADRO DE BUSQUEDA PARA LA NOTA DE CREDITO
        /// </summary>
        public void SearchSalesCreditNote()
        {
            ClearControl();
            using (var oForm = new xfSearchQuote(6, SESSION_COMP))
            {
                if (oForm.ShowDialog() == DialogResult.OK)
                {
                    txtCOD_SOCI_NEGO.Text = oForm.oBe.COD_SOCI_NEGO.ToString();
                    beALF_NOMB.Text = oForm.oBe.ALF_NOMB;
                    txtALF_DIRE_FISC.Text = oForm.oBe.ALF_DIRE;
                    txtALF_TELE.Text = "";
                    txtALF_FAXX.Text = "";
                    txtALF_CONT.Text = oForm.oBe.ALF_CONT;
                    txtNUM_DESC.Text = oForm.oBe.NUM_DESC.ToString("#,##0.00");
                    COD_DVEN = oForm.oBe.COD_DVEN;
                    txtNUM_NCRE.Text = oForm.oBe.COD_NCRE.ToString();
                    deFEC_REGI.EditValue = oForm.oBe.FEC_REGI;
                    deFEC_DOCU.EditValue = oForm.oBe.FEC_DOCU;
                    deFEC_VENC.EditValue = oForm.oBe.FEC_PAGO;
                    txtALF_ESTA.Text = oForm.oBe.ALF_ESTA;
                    lueCOD_MONE.EditValue = oForm.oBe.COD_MONE;
                    lueALF_SERI.EditValue = oForm.oBe.ALF_SERI;
                    txtNUM_CORR.Text = oForm.oBe.NUM_CORR.ToString("0000000");
                    txtALF_NUME_IDEN.Text = oForm.oBe.ALF_NUME_IDEN;
                    chkIGV.Checked = oForm.oBe.IND_IMPU;

                    meALF_OBSE.Text = oForm.oBe.ALF_OBSE;
                    lblALF_SONN.Text = oForm.oBe.ALF_TOTA;

                    txtNUM_SUBT.Text = oForm.oBe.NUM_SUBT.ToString("#,##0.00");
                    txtNUM_IGVV.Text = oForm.oBe.NUM_IGVV.ToString("#,##0.00");
                    txtNUM_TOTA.Text = oForm.oBe.NUM_TOTA.ToString("#,##0.00");

                    var oBe = new BESVTD_COTI();
                    var oBr = new BRSVTD_COTI();

                    oBe.COD_COTI = oForm.oBe.COD_DVEN;
                    oBe.NUM_ACCI = 5;
                    oBe.COD_TIPO_DOCU = 4;
                    var oList = oBr.Get_SVPR_COTI_DETA_LIST(oBe);

                }
            }
        }