コード例 #1
0
 public Boolean ModificarDB(in_Guia_x_traspaso_bodega_Info info, ref string mensaje)
 {
     try
     {
         Boolean res = true;
         if (Validar_y_corregir_objeto(ref info, ref mensaje))
         {
             res = odata.ModificarDB(info, ref mensaje);
             tb_sis_Documento_Tipo_Talonario_Bus busTalonario = new tb_sis_Documento_Tipo_Talonario_Bus();
             busTalonario.Modificar_Estado_Usado(info.IdEmpresa, info.CodDocumentoTipo, info.IdEstablecimiento, info.IdPuntoEmision, info.NumDocumento_Guia, ref mensaje);
         }
         else
         {
             res = false;
         }
         return(res);
     }
     catch (Exception ex)
     {
         Core.Erp.Info.Log_Exception.LoggingManager.Logger.Log(Core.Erp.Info.Log_Exception.LoggingCategory.Error, ex.Message);
         throw new Core.Erp.Info.Log_Exception.DalException(string.Format("", "ModificarDB", ex.Message), ex)
               {
                   EntityType = typeof(in_Guia_x_traspaso_bodega_Bus)
               };
     }
 }
コード例 #2
0
        private void UCCp_Retencion_Load(object sender, EventArgs e)
        {
            try
            {
                string MensajeError = "";

                ListCodigoSRI                    = dat_ti.Get_List_codigo_SRI_(param.IdEmpresa);
                txtIdRetencion.Text              = Info_Retencion.IdRetencion.ToString();
                cmb_CodigoSRI_grid.DataSource    = ListCodigoSRI.FindAll(c => c.co_estado == "A" && (c.IdTipoSRI == "COD_RET_FUE" || c.IdTipoSRI == "COD_RET_IVA"));
                cmb_CodigoSRI_grid.DisplayMember = "descriConcate";
                cmb_CodigoSRI_grid.ValueMember   = "IdCodigo_SRI";

                if (string.IsNullOrEmpty(Info_Retencion.NumRetencion) == false)
                {
                    UC_numRetencion.rbt_doc_Electronico.Checked = (bool)Info_Retencion.EsDocumentoElectronico;
                    UC_numRetencion.rbt_pre_impresa.Checked     = !(bool)Info_Retencion.EsDocumentoElectronico;

                    tb_sis_Documento_Tipo_Talonario_Info talonario_Info = new tb_sis_Documento_Tipo_Talonario_Info();
                    tb_sis_Documento_Tipo_Talonario_Bus  BusTalonario   = new tb_sis_Documento_Tipo_Talonario_Bus();
                    talonario_Info = BusTalonario.Verificar_DocumentoElectronico(Info_Retencion.IdEmpresa, Info_Retencion.CodDocumentoTipo, Info_Retencion.serie1, Info_Retencion.serie2, Info_Retencion.NumRetencion, talonario_Info, ref MensajeError);
                    Info_Retencion.EsDocumentoElectronico = talonario_Info.es_Documento_electronico;
                    UC_numRetencion.Set_Serie_Num_Documento(Info_Retencion.serie1, Info_Retencion.serie2, Info_Retencion.NumRetencion);
                }
            }
            catch (Exception ex)
            {
                string NameMetodo = System.Reflection.MethodBase.GetCurrentMethod().Name;
                MessageBox.Show(NameMetodo + " - " + ex.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                Log_Error_bus.Log_Error(NameMetodo + " - " + ex.ToString());
            }
        }
コード例 #3
0
 private void CargarCombos()
 {
     try
     {
         txtEstablecimiento.Text = param.InfoSucursal.Su_CodigoEstablecimiento;
         tb_sis_Documento_Tipo_Talonario_Bus busTalonario = new tb_sis_Documento_Tipo_Talonario_Bus();
         var Talonario = busTalonario.GetInfoRetElectronico(param.IdEmpresa);
         txtEstablecimiento.Text = Talonario.Establecimiento;
         txtPuntoEmision.Text    = Talonario.PuntoEmision;
         lst_codigoSRI           = bus_codigoSRI.Get_List_codigo_SRI_IvaRet(param.IdEmpresa);
         cmbCodigoSRI.DataSource = lst_codigoSRI;
     }
     catch (Exception)
     {
         throw;
     }
 }
コード例 #4
0
        private void GetInfo()
        {
            try
            {
                tb_sis_Documento_Tipo_Talonario_Bus busTalonario = new tb_sis_Documento_Tipo_Talonario_Bus();
                var Talonario = busTalonario.GetInfoRetElectronico(param.IdEmpresa);

                txtTipo.Focus();
                info.ret_Fecha            = deRetFecha.DateTime.Date;
                info.ret_CodDocumentoTipo = "RETEN";
                info.ret_Establecimiento  = Talonario.Establecimiento;
                info.ret_PuntoEmision     = Talonario.PuntoEmision;
                info.lstRetencion         = new List <cp_XML_Documento_Retencion_Info>(blst);
            }
            catch (Exception)
            {
            }
        }
コード例 #5
0
        private Boolean txtNumRetencion_Validating()
        {
            try
            {
                string msg = "";

                busTipoDoc = new tb_sis_Documento_Tipo_Talonario_Bus();

                string[] serie = Convert.ToString(txe_Serie.EditValue).Split('-');

                string Establecimiento = serie[0];
                string PuntoEmision    = serie[1];

                if (Establecimiento == "" && PuntoEmision == "" && (txtNumDoc.EditValue == null || txtNumDoc.EditValue == ""))
                {
                    return(true);
                }


                if (busTipoDoc.Verificar_NumTalonario(param.IdEmpresa, _IdTipoDocumento.ToString(),
                                                      Establecimiento, PuntoEmision, Convert.ToString(txtNumDoc.EditValue), ref msg) == false)
                {
                    MessageBox.Show(msg);

                    txtNumDoc.Focus();

                    IdEstablecimiento = "001";
                    IdPuntoEmision    = "001";
                    Get_Ult_Documento_no_usado();
                    return(false);
                }
                else
                {
                    return(true);
                }
            }
            catch (Exception ex)
            {
                string NameMetodo = System.Reflection.MethodBase.GetCurrentMethod().Name;
                MessageBox.Show(NameMetodo + " - " + ex.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                Log_Error_bus.Log_Error(NameMetodo + " - " + ex.ToString());
                return(false);
            }
        }
コード例 #6
0
        private void btnDigitalizar_Click(object sender, EventArgs e)
        {
            try
            {
                txtRutaXml.Focus();
                gvDetalle.MoveNext();

                tb_sis_Documento_Tipo_Talonario_Bus busTalonario = new tb_sis_Documento_Tipo_Talonario_Bus();
                var Talonario = busTalonario.GetInfoRetElectronico(param.IdEmpresa);
                if (Talonario == null)
                {
                    MessageBox.Show("Para crear retenciones automáticas el sistema necesita un talonario electrónico", param.Nombre_sistema, MessageBoxButtons.OK);
                    return;
                }
                bool GenerarXML = true;
                foreach (var item in blst)
                {
                    item.IdEmpresa = param.IdEmpresa;

                    if (item.Tipo == "FACTURA")
                    {
                        item.ret_Establecimiento = param.InfoSucursal.Su_CodigoEstablecimiento;
                        item.ret_PuntoEmision    = Talonario.PuntoEmision;
                        if (item.lstRetencion == null || item.lstRetencion.Count == 0)
                        {
                            item.lstRetencion = new List <cp_XML_Documento_Retencion_Info>();
                            var lstDet = ListaCodigoProveedor.Where(q => q.pe_cedulRuc == item.emi_Ruc).ToList();
                            if (lstDet.Count > 0)
                            {
                                foreach (var Detalle in lstDet)
                                {
                                    item.lstRetencion.Add(new cp_XML_Documento_Retencion_Info
                                    {
                                        re_tipoRet          = Detalle.re_tipo,
                                        re_baseRetencion    = Math.Round(Convert.ToDouble(Detalle.re_tipo == "IVA" ? item.ValorIVA : (item.Subtotal0 + item.SubtotalIVA)), 2, MidpointRounding.AwayFromZero),
                                        IdCodigo_SRI        = Detalle.IdCodigo_SRI,
                                        re_Codigo_impuesto  = Detalle.re_Codigo_impuesto,
                                        re_Porcen_retencion = Detalle.re_Porcen_retencion,
                                        re_valor_retencion  = Math.Round(Math.Round(Convert.ToDouble(Detalle.re_tipo == "IVA" ? item.ValorIVA : (item.Subtotal0 + item.SubtotalIVA)), 2, MidpointRounding.AwayFromZero) * (Detalle.re_Porcen_retencion / 100), 2, MidpointRounding.AwayFromZero)
                                    });
                                }
                            }
                            else
                            {
                                var ListaDet = bus_codigoProveedor.GetList(param.IdEmpresa, item.emi_Ruc);
                                if (ListaDet.Count > 0)
                                {
                                    ListaCodigoProveedor.AddRange(ListaDet);
                                    foreach (var Detalle in ListaDet)
                                    {
                                        item.lstRetencion.Add(new cp_XML_Documento_Retencion_Info
                                        {
                                            re_tipoRet          = Detalle.re_tipo,
                                            re_baseRetencion    = Math.Round(Convert.ToDouble(Detalle.re_tipo == "IVA" ? item.ValorIVA : (item.Subtotal0 + item.SubtotalIVA)), 2, MidpointRounding.AwayFromZero),
                                            IdCodigo_SRI        = Detalle.IdCodigo_SRI,
                                            re_Codigo_impuesto  = Detalle.re_Codigo_impuesto,
                                            re_Porcen_retencion = Detalle.re_Porcen_retencion,
                                            re_valor_retencion  = Math.Round(Math.Round(Convert.ToDouble(Detalle.re_tipo == "IVA" ? item.ValorIVA : (item.Subtotal0 + item.SubtotalIVA)), 2, MidpointRounding.AwayFromZero) * (Detalle.re_Porcen_retencion / 100), 2, MidpointRounding.AwayFromZero)
                                        });
                                    }
                                }
                            }
                        }
                    }
                    item.IdUsuario = param.IdUsuario;
                    if (bus_xml.GuardarDB(item, ref GenerarXML))
                    {
                        string MensajeError = string.Empty;

                        if (GenerarXML && !bus_xml.Generacion_xml_SRI(item.IdEmpresa, item.IdDocumento, ref MensajeError))
                        {
                            MessageBox.Show("No se ha podido generar el XML de la retención del documento " + item.Comprobante + " de " + item.RazonSocial, param.Nombre_sistema, MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                        }
                        if (item.SeContabiliza)
                        {
                            if (item.IdDocumento != 0 && !bus_xml.GenerarOG(item.IdEmpresa, item.IdDocumento, param.IdUsuario))
                            {
                                MessageBox.Show("No se ha podido contabilizar el documento " + item.Comprobante + " de " + item.RazonSocial, param.Nombre_sistema, MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                            }
                        }
                    }
                    item.Imagen = 2;
                }
                gcDetalle.Refresh();
                gcDetalle.RefreshDataSource();
                gcDetalle.DataSource = blst;
                MessageBox.Show("Registros digitalizados exitósamente", param.Nombre_sistema, MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, param.Nombre_sistema, MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
コード例 #7
0
        public Boolean Modificar_Num_Retencion(cp_retencion_Info Info_Retencion, ref string mensajeError)
        {
            try
            {
                Boolean res = false;


                tb_sis_Documento_Tipo_Talonario_Bus  busTalonario  = new tb_sis_Documento_Tipo_Talonario_Bus();
                tb_sis_Documento_Tipo_Talonario_Info infoTalonario = new tb_sis_Documento_Tipo_Talonario_Info();
                tb_Sucursal_Bus Bus_Sucu   = new tb_Sucursal_Bus();
                tb_Bodega_Bus   Bus_bodega = new tb_Bodega_Bus();

                string mensajeDocumentoDupli = "";
                string cod_estable           = "";
                string cod_pto_emision       = "";

                Info_Retencion.CodDocumentoTipo = string.IsNullOrEmpty(Info_Retencion.CodDocumentoTipo) ? "RETEN" : Info_Retencion.CodDocumentoTipo;


                // el objeto viene sin serie o sin # factura tomo el ultimo num de factura del talonario
                if (Info_Retencion.serie1 == "" || Info_Retencion.serie1 == null || Info_Retencion.serie2 == "" || Info_Retencion.serie2 == null ||
                    Info_Retencion.NumRetencion == "" || Info_Retencion.NumRetencion == null)
                {
                    cod_estable     = Bus_Sucu.Get_Cod_Establecimiento_x_Sucursal(Info_Retencion.IdEmpresa, param.IdSucursal);
                    cod_pto_emision = Bus_bodega.Get_cod_pto_emision_x_Bodega(Info_Retencion.IdEmpresa, param.IdSucursal, 1);

                    infoTalonario = busTalonario.Get_Info_Primer_Documento_no_usado(Info_Retencion.IdEmpresa, cod_estable, cod_pto_emision, Info_Retencion.CodDocumentoTipo
                                                                                    , Info_Retencion.EsDocumentoElectronico);


                    if (infoTalonario.NumDocumento == null)
                    {
                        mensajeError = "No hay talonarios para Establecimiento=" + cod_estable + " y punto de emision=" + cod_pto_emision;
                        throw new Core.Erp.Info.Log_Exception.DalException(string.Format("", "no hay talonario activos", mensajeError))
                              {
                                  EntityType = typeof(cp_retencion_Bus)
                              };
                    }

                    Info_Retencion.serie1       = infoTalonario.Establecimiento;
                    Info_Retencion.serie2       = infoTalonario.PuntoEmision;
                    Info_Retencion.NumRetencion = infoTalonario.NumDocumento;
                }
                else
                {
                    // se puede dar si mas de un usario estan haciendo la factura y tienen en memoria o en la pantalla el mismo talonario
                    //verifico el numero de factura si esta usado
                    infoTalonario.Establecimiento          = Info_Retencion.serie1;
                    infoTalonario.PuntoEmision             = Info_Retencion.serie2;
                    infoTalonario.NumDocumento             = Info_Retencion.NumRetencion;
                    infoTalonario.IdEmpresa                = Info_Retencion.IdEmpresa;
                    infoTalonario.CodDocumentoTipo         = Info_Retencion.CodDocumentoTipo;
                    infoTalonario.es_Documento_electronico = Info_Retencion.EsDocumentoElectronico;


                    if (busTalonario.Documento_talonario_esta_Usado(infoTalonario, ref mensajeError, ref mensajeDocumentoDupli))
                    {
                        //si esta en usado busco el siguiente
                        cod_estable     = Bus_Sucu.Get_Cod_Establecimiento_x_Sucursal(Info_Retencion.IdEmpresa, param.IdSucursal);
                        cod_pto_emision = Bus_bodega.Get_cod_pto_emision_x_Bodega(Info_Retencion.IdEmpresa, param.IdSucursal, 1);

                        infoTalonario = busTalonario.Get_Info_Primer_Documento_no_usado(Info_Retencion.IdEmpresa, cod_estable,
                                                                                        cod_pto_emision, Info_Retencion.CodDocumentoTipo, Info_Retencion.EsDocumentoElectronico);

                        if (infoTalonario.NumDocumento == null)
                        {
                            throw new Core.Erp.Info.Log_Exception.DalException(string.Format("", "no hay talonario activos", mensajeError))
                                  {
                                      EntityType = typeof(cp_retencion_Bus)
                                  };
                        }

                        Info_Retencion.serie1       = infoTalonario.Establecimiento;
                        Info_Retencion.serie2       = infoTalonario.PuntoEmision;
                        Info_Retencion.NumRetencion = infoTalonario.NumDocumento;

                        if (!infoTalonario.es_Documento_electronico)
                        {
                            //si no es documento electronico le actualizo el numero de autorizacion y la fecha de autorizacion
                            Info_Retencion.NAutorizacion      = infoTalonario.NumAutorizacion;
                            Info_Retencion.Fecha_Autorizacion = DateTime.Now.Date;
                        }
                    }
                    else
                    {
                        if (!infoTalonario.es_Documento_electronico)
                        {
                            //Si no esta siendo usado, si no es documento electronico le actualizo el numero de autorizacion y la fecha de autorizacion
                            infoTalonario = busTalonario.Get_Info_Documento_Tipo_Talonario(Info_Retencion.IdEmpresa, Info_Retencion.CodDocumentoTipo, cod_estable, cod_pto_emision, Info_Retencion.NumRetencion);


                            Info_Retencion.NAutorizacion      = infoTalonario.NumAutorizacion;
                            Info_Retencion.Fecha_Autorizacion = DateTime.Now.Date;
                        }
                    }
                }

                res = data_retencion.Modificar_Num_Retencion(Info_Retencion, ref mensajeError);
                busTalonario.Modificar_Estado_Usado(infoTalonario, ref mensajeError);

                return(res);
            }
            catch (Exception ex)
            {
                Core.Erp.Info.Log_Exception.LoggingManager.Logger.Log(Core.Erp.Info.Log_Exception.LoggingCategory.Error, ex.Message);
                throw new Core.Erp.Info.Log_Exception.DalException(string.Format("", "ModificarNRetencion", ex.Message), ex)
                      {
                          EntityType = typeof(cp_retencion_Bus)
                      };
            }
        }
コード例 #8
0
        Boolean Validar_y_corregir_objeto(ref in_Guia_x_traspaso_bodega_Info Info_Guia, ref string msg)
        {
            try
            {
                #region 'Validaciones'
                /*--- validaciones */



                if (Info_Guia.IdEmpresa == 0)
                {
                    msg = "La variable estan en cero... IdEmpresa == 0  ";
                    return(false);
                }



                foreach (var item in Info_Guia.list_detalle_Guia)
                {
                    if (item.Cantidad_enviar == 0 || item.Cantidad_enviar == null)
                    {
                        msg = "Ingrese la cantidad de traspaso para el item : " + item.pr_descripcion + "  ";
                        return(false);
                    }
                }



                foreach (var item in Info_Guia.list_detalle_Guia_Sin_OC)
                {
                    if (item.Cantidad_enviar == 0 || item.Cantidad_enviar == null)
                    {
                        msg = "Ingrese la cantidad de traspaso para el item : " + item.nom_producto + "  ";
                        return(false);
                    }
                }


                if (Info_Guia.IdEmpresa <= 0 && Info_Guia.IdSucursal_Partida <= 0 && Info_Guia.IdSucursal_Llegada <= 0)
                {
                    msg = "Error en la cabecera de fact uno de los PK es <=0";
                    throw new Core.Erp.Info.Log_Exception.DalException(string.Format("", "Validaciones", msg))
                          {
                              EntityType = typeof(in_Guia_x_traspaso_bodega_Bus)
                          };
                }


                if (Info_Guia.IdTransportista <= 0)
                {
                    msg = "Erro en la cabecera de guia IdTransportista es <=0";
                    throw new Core.Erp.Info.Log_Exception.DalException(string.Format("", "Validaciones", msg))
                          {
                              EntityType = typeof(in_Guia_x_traspaso_bodega_Bus)
                          };
                }


                if (Info_Guia.IdMotivo_Traslado == "")
                {
                    msg = "Erro en la cabecera de IdMotivo_Traslado esta en blanco";
                    throw new Core.Erp.Info.Log_Exception.DalException(string.Format("", "Validaciones", msg))
                          {
                              EntityType = typeof(in_Guia_x_traspaso_bodega_Bus)
                          };
                }


                if (Info_Guia.list_detalle_Guia.Count == 0 && Info_Guia.list_detalle_Guia_Sin_OC.Count == 0)
                {
                    msg = "la guia  no tiene detalle ";
                    throw new Core.Erp.Info.Log_Exception.DalException(string.Format("", "Validaciones", msg))
                          {
                              EntityType = typeof(in_Guia_x_traspaso_bodega_Bus)
                          };
                }



                /*--- Fin validaciones */


                /*--- corrigiendo data */

                Info_Guia.Estado = (string.IsNullOrEmpty(Info_Guia.Estado) == true) ? "A" : Info_Guia.Estado;
                Info_Guia.Fecha  = Convert.ToDateTime(Info_Guia.Fecha).Date;



                tb_sis_Documento_Tipo_Talonario_Bus  busTalonario  = new tb_sis_Documento_Tipo_Talonario_Bus();
                tb_sis_Documento_Tipo_Talonario_Info infoTalonario = new tb_sis_Documento_Tipo_Talonario_Info();
                tb_Sucursal_Bus Bus_Sucu   = new tb_Sucursal_Bus();
                tb_Bodega_Bus   Bus_bodega = new tb_Bodega_Bus();

                string mensajeDocumentoDupli = "";
                string cod_estable           = "";
                string cod_pto_emision       = "";

                Info_Guia.CodDocumentoTipo = Cl_Enumeradores.eTipoDocumento_Talonario.GUIA.ToString();


                // el objeto viene sin serie o sin # factura tomo el ultimo num de factura del talonario
                if (Info_Guia.IdEstablecimiento == "" || Info_Guia.IdEstablecimiento == null || Info_Guia.IdPuntoEmision == "" || Info_Guia.IdPuntoEmision == null ||
                    Info_Guia.NumDocumento_Guia == "" || Info_Guia.NumDocumento_Guia == null)
                {
                    cod_estable     = Bus_Sucu.Get_Cod_Establecimiento_x_Sucursal(Info_Guia.IdEmpresa, Convert.ToInt32(Info_Guia.IdSucursal_Partida));
                    cod_pto_emision = Bus_bodega.Get_cod_pto_emision_x_Bodega(Info_Guia.IdEmpresa, Convert.ToInt32(Info_Guia.IdSucursal_Partida), 1); // la tabla no tiene bodega
                    infoTalonario   = busTalonario.Get_Info_Primer_Documento_no_usado(Info_Guia.IdEmpresa, cod_pto_emision, cod_estable, Info_Guia.CodDocumentoTipo, Info_Guia.Es_electronica);

                    if (infoTalonario.NumDocumento == null)
                    {
                        msg = "No hay talonarios para Establecimiento=" + cod_estable + " y punto de emision=" + cod_pto_emision;
                        throw new Core.Erp.Info.Log_Exception.DalException(string.Format("", "no hay talonario activos", msg))
                              {
                                  EntityType = typeof(in_Guia_x_traspaso_bodega_Bus)
                              };
                    }

                    Info_Guia.IdEstablecimiento = infoTalonario.Establecimiento;
                    Info_Guia.IdPuntoEmision    = infoTalonario.PuntoEmision;
                    Info_Guia.NumDocumento_Guia = infoTalonario.NumDocumento;
                }
                else
                {
                    // se puede dar si mas de un usario estan haciendo la factura y tienen en memoria o en la pantalla el mismo talonario
                    //verifico el numero de factura si esta usado
                    infoTalonario.Establecimiento          = Info_Guia.IdEstablecimiento;
                    infoTalonario.PuntoEmision             = Info_Guia.IdPuntoEmision;
                    infoTalonario.NumDocumento             = Info_Guia.NumDocumento_Guia;
                    infoTalonario.IdEmpresa                = Info_Guia.IdEmpresa;
                    infoTalonario.CodDocumentoTipo         = Info_Guia.CodDocumentoTipo;
                    infoTalonario.es_Documento_electronico = Info_Guia.Es_electronica;


                    if (Info_Guia.IdGuia == 0 && busTalonario.Documento_talonario_esta_Usado(infoTalonario, ref msg, ref mensajeDocumentoDupli))
                    {
                        //si esta en usado busco el siguiente
                        cod_estable     = Bus_Sucu.Get_Cod_Establecimiento_x_Sucursal(Info_Guia.IdEmpresa, Convert.ToInt32(Info_Guia.IdSucursal_Partida));
                        cod_pto_emision = Bus_bodega.Get_cod_pto_emision_x_Bodega(Info_Guia.IdEmpresa, Convert.ToInt32(Info_Guia.IdPuntoEmision), 1);

                        infoTalonario = busTalonario.Get_Info_Primer_Documento_no_usado(Info_Guia.IdEmpresa, cod_pto_emision, cod_estable, Info_Guia.CodDocumentoTipo, Info_Guia.Es_electronica);

                        if (infoTalonario.NumDocumento == null)
                        {
                            throw new Core.Erp.Info.Log_Exception.DalException(string.Format("", "no hay talonario activos", msg))
                                  {
                                      EntityType = typeof(in_Guia_x_traspaso_bodega_Bus)
                                  };
                        }

                        Info_Guia.IdEstablecimiento = infoTalonario.Establecimiento;
                        Info_Guia.IdPuntoEmision    = infoTalonario.PuntoEmision;
                        Info_Guia.NumDocumento_Guia = infoTalonario.NumDocumento;
                    }
                }


                /*--- corrigiendo data */

                #endregion

                return(true);
            }
            catch (Exception ex)
            {
                Core.Erp.Info.Log_Exception.LoggingManager.Logger.Log(Core.Erp.Info.Log_Exception.LoggingCategory.Error, ex.Message);
                throw new Core.Erp.Info.Log_Exception.DalException(string.Format("", "Validar_y_corregir_objeto", ex.Message), ex)
                      {
                          EntityType = typeof(in_Guia_x_traspaso_bodega_Bus)
                      };
            }
        }