This commit is contained in:
2025-03-24 05:50:11 -07:00
39 changed files with 1625 additions and 1111 deletions

View File

@@ -348,7 +348,7 @@ table.adssigscroll {
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda2','{0}')", GvDatos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
</div>
<asp:UpdatePanel ID="UpDatos" runat="server">
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="divContainerads">

View File

@@ -161,6 +161,9 @@ Partial Class Inventarios_KardexAlmacenHorizontal
End Sub
Private Sub CargarKardex(CvePS As Integer)
'GvDatos.Columns.Clear()
'GvDatos.AutoGenerateColumns = True
Dim dt As New DataTable
Dim ObjMovimientos As New ClsInventarios
Dim FechaI As String = "-1" ' If(TxtFechaI.Text <> "" AndAlso TxtFechaI.Text <> "__/__/____", TxtFechaI.Text, "-1")
@@ -202,13 +205,16 @@ Partial Class Inventarios_KardexAlmacenHorizontal
GvDatos.DataSource = dt
Else
Alert("La búsqueda no contiene resultados.", TipoMensaje.MsgAdvertencia)
GvDatos.Columns.Clear()
dt = Nothing
GvDatos.DataSource = dt
GvDatos.DataBind()
UpDatos.Update()
Exit Sub
End If
Else
ObjMovimientos.Dispose()
Alert("Ocurrió un error al consultar el Kardex.", TipoMensaje.MsgError)
UpDatos.Update()
Exit Sub
End If
GvDatos.DataBind()
@@ -232,6 +238,7 @@ Partial Class Inventarios_KardexAlmacenHorizontal
Next
UpDatos.Update()
End Sub
Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatos.RowDataBound

View File

@@ -19,7 +19,7 @@
</ContentTemplate>
<Triggers>
<asp:PostBackTrigger ControlID="LnkExportar" />
<asp:PostBackTrigger ControlID="LnkExportar" />
</Triggers>
</asp:UpdatePanel>
</asp:Content>
@@ -59,7 +59,7 @@
<br />
<div class="row">
<div class="col-md-5">
<div class="col-md-6">
<asp:UpdatePanel runat="server" ID="UPDatosAlmacen" UpdateMode="Conditional">
<ContentTemplate>
@@ -68,7 +68,7 @@
<div class="portlet-title">
<div class="caption font-green">
<i class="icon-pin font-green"></i>
<span class="caption-subject bold uppercase">RECEPCIÓN DE TRASPASO</span>
<span class="caption-subject bold uppercase">Devolución de Préstamo</span>
</div>
<div class="actions">
<div class="btn-group">
@@ -80,10 +80,10 @@
</div>
</div>
<div class="portlet-body rowpadding">
<div class="row">
<label class="col-md-3">Fecha:</label>
<div class="col-md-9">
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy">
<div class="row" style="padding:0px">
<label class="col-md-1">Fecha:</label>
<div class="col-md-4" >
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="margin-left:-10px">
<asp:TextBox ID="TxtFechaEntrega" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10" ValidationGroup="GrpRecibir" Width="100px" ClientIDMode="Static"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton runat="server" ID="ImgFechaEntrega" class="btn default"> <i class="fa fa-calendar"></i> </asp:LinkButton>
@@ -99,35 +99,33 @@
<ajax:ValidatorCalloutExtender ID="VCOFechaEntrega3" runat="server" HighlightCssClass="vco" TargetControlID="RVFechaEntrega" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
</div>
</div>
<div class="row">
<asp:HiddenField ID="HdnCveProveedor" runat="server" />
<label class="col-md-3">Almacén:</label>
<div class="col-md-9">
<asp:DropDownList ID="DdlAlmacenOrigen" Width="150px" AppendDataBoundItems="true" runat="server" DataTextField="Almacen" DataValueField="CveAlmacen" CssClass="form-control input-sm select2me"></asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVAlmacenOrigen" runat="server" ControlToValidate="DdlAlmacenOrigen" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Almacen Origen''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCEAlmacenOrigen" runat="server" HighlightCssClass="vco" TargetControlID="RFVAlmacenOrigen" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
</div>
<div class="row">
<label class="col-md-3">Recibió:</label>
<div class="col-md-9">
<asp:HiddenField ID="HdnCveProveedor" runat="server" />
<label class="col-md-2">Almacén:</label>
<div class="col-md-4">
<asp:DropDownList ID="DdlAlmacenOrigen" Width="100%" AppendDataBoundItems="true" runat="server" DataTextField="Almacen" DataValueField="CveAlmacen" CssClass="form-control input-sm select2me"></asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVAlmacenOrigen" runat="server" ControlToValidate="DdlAlmacenOrigen" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Almacen Origen''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCEAlmacenOrigen" runat="server" HighlightCssClass="vco" TargetControlID="RFVAlmacenOrigen" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
</div>
<div class="row" style="padding:0px">
<label class="col-md-1">Recibió:</label>
<div class="col-md-4">
<asp:TextBox runat="server" ID="TxtRecibio" />
</div>
</div>
<div class="row">
<label class="col-md-3">Observaciones:</label>
<div class="col-md-9">
<asp:TextBox ID="TxtObservacionesEntrega" TextMode="MultiLine" Rows="2" runat="server" Width="300px"></asp:TextBox>
<asp:RequiredFieldValidator ID="RfvObservaciones" runat="server" ControlToValidate="TxtObservacionesEntrega" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Observaciones''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpRecibir"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VceObservaciones" runat="server" HighlightCssClass="vco" TargetControlID="RfvObservaciones" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
</div>
<div class="row">
<label class="col-md-2">Observaciones:</label>
<div class="col-md-4">
<asp:TextBox ID="TxtObservacionesEntrega" TextMode="MultiLine" Rows="2" runat="server" Width="100%"></asp:TextBox>
<asp:RequiredFieldValidator ID="RfvObservaciones" runat="server" ControlToValidate="TxtObservacionesEntrega" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Observaciones''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpRecibir"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VceObservaciones" runat="server" HighlightCssClass="vco" TargetControlID="RfvObservaciones" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
</div>
<div class="row" style="padding:0px">
<div style="text-align: center;" class="col-sm-12">
<asp:UpdatePanel runat="server">
<ContentTemplate>
<asp:Button ID="BtnRecibir" runat="server" Text="Devolver Préstamo" OnClick="BtnRecibir_Click" class="btn btn-primary" ValidationGroup="GrpRecibir" />
<asp:Button ID="BtnRecibir" runat="server" Text="Devolver Préstamo" OnClick="BtnRecibir_Click" class="btn btn-primary" ValidationGroup="GrpRecibir" Visible="false" />
</ContentTemplate>
</asp:UpdatePanel>
</div>

View File

@@ -22,12 +22,17 @@ Partial Class Inventarios_PrestamosdeProveedor
End Property
Private Sub Inventarios_PrestamosdeProveedor_Load(sender As Object, e As EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
If Not Page.IsPostBack Then
CargaCombos()
CveMovimiento = 0
CveProveedor = 0
CargaDatos()
If UsuarioActual.TienePermisoProceso(409) Then
BtnRecibir.Visible = True
End If
End If
End Sub

View File

@@ -140,7 +140,7 @@
</asp:DropDownList>
</div>
<div class="col-md-1 truncate v-center" style="text-align: right!important">Tipo Almacen:</div>
<div class="col-md-2 v-center">
<div class="col-md-1 v-center">
<asp:ListBox ID="DdlTipoAlmacen" SelectionMode="Multiple" CssClass="form-control ddlFiltros input-sm select2me Widthall" DataTextField="TipoAlmacen" DataValueField="CveTipoAlmacen" Style="width: 100%;" runat="server"></asp:ListBox>
</div>
<div class="col-md-1 truncate" style="text-align: right!important">Aplica Almacen</div>
@@ -149,8 +149,26 @@
<asp:ListItem Text="Todos" Value="-1" Selected="True"> </asp:ListItem>
<asp:ListItem Text="Inventariable" Value="1"></asp:ListItem>
<asp:ListItem Text="No Inventariable" Value="0"></asp:ListItem>
</asp:DropDownList>
</asp:DropDownList>
</div>
<div class="col-md-1 truncate" style="text-align: right!important">Grupo:</div>
<div class="col-md-2">
<asp:DropDownList ID="DdlGrupo" runat="server" CssClass="input-small input-sm select2me" Width="100%">
<asp:ListItem Text="Almacen" Value="1"></asp:ListItem>
<asp:ListItem Text="Clasificación" Value="2"></asp:ListItem>
</asp:DropDownList>
</div>
</div>
</div>
</div>
@@ -159,11 +177,12 @@
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="GVAlmacen" runat="server" AutoGenerateColumns="False" data-sort="true" EmptyDataText="No se encontraron Almacenes" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" GridLines="None">
<asp:GridView ID="GVAlmacen" runat="server" AutoGenerateColumns="False" data-sort="true" EmptyDataText="No se encontraron Almacenes" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" GridLines="None"
DataKeyNames="Gpo,CveAlmacen,CveClasificacion,FechaInicio,FechaFin" >
<Columns>
<asp:TemplateField HeaderText="Almacén">
<ItemTemplate>
<asp:HyperLink ID="HyperLink1" Target="_blank" NavigateUrl='<%# String.Format("/Inventarios/RepEntradasSalidas.aspx?CveAlmacen={0}&FechaInicio={1:d}&FechaCorte={2:d}&Tipo=-1", Eval("CveAlmacen").ToString, Eval("FechaInicio"), Eval("FechaFin"))%>' runat="server"><%# Eval("Almacen") %></asp:HyperLink>
<%--<asp:HyperLink ID="HyperLink1" Target="_blank" NavigateUrl='<%# String.Format("/Inventarios/RepEntradasSalidas.aspx?CveAlmacen={0}&FechaInicio={1:d}&FechaCorte={2:d}&Tipo=-1", Eval("CveAlmacen").ToString, Eval("FechaInicio"), Eval("FechaFin"))%>' runat="server"><%# Eval("Almacen") %></asp:HyperLink>--%>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Tipo Almacén">

View File

@@ -44,8 +44,11 @@ Partial Class Inventarios_RepAlmacen
End Sub
Private Sub CargaDatos()
Dim objInv As New ClsInventarios
Dim objInv As New ClsInventarios
GVAlmacen.Columns(1).Visible = If(DdlGrupo.SelectedValue.ToEntero = 1, True, False)
GVAlmacen.Columns(1).HeaderText = If(DdlGrupo.SelectedValue.ToEntero = 1, "Almacen", "Clasificación")
Dim FechaI, FechaF As String
FechaI = If(IsDate(TxtFechaI.Text.Trim()), TxtFechaI.Text.Trim(), "-1")
FechaF = If(IsDate(TxtFechaF.Text.Trim()), TxtFechaF.Text.Trim(), "-1")
@@ -54,7 +57,7 @@ Partial Class Inventarios_RepAlmacen
Dim CveSubProyecto As Integer = DdlSucursal.SelectedValue.ToEntero()
If objInv.GetRepAlmacenes(FechaI, FechaF, UsuarioActual.CveEmpresa, TipoAlmacen, DdlModalidadFiltro.SelectedValue.ToEntero, DdlAplicaInventario.SelectedValue.ToEntero,
Almacenes:=Almacenes, CveSubProyecto:=CveSubProyecto, CveUsuarioConsulta:=UsuarioActual.CveUsuario) Then
Almacenes:=Almacenes, CveSubProyecto:=CveSubProyecto, CveUsuarioConsulta:=UsuarioActual.CveUsuario, Gpo:=DdlGrupo.SelectedValue.ToEntero) Then
GVAlmacen.DataSource = objInv.DtResultados
TmpDT = objInv.DtResultados
End If
@@ -98,17 +101,40 @@ Partial Class Inventarios_RepAlmacen
params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString))
params.Add(New ReportParameter("Filtros", StrFiltro.ToString))
params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))
ImprimirPDF("Empresas/Grales/Formatos/RepAlmacen.rdlc", TmpDT, params, "ReporteAlmacen", Formato)
Dim Archivo As String = If(DdlGrupo.SelectedValue.ToEntero = 1, "RepAlmacen.rdlc", "RepAlmacenClasificacion.rdlc")
ImprimirPDF($"Empresas/Grales/Formatos/{Archivo}", TmpDT, params, "ReporteAlmacen", Formato)
End Sub
Protected Sub LnkPdf_Click(sender As Object, e As EventArgs) Handles LnkPdf.Click
GenerarPDF()
End Sub
Private Sub GVAlmacen_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GVAlmacen.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
If e.Row.FCLabel("LtlAlmacen").Text = "" Then
Private Sub GVAlmacen_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GVAlmacen.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
'If e.Row.FCLabel("LtlAlmacen").Text = "" Then
' e.Row.CssClass = "Totales"
'End If
If e.Row.DataKey("Gpo") = "Total" Then
e.Row.CssClass = "Totales"
End If
End If
Dim Liga As String = $"./RepEntradasSalidas.aspx?CveAlmacen={e.Row.DataKey("CveAlmacen").ToEntero}&CveClasificacion={e.Row.DataKey("CveClasificacion").ToEntero}&FechaInicio={e.Row.DataKey("FechaInicio").ToDate.ToString("dd/MM/yyyy")}&FechaCorte={e.Row.DataKey("FechaFin").ToDate.ToString("dd/MM/yyyy")}&Tipo=-1"
e.Row.Cells(0).Text = $"<a href='{Liga}' target='_blank' >{e.Row.DataKey("Gpo")}</a>"
'If DdlGrupo.SelectedValue.ToEntero = 1 Then
' Dim Liga As String = $"./RepEntradasSalidas.aspx?CveAlmacen={e.Row.DataKey("CveAlmacen").ToEntero}&FechaInicio={e.Row.DataKey("FechaInicio").ToDate.ToString("dd/MM/yyyy")}&FechaCorte={e.Row.DataKey("FechaFin").ToDate.ToString("dd/MM/yyyy")}&Tipo=-1"
' e.Row.Cells(0).Text = $"<a href='{Liga}' target='_blank' >{e.Row.DataKey("Gpo")}</a>"
'Else
' Dim Liga As String = $"./RepEntradasSalidas.aspx?CveAlmacen={e.Row.DataKey("CveAlmacen").ToEntero}&CveClasificacion={e.Row.DataKey("CveClasificacion").ToEntero}&FechaInicio={e.Row.DataKey("FechaInicio").ToDate.ToString("dd/MM/yyyy")}&FechaCorte={e.Row.DataKey("FechaFin").ToDate.ToString("dd/MM/yyyy")}&Tipo=-1"
' e.Row.Cells(0).Text = $"<a href='{Liga}' target='_blank' >{e.Row.DataKey("Gpo")}</a>"
'End If
End If
End Sub
#End Region
@@ -169,4 +195,6 @@ Partial Class Inventarios_RepAlmacen
#End Region
Public Overrides Sub VerifyRenderingInServerForm(control As Control)
End Sub
End Class

View File

@@ -74,31 +74,42 @@ Partial Class Inventarios_ReporteEntradasSalidas
FechaFinal = "-1"
CargaCombos()
GvM.DataBind(True)
If Not IsNothing(Request("CveAlmacen")) Then
DdlAlmacen.SelectedValue = Request("CveAlmacen").ToString()
TxtFechaI.Text = "01/01/2000"
If Not IsNothing(Request("FechaCorte")) Then
TxtFechaF.Text = Request("FechaCorte")
End If
If Not IsNothing(Request("FechaInicio")) And IsDate(Request("FechaInicio")) Then
TxtFechaI.Text = Request("FechaInicio")
End If
If Not IsNothing(Request("Tipo")) Then
DdlMovs.SelectedValueExist(Request("Tipo").ToEntero)
End If
btConsultar_Click(Nothing, Nothing)
End If
CargaRequest()
CargaPermisos()
CargaGvBitacora()
' Lnkcompuxlsinventarios.Visible = UsuarioActual.CveEmpresa = 72
End If
End Sub
Private Sub CargaRequest()
Dim CveAlmacen As Integer = If(Not IsNothing(Request("CveAlmacen")) AndAlso Request("CveAlmacen").ToEntero > 0, Request("CveAlmacen").ToEntero, -1)
Dim CveClasificacion As Integer = If(Not IsNothing(Request("CveClasificacion")) AndAlso Request("CveClasificacion").ToEntero > 0, Request("CveClasificacion").ToEntero, -1)
If CveAlmacen > 0 Or CveClasificacion > 0 Then ' CveClasificacion
DdlAlmacen.SelectedValuesIfExist(CveAlmacen.ToString)
DdlClasificacion.SelectedValueExist(CveClasificacion)
TxtFechaI.Text = "01/01/2000"
If Not IsNothing(Request("FechaCorte")) Then
TxtFechaF.Text = Request("FechaCorte")
End If
If Not IsNothing(Request("FechaInicio")) And IsDate(Request("FechaInicio")) Then
TxtFechaI.Text = Request("FechaInicio")
End If
If Not IsNothing(Request("Tipo")) Then
DdlMovs.SelectedValueExist(Request("Tipo").ToEntero)
End If
CargaDatos()
End If
End Sub
Private Sub CargaPermisos()
Dim TienePermisoImportes As Boolean = UsuarioActual.TienePermisoProceso(201)