diff --git a/AF/CatSubTipos.aspx b/AF/CatSubTipos.aspx index 1c87568c5..1c97e6a3e 100644 --- a/AF/CatSubTipos.aspx +++ b/AF/CatSubTipos.aspx @@ -52,8 +52,8 @@ - - + + diff --git a/AF/CatSubTipos.aspx.vb b/AF/CatSubTipos.aspx.vb index cc023e732..d35a95f54 100644 --- a/AF/CatSubTipos.aspx.vb +++ b/AF/CatSubTipos.aspx.vb @@ -18,8 +18,10 @@ Partial Class AF_CatSubTipos End Sub Private Sub CargaTipos() + DdlTipos.Items.Clear() DdlTipos.DataSource = GlobalDTTipoActivoFijo(UsuarioActual.CveEmpresa) '.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa) DdlTipos.DataBind() + DdlTipos.Items.Insert(0, New ListItem("Seleccione", "-1")) End Sub Private Sub CargaGlobal() @@ -46,7 +48,6 @@ Partial Class AF_CatSubTipos Else CargaGrid("") End If - CargaGlobal() End Sub #Region "G V D A T O S" @@ -92,7 +93,8 @@ Partial Class AF_CatSubTipos CargaGrid("") End If - If Not TieneError Then + If Not TieneError Then + CargaGlobal() CargaDatos() End If End Sub @@ -133,7 +135,8 @@ Partial Class AF_CatSubTipos CargaGrid("") End If - If Not TieneError Then + If Not TieneError Then + CargaGlobal() CargaDatos() End If End Sub @@ -199,7 +202,9 @@ Partial Class AF_CatSubTipos End If ObjAF.Dispose() - If Not TieneError Then + If Not TieneError Then + CargaGlobal() + CargaDatos() End If diff --git a/AF/CatTipos.aspx.vb b/AF/CatTipos.aspx.vb index 310644925..d7dd84cf6 100644 --- a/AF/CatTipos.aspx.vb +++ b/AF/CatTipos.aspx.vb @@ -104,11 +104,7 @@ Partial Class AF_CatTipos UpDatos.Update() End Sub Private Sub CargaGlobal() - Dim ObjTipo As New ClsAF - If ObjTipo.GetTiposActivosFijos(-1) Then - GlobalDTTipoActivoFijo(-1) = ObjTipo.DtResultados - End If - ObjTipo.Dispose() + GlobalDTTipoActivoFijo(UsuarioActual.CveEmpresa) = Nothing End Sub #Region " G V - D A T O S" diff --git a/Ventas/RepCancelacionesPorRespuesta.aspx b/Ventas/RepCancelacionesPorRespuesta.aspx index c87394d52..adb4ae678 100644 --- a/Ventas/RepCancelacionesPorRespuesta.aspx +++ b/Ventas/RepCancelacionesPorRespuesta.aspx @@ -104,7 +104,7 @@ + CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" data-sort="true" GridLines="None" Width="99%" OnRowDataBound="GvRefacturaciones_RowDataBound"> @@ -125,7 +125,7 @@
- +
diff --git a/Ventas/RepCancelacionesPorRespuesta.aspx.cs b/Ventas/RepCancelacionesPorRespuesta.aspx.cs index 91987c8cc..4ef92fb44 100644 --- a/Ventas/RepCancelacionesPorRespuesta.aspx.cs +++ b/Ventas/RepCancelacionesPorRespuesta.aspx.cs @@ -623,6 +623,35 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas } } } + + protected void GvRefacturaciones_RowDataBound(object sender, GridViewRowEventArgs e) + { + if (e.Row.RowType == DataControlRowType.DataRow) + { + GridView gv = (GridView)sender; + if (!(e.Row.DBCampo("PuedeRefacturar").ToEntero() == 0 || !string.IsNullOrEmpty(e.Row.DBCampo("FolioFiscalSustitucion")))) + { + e.Row.FCHyperLink("HplRefact").NavigateUrl = string.Format("/Ventas/Ventas.aspx?CveDevolucion={0}&NuevaFactura=1", e.Row.DBCampo("CveVenta")); + e.Row.FCHyperLink("HplRefact").Visible = true; + } + + if (e.Row.DBCampo("CveEstatusFactura").ToString().ToEntero() == 23) + { + e.Row.FCLinkButton("LnkValidarRefac").Visible = false; + } + + if (e.Row.DBCampo("PuedeRefacturar") == "0" && e.Row.DBCampo("CveEstatusFactura") == "23" && e.Row.DBCampo("CveVentaSustitucion").ToEntero() > 0) + { + if (e.Row.FCLinkButton("LnkCancelar") != null) e.Row.FCLinkButton("LnkCancelar").Visible = true; + } + + if (string.IsNullOrEmpty(e.Row.DBCampo("FolioFiscal"))) + { + e.Row.FCLinkButton("LnkValidarRefac").Visible = false; + } + } + } + public void BtnEnviarMailCancelacion_Click(object sender, EventArgs e) { if (this.CveVenta > 0) diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 2a7068f4b..4ba9f331e 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -23661,7 +23661,7 @@ Partial Class Ventas #Region " INVENTARIO POR ENTREGA" Private Sub InventarioMov(Optional CveVentaPadre As Integer = -1) - If CveVentaPadre > 0 Then + If CveVentaPadre > 0 AndAlso DdlTipoComprobante.SelectedValue <> "Dev" Then Dim RowVentas As DataRow = Nothing Using ObjVentas As New ClsVentas If ObjVentas.GetVenta(CveVentaPadre, UsuarioActual.CveEmpresa, VerificaAlmacen:=False) Then @@ -34657,6 +34657,10 @@ Partial Class Ventas CalculaLineasAdicionales() DdlLineaAdicional.Enabled = True + If UsuarioActual.TienePermisoProceso(357) AndAlso LblSeTimbro.Text = "No" Then + DdlUsoCFDI.Enabled = True + End If + UpParametros.Update() UPObservaciones.Update() UpFacturar.Update()