Liga a Kardex en Gvs OC GVPS, Compras GvInv GvInvMovtos, Ventas GvInv

This commit is contained in:
rakcsle
2025-01-08 11:09:37 -07:00
parent 2c919582cf
commit 9b9ba096fa
7 changed files with 84 additions and 2 deletions

View File

@@ -1983,6 +1983,7 @@
<HeaderTemplate>Producto</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlPS" runat="server" Text='<%# Eval("CodigoPS") %>'></asp:Literal>
<asp:HyperLink ID="HlPS" runat="server" Text='<%# Eval("CodigoPS") %>' Visible="false" Target="_blank"></asp:HyperLink>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Serie" Visible="false">
@@ -2051,6 +2052,7 @@
<HeaderTemplate>Producto o Servicio</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlPS" runat="server" Text='<%# Eval("PS") %>'></asp:Literal>
<asp:HyperLink ID="HlPS" runat="server" Text='<%# Eval("PS") %>' Visible="false" Target="_blank"></asp:HyperLink>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>

View File

@@ -2387,7 +2387,18 @@ Partial Class Ventas
End Set
End Property
Private Property TienePermisoKardex As Boolean
Get
If ViewState("TienePermisoKardex") Is Nothing Then
ViewState("TienePermisoKardex") = False
End If
Return Boolean.Parse(ViewState("TienePermisoKardex").ToString)
End Get
Set(value As Boolean)
ViewState("TienePermisoKardex") = value
End Set
End Property
#Region "VENTA MEDICA"
@@ -2446,6 +2457,8 @@ Partial Class Ventas
Exit Sub
End If
TienePermisoKardex = If(UsuarioActual.TienePermisoPagina(224), True, False)
Modalidad = ""
Opcion = ""
Index = 0
@@ -9515,6 +9528,7 @@ Partial Class Ventas
e.Row.CssClass = "SubTotales"
End If
Else
Dim tFecha As Date = If(e.Row.DBCampo("Fecha") <> "", e.Row.DBCampo("Fecha").ToDate, NowADS())
e.Row.FCLiteral("LtlPS").Text = String.Format("<a Class='Texto' target='_blank' href='/Inventarios/Kardex.aspx?CvePS={0}&CveAlmacen={1}&FechaI={2}&FechaF={3}'> {4}</a>", e.Row.DBCampo("CvePS"), e.Row.DBCampo("CveAlmacen"), tFecha.AddDays(-7).ToShortDateString, tFecha.AddDays(7).ToShortDateString, e.Row.DBCampo("PS"))
@@ -9536,6 +9550,12 @@ Partial Class Ventas
End If
End If
If TienePermisoKardex Then
e.Row.FCLiteral("LtlPS").Visible = False
e.Row.FCHyperLink("HlPS").Visible = True
e.Row.FCHyperLink("HLPS").NavigateUrl = $"../Inventarios/Kardex.aspx?CvePS={e.Row.DBCampo("CvePS").ToString}"
End If
End If
If (CveVenta > 0 And DdlTipoComprobante.SelectedValue <> "Cot") AndAlso Not AplicaDevolucion Then