--CITRUS. Modal de existencias por capas
This commit is contained in:
@@ -1513,6 +1513,33 @@ Public Class ClsInventarios
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
Public Function GetInvExistenciasCapas(CvePS As Integer, FechaI As DateTime, FechaF As DateTime, CveEmpresa As Integer, Optional CvesAlmacenes As String = "-1") As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_Inv_ExistenciasCapasGet")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CvePS", SqlDbType.Int).Value = CvePS
|
||||
.Add("@FechaI", SqlDbType.DateTime).Value = FechaI
|
||||
.Add("@FechaF", SqlDbType.DateTime).Value = FechaF
|
||||
.Add("@CvesAlmacenes", SqlDbType.VarChar).Value = CvesAlmacenes
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch Ex1 As SqlException
|
||||
|
||||
Me.OnError("Ocurrió un error al obtener las existencias de los movimientos.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al obtener las existencias de los movimientos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
|
||||
End Function
|
||||
Public Function GetKardexAlmacen(CvePS As Integer, FechaI As String, FechaF As String, CveAlmacen As Integer, CveUnidadMedida As Integer, CveUsuario As Integer, CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
|
||||
@@ -135,6 +135,9 @@
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkCaducidad" Visible="false" runat="server"><i class="fa fa-list"></i>Caducidad de producto</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkExistenciasPorCapas" Visible="false" runat="server"><i class="fa fa-list"></i>Existecias por capas</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:HyperLink runat="server" ID="HlAyuda" NavigateUrl="/Documentacion/DocumentacionInventarios.aspx#Kardex"><i class="fa fa-question-circle"></i>Ayuda</asp:HyperLink>
|
||||
<%--<div>
|
||||
@@ -166,7 +169,7 @@
|
||||
<div class="row" style="padding-top: 10px; position: relative;">
|
||||
<asp:Label runat="server" ID="LblPS" CssClass="col-md-1 truncate">Producto:</asp:Label>
|
||||
<div class="col-md-2 " style="min-width: 250px; max-width: 300px;">
|
||||
<ADS:Dropdownlost ID="ddlProducto2" runat="server" AutoPostBack="False" DataTextField="PSCodigo" IncluyeTodos="false" DataValueField="CvePS" CssClassDdl="select2me" CssStyle="width: 250px; "></ADS:Dropdownlost>
|
||||
<ADS:Dropdownlost ID="ddlProducto2" runat="server" autopostback="False" DataTextField="PSCodigo" IncluyeTodos="false" DataValueField="CvePS" CssClassDdl="select2me" CssStyle="width: 250px; "></ADS:Dropdownlost>
|
||||
</div>
|
||||
|
||||
<label class="col-md-1 truncate" style="max-width: 80px;" id="lblAlm" runat="server">Almacén:</label>
|
||||
@@ -259,9 +262,13 @@
|
||||
|
||||
<div class="row" runat="server" visible="false" id="DVFiltroCodigo">
|
||||
<div class="col-md-1">Código Inicio:</div>
|
||||
<div class="col-md-2"><asp:TextBox runat="server" ID="TxtCodigoInicio" Height="26px"></asp:TextBox></div>
|
||||
<div class="col-md-2">
|
||||
<asp:TextBox runat="server" ID="TxtCodigoInicio" Height="26px"></asp:TextBox>
|
||||
</div>
|
||||
<div class="col-md-1" style="max-width: 80px;">Código Fin:</div>
|
||||
<div class="col-md-2"><asp:TextBox runat="server" ID="TxtCodigoFinal" Height="26px"></asp:TextBox></div>
|
||||
<div class="col-md-2">
|
||||
<asp:TextBox runat="server" ID="TxtCodigoFinal" Height="26px"></asp:TextBox>
|
||||
</div>
|
||||
<div class="col-md-1" style="max-width: 85px;">Marca</div>
|
||||
<div class="col-md-1" style="min-width: 150px;">
|
||||
<asp:DropDownList ID="DdlMarca" CssClass="form-control input-sm select2me" CssStyle="width: 100%;" Width="100%" runat="server" DataTextField="Marca" DataValueField="CveMarca">
|
||||
@@ -622,6 +629,41 @@
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
<div id="DivModalExistenciasCapas" class="modal ADS fade" role="dialog">
|
||||
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UpExistenciasCapas" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-content">
|
||||
<div class="modal-header ">
|
||||
<h4 class="modal-title">
|
||||
<asp:Literal ID="Literal2" Text="Movimientos de entrada" runat="server"> </asp:Literal></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<asp:GridView ID="GvExistenciasCapas" Width="100%" runat="server" ShowHeader="true" EmptyDataText="No hay registros." AutoGenerateColumns="False" AllowPaging="False"
|
||||
ShowFooter="True" ShowHeaderWhenEmpty="True" CssClass="table table-striped table-advance table-hover ScrollAD" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField ItemStyle-Width="10%" HeaderText="Folio">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="hlFolio" runat="server" Text='<%# Eval("Folio")%>' CssClass="Texto" NavigateUrl='<%# Eval("CveMovimiento", "/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}")%>' Target="_blank" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="Folio" DataField="Folio" ItemStyle-Width="10%" />
|
||||
<asp:BoundField HeaderText="Fecha" DataField="FechaMovto" DataFormatString="{0:dd/MM/yyyy}" ItemStyle-Width="10%" />
|
||||
<asp:BoundField HeaderText="Producto" DataField="CodigoPS" ItemStyle-Width="20%" />
|
||||
<asp:BoundField HeaderText="Almacen" DataField="Almacen" ItemStyle-Width="15%" />
|
||||
<asp:BoundField HeaderText="Entrada" DataField="Entrada" DataFormatString="{0:#,###.##}" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Salida" DataField="Salida" DataFormatString="{0:#,###.##}" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Disponible" DataField="Disponible" DataFormatString="{0:#,###.##}" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Right" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-primary" data-dismiss="modal">Cerrar</button>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
Option Strict On
|
||||
Option Explicit On
|
||||
|
||||
Imports System
|
||||
Imports System.Data
|
||||
Imports System.Security.Cryptography.Pkcs
|
||||
Imports ADSNetLibrary.SIGAPI.Models.CGame
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Imports Microsoft.VisualBasic
|
||||
Imports Telerik.Web.UI
|
||||
|
||||
Partial Class Inventarios_Kardex
|
||||
@@ -279,6 +281,10 @@ Partial Class Inventarios_Kardex
|
||||
|
||||
LnkSeries.Visible = AuxAplicaSerie
|
||||
LnkCaducidad.Visible = AuxAplicaCad
|
||||
|
||||
If UsuarioActual.CveEmpresa = 172 Then
|
||||
LnkExistenciasPorCapas.Visible = True
|
||||
End If
|
||||
'CARGA INDICADORES
|
||||
|
||||
If UsuarioActual.TienePermisoProceso(201) Then
|
||||
@@ -574,6 +580,30 @@ Partial Class Inventarios_Kardex
|
||||
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkExistenciasPorCapas_OnClick(sender As Object, e As EventArgs) Handles LnkExistenciasPorCapas.Click
|
||||
|
||||
Dim FechaI As DateTime = If(TxtFechaI.Text <> "" AndAlso TxtFechaI.Text <> "__/__/____", TxtFechaI.Text.ToDateTime(), MinFecha)
|
||||
Dim FechaF As DateTime = If(TxtFechaF.Text <> "" AndAlso TxtFechaF.Text <> "__/__/____", TxtFechaF.Text.ToDateTime(), MaxFecha)
|
||||
|
||||
Using ObjInv As New ClsInventarios
|
||||
If ObjInv.GetInvExistenciasCapas(ddlProducto2.SelectedValue.ToEntero(), FechaI, FechaF, UsuarioActual.CveEmpresa, ddlAlmacen.GetSelectedValues()) Then
|
||||
GvExistenciasCapas.DataSource = ObjInv.DtResultados
|
||||
End If
|
||||
End Using
|
||||
|
||||
GvExistenciasCapas.DataBind()
|
||||
UpExistenciasCapas.Update()
|
||||
RegistraScript(String.Format("$('#{0}').modal('show');", "DivModalExistenciasCapas"))
|
||||
End Sub
|
||||
|
||||
Protected Sub GvExistenciasCapas_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvExistenciasCapas.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If e.Row.DBCampo("CodigoPS").Contains("Total") Then
|
||||
e.Row.CssClass = "Totales"
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user