Liga a Kardex en Gvs OC GVPS, Compras GvInv GvInvMovtos, Ventas GvInv
This commit is contained in:
@@ -1342,7 +1342,14 @@
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%--3--%>
|
||||
<asp:BoundField ItemStyle-HorizontalAlign="Left" HeaderText=" Producto" DataField="CodigoPS" />
|
||||
<%--<asp:BoundField ItemStyle-HorizontalAlign="Left" HeaderText=" Producto" DataField="CodigoPS" />--%>
|
||||
<asp:TemplateField>
|
||||
<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>
|
||||
<%--4--%>
|
||||
<asp:BoundField ItemStyle-Width="120px" HeaderText="P.U." DataField="PU" DataFormatString="{0:#,##0.00####}" ItemStyle-HorizontalAlign="Right" />
|
||||
<%--5--%>
|
||||
@@ -1439,6 +1446,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">
|
||||
|
||||
@@ -1228,6 +1228,19 @@ Partial Class Compras_Compras
|
||||
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
|
||||
|
||||
Private Property CveCompraDRMC As Integer
|
||||
Get
|
||||
If ViewState("CveCompraDRMC") Is Nothing Then
|
||||
@@ -1246,6 +1259,7 @@ Partial Class Compras_Compras
|
||||
'ImgBtnBuscarOC.Attributes.Add("data-toggle", "tooltip")
|
||||
'ImgBtnBuscarOC.Attributes.Add("data-placement", "top")
|
||||
EsGrupoDiaz = If(UsuarioActual.Empresa.Funcionalidad(382) = "1", True, False)
|
||||
TienePermisoKardex = If(UsuarioActual.TienePermisoPagina(224), True, False)
|
||||
|
||||
CargaDatosAgregarPS()
|
||||
TieneAnticiposXML = False
|
||||
@@ -11252,6 +11266,14 @@ Partial Class Compras_Compras
|
||||
Protected Sub GVINV_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvInv.RowDataBound
|
||||
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
|
||||
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.DataKey("CvePS")}"
|
||||
End If
|
||||
|
||||
Dim AplicaLote As Boolean = e.Row.DBCampo("AplicaLote").ToBool
|
||||
Dim AplicaCaducidad As Boolean = e.Row.DBCampo("AplicaCaducidad").ToBool
|
||||
|
||||
@@ -19619,6 +19641,13 @@ Partial Class Compras_Compras
|
||||
e.Row.Font.Bold = True
|
||||
End If
|
||||
Else
|
||||
|
||||
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.DataKey("CvePS")}"
|
||||
End If
|
||||
|
||||
e.Row.Cells(3).HorizontalAlign = HorizontalAlign.Left
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -1247,7 +1247,7 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value EvaluationMode="Constant">Parameters!FechaImpresion.Value</Value>
|
||||
<Value>=Parameters!FechaImpresion.Value</Value>
|
||||
<Style>
|
||||
<FontSize>9pt</FontSize>
|
||||
<Format>D</Format>
|
||||
|
||||
@@ -998,6 +998,7 @@
|
||||
</span>
|
||||
<br />
|
||||
<asp:Label ID="LblPS" runat="server" Text='<%# Eval("PS") %>'></asp:Label>
|
||||
<asp:HyperLink ID="HlPS" runat="server" Text='<%# Eval("PS") %>' Visible="false" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:DropDownList ID="DdlClasificacion" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="Clasificacion" DataValueField="CveClasificacion" CssClass="form-control input-sm select2me" Style="width: 100%; max-width: 600px;" OnSelectedIndexChanged="DdlClasificacion_SelectedIndexChanged1">
|
||||
|
||||
@@ -671,6 +671,19 @@ Partial Class OC_OC
|
||||
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
|
||||
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
@@ -684,6 +697,8 @@ Partial Class OC_OC
|
||||
EsGrupoDiaz = True
|
||||
End If
|
||||
|
||||
TienePermisoKardex = If(UsuarioActual.TienePermisoPagina(224), True, False)
|
||||
|
||||
CargaDatosAgregarPS()
|
||||
CveProveedorOriginal = -1
|
||||
InventarioPrePoliza176 = 0
|
||||
@@ -4096,6 +4111,12 @@ Partial Class OC_OC
|
||||
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
If TienePermisoKardex AndAlso e.Row.RowState = DataControlRowState.Normal Then
|
||||
e.Row.FCLabel("LblPS").Visible = False
|
||||
e.Row.FCHyperLink("HlPS").Visible = True
|
||||
e.Row.FCHyperLink("HLPS").NavigateUrl = $"../Inventarios/Kardex.aspx?CvePS={e.Row.DBCampo("CvePS").ToString}"
|
||||
End If
|
||||
|
||||
Try
|
||||
If e.Row.FCLabel("LtlCantidad") IsNot Nothing Then
|
||||
e.Row.FCLabel("LtlCantidad").Attributes.Add("data-toggle", "tooltip")
|
||||
@@ -4316,6 +4337,7 @@ Partial Class OC_OC
|
||||
End If
|
||||
|
||||
|
||||
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub GvD_RowDeleting(sender As Object, e As GridViewDeleteEventArgs) Handles GvD.RowDeleting
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user