Proveedores correcion Tipo Fecha vencimiento correcion, Wish List Ajustes

This commit is contained in:
rakcsle
2025-03-26 08:19:56 -07:00
parent 09767a84cc
commit 261eb6e393
5 changed files with 80 additions and 46 deletions

View File

@@ -2633,7 +2633,7 @@ Public Class ClsOC
End Function End Function
Public Function PendientesCompra(CvePS As Integer, CveSubProyectos As String, CveEmpresa As Integer) As Boolean Public Function PendientesCompra(CvePS As Integer, CveSubProyectos As String, CveEmpresa As Integer, Optional Opcion As Integer = 1) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_OC_PendientesCompra") DataAdapter("PA_OC_PendientesCompra")
@@ -2641,6 +2641,7 @@ Public Class ClsOC
.Add("@CvePS", SqlDbType.Int).Value = CvePS .Add("@CvePS", SqlDbType.Int).Value = CvePS
.Add("@CveSubProyectos", SqlDbType.VarChar, 100).Value = CveSubProyectos .Add("@CveSubProyectos", SqlDbType.VarChar, 100).Value = CveSubProyectos
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@Opcion", SqlDbType.Int).Value = Opcion
End With End With
Try Try
@@ -2653,7 +2654,7 @@ Public Class ClsOC
Return Retorno Return Retorno
End Function End Function
Public Function CancelarPartidaPendiente(CveOrdenCompraDetalle As Integer, NuevaCantidad As Decimal, CveEmpresa As Integer) As Boolean Public Function CancelarPartidaPendiente(CveOrdenCompraDetalle As Integer, NuevaCantidad As Decimal, CveEmpresa As Integer, Optional Opcion As Integer = 1) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_OC_CancelarPartidaPendiente") DataAdapter("PA_OC_CancelarPartidaPendiente")
@@ -2661,6 +2662,7 @@ Public Class ClsOC
.Add("@CveOrdenCompraDetalle", SqlDbType.Int).Value = CveOrdenCompraDetalle .Add("@CveOrdenCompraDetalle", SqlDbType.Int).Value = CveOrdenCompraDetalle
.Add("@NuevaCantidad", SqlDbType.Decimal).Value = NuevaCantidad .Add("@NuevaCantidad", SqlDbType.Decimal).Value = NuevaCantidad
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@Opcion", SqlDbType.Int).Value = Opcion
End With End With
Try Try

View File

@@ -3288,14 +3288,11 @@
<asp:CheckBox ID="ChkUsaLimiteCredito" runat="server" /> <asp:CheckBox ID="ChkUsaLimiteCredito" runat="server" />
</div> </div>
<div class="form-group form-md-line-input input-iconright"> <div class="form-group form-md-line-input input-iconright">
<asp:DropDownList runat="server" ID="DdlTipoFechaVencimiento" CssClass="form-control select2me" Width="200px"> <asp:DropDownList runat="server" ID="DdlTipoFechaVencimiento" CssClass="form-control select2me" Width="200px">
<asp:ListItem Value="-1">-</asp:ListItem>
<asp:ListItem Value="1">Fecha Factura</asp:ListItem> <asp:ListItem Value="1">Fecha Factura</asp:ListItem>
<asp:ListItem Value="2">Fecha Entrada</asp:ListItem> <asp:ListItem Value="2">Fecha Entrada</asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
<asp:RequiredFieldValidator ID="RfvDdlTipoFechaVencimiento" InitialValue="-1" runat="server" ControlToValidate="DdlTipoFechaVencimiento" Display="None"
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo Fecha Vencimiento''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCRfvDdlTipoFechaVencimiento" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlTipoFechaVencimiento" Width="300px"></ajax:ValidatorCalloutExtender>
<label for="<%= DdlTipoFechaVencimiento.ClientID.ToString()%>">Tipo Fecha Vencimiento:</label> <label for="<%= DdlTipoFechaVencimiento.ClientID.ToString()%>">Tipo Fecha Vencimiento:</label>
</div> </div>
</div> </div>

View File

@@ -425,42 +425,17 @@
</asp:UpdatePanel> </asp:UpdatePanel>
<div class="row"> <div class="row">
<div class="col-md-6"> <div class="col-md-5">
<asp:UpdatePanel runat="server" UpdateMode="Conditional" ID="UpNumeroParte"> <asp:UpdatePanel runat="server" UpdateMode="Conditional" ID="UpNumeroParte">
<ContentTemplate> <ContentTemplate>
<asp:Label runat="server" ID="LblNumeroParte" Text="" Visible ="false"></asp:Label> <asp:Label runat="server" ID="LblNumeroParte" Text="" Visible ="false"></asp:Label>
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </asp:UpdatePanel>
</div>
</div>
<div class="col-md-1">
<asp:UpdatePanel runat="server" ID="UpAddWishList" UpdateMode="Conditional">
<ContentTemplate>
<div runat="server" id="DVWishList" visible="false">
<table style="width:170px!important" >
<td style="width:70px!important">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox runat="server" ID="TxtCantidad" Width="70px" CssClass="form-control"></asp:TextBox>
<label for="<%= TxtCantidad.ClientID.ToString()%>">Cantidad:</label>
<ajax:FilteredTextBoxExtender runat="server" TargetControlID="TxtCantidad" FilterType="Custom" ValidChars="1234567890." />
</div>
</td>
<td style="width:100px!important">
<asp:LinkButton ID="LnkAgrgarWishList" ClientIDMode="Static" runat="server" CssClass="btn btn-primary" OnClick="LnkAgrgarWishList_Click" Width="91px"><i class="fa fa-shopping-cart" aria-hidden="true"></i> Agregar</asp:LinkButton>
</td>
</table>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
<asp:UpdatePanel runat="server" ID="UpOCS" UpdateMode="Conditional"> <asp:UpdatePanel runat="server" ID="UpOCS" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<div class="col-md-1" style="text-align:right!important"> <div class="col-md-1" style="text-align:right!important">
<div id="DivIndicadorL1" runat="server" visible="false" > <div id="DivIndicadorL1" runat="server" visible="false" >
@@ -497,11 +472,51 @@
</div> </div>
</div> </div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
<div class="col-md-2">
<asp:UpdatePanel runat="server" ID="UpAddWishList" UpdateMode="Conditional">
<ContentTemplate>
<div runat="server" id="DVWishList" visible="false" style="margin-top:-3PX">
<table style="width: 220px!important">
<td style="width: 50px!important">
<div>
<div style="color: gray; font-size: 12px; font-weight: bold;">
REQ
</div>
<div style="color: blue; font-size: 20px; font-weight: bold;">
<asp:LinkButton ID="LnkIndicador_REQ" Text="" OnClick="LnkIndicador_REQ_Click" runat="server" CssClass="Texto" />
</div>
</div>
</td>
<td style="width: 70px!important">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox runat="server" ID="TxtCantidad" Width="70px" CssClass="form-control"></asp:TextBox>
<label for="<%= TxtCantidad.ClientID.ToString()%>">Cantidad:</label>
<ajax:FilteredTextBoxExtender runat="server" TargetControlID="TxtCantidad" FilterType="Custom" ValidChars="1234567890." />
</div>
</td>
<td style="width: 100px!important">
<asp:LinkButton ID="LnkAgrgarWishList" ClientIDMode="Static" runat="server" CssClass="btn btn-primary" OnClick="LnkAgrgarWishList_Click" Width="91px"><i class="fa fa-shopping-cart"></i> Agregar</asp:LinkButton>
</td>
</table>
</div> </div>
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </asp:UpdatePanel>
</div>

View File

@@ -334,22 +334,34 @@ Partial Class Inventarios_Kardex
End Sub End Sub
Private Sub CargarOCPendientesCompra()
Private Sub CargarOCPendientesCompra(Opcion As Integer) ' Opcion1 OC, 2 REQ
Dim tCveSubProyectos As String = "-1" Dim tCveSubProyectos As String = "-1"
If ddlAlmacen.SelectedValue <> "" Then If ddlAlmacen.SelectedValue <> "" Then
Dim tt As String = ddlAlmacen.GetSelectedValues() Dim tt As String = ddlAlmacen.GetSelectedValues()
tCveSubProyectos = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltraParametros($"CveAlmacen IN ({tt})").DataColumnToString("CveSubProyecto") tCveSubProyectos = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltraParametros($"CveAlmacen IN ({tt})").DataColumnToString("CveSubProyecto")
End If End If
Dim ObjOC As New ClsOC Dim ObjOC As New ClsOC
If ObjOC.PendientesCompra(ddlProducto2.SelectedValue.ToEntero, tCveSubProyectos, UsuarioActual.CveEmpresa) Then If ObjOC.PendientesCompra(ddlProducto2.SelectedValue.ToEntero, tCveSubProyectos, UsuarioActual.CveEmpresa, Opcion:=Opcion) Then
GvOC.DataSource = ObjOC.DtResultados.Copy.FiltraParametros("", "Fecha Desc") GvOC.DataSource = ObjOC.DtResultados.Copy.FiltraParametros("", "Fecha Desc")
LnkIndicador_OC.Text = ObjOC.DtResultados.Copy.SUM("CantidadPendienteVincular").ToString() If Opcion = 1 Then
LnkIndicador_OC2.Text = ObjOC.DtResultados.Copy.SUM("CantidadPendienteVincular").ToString() LnkIndicador_OC.Text = ObjOC.DtResultados.Copy.SUM("CantidadPendienteVincular").ToString()
LnkIndicador_OC2.Text = ObjOC.DtResultados.Copy.SUM("CantidadPendienteVincular").ToString()
ElseIf Opcion = 2 Then
LnkIndicador_REQ.Text = ObjOC.DtResultados.Copy.SUM("CantidadPendienteVincular").ToString().ToDecimal.RoundSQL(2).ToString
End If
End If End If
ObjOC.Dispose() ObjOC.Dispose()
GvOC.DataBind() GvOC.DataBind()
UpModalOC.Update() UpModalOC.Update()
UpOCS.Update() UpOCS.Update()
UpAddWishList.Update()
End Sub End Sub
@@ -463,7 +475,8 @@ Partial Class Inventarios_Kardex
End If End If
If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
CargarOCPendientesCompra() CargarOCPendientesCompra(1)
CargarOCPendientesCompra(2)
CargaPreciosLista(CvePS) CargaPreciosLista(CvePS)
DivIndicadorOC.Visible = True DivIndicadorOC.Visible = True
DivIndicadorOC2.Visible = True DivIndicadorOC2.Visible = True
@@ -837,6 +850,11 @@ Partial Class Inventarios_Kardex
RegistraScript(String.Format("$('#{0}').modal('show');", "ModalOC")) RegistraScript(String.Format("$('#{0}').modal('show');", "ModalOC"))
End Sub End Sub
Protected Sub LnkIndicador_REQ_Click(sender As Object, e As EventArgs)
UpModalOC.Update()
RegistraScript(String.Format("$('#{0}').modal('show');", "ModalOC"))
End Sub
Protected Sub LnkCancelarOCDetalle_Click(sender As Object, e As EventArgs) Protected Sub LnkCancelarOCDetalle_Click(sender As Object, e As EventArgs)
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).BindingContainer, GridViewRow) Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).BindingContainer, GridViewRow)
@@ -848,8 +866,9 @@ Partial Class Inventarios_Kardex
End If End If
Dim ObjOC As New ClsOC Dim ObjOC As New ClsOC
If ObjOC.CancelarPartidaPendiente(CveOrdenCompraDetalle, NuevaCantidad, UsuarioActual.CveEmpresa) Then If ObjOC.CancelarPartidaPendiente(CveOrdenCompraDetalle, NuevaCantidad, UsuarioActual.CveEmpresa, GlobalDTAFCaracteristicasOpciones:=1) Then
CargarOCPendientesCompra() CargarOCPendientesCompra(1)
CargarOCPendientesCompra(2)
Alert("La partida se cancelo correctamente.") Alert("La partida se cancelo correctamente.")
End If End If

View File

@@ -58,6 +58,7 @@ Partial Class Inventarios_RepAlmacen
If objInv.GetRepAlmacenes(FechaI, FechaF, UsuarioActual.CveEmpresa, TipoAlmacen, DdlModalidadFiltro.SelectedValue.ToEntero, DdlAplicaInventario.SelectedValue.ToEntero, If objInv.GetRepAlmacenes(FechaI, FechaF, UsuarioActual.CveEmpresa, TipoAlmacen, DdlModalidadFiltro.SelectedValue.ToEntero, DdlAplicaInventario.SelectedValue.ToEntero,
Almacenes:=Almacenes, CveSubProyecto:=CveSubProyecto, CveUsuarioConsulta:=UsuarioActual.CveUsuario, Gpo:=DdlGrupo.SelectedValue.ToEntero) Then Almacenes:=Almacenes, CveSubProyecto:=CveSubProyecto, CveUsuarioConsulta:=UsuarioActual.CveUsuario, Gpo:=DdlGrupo.SelectedValue.ToEntero) Then
GVAlmacen.DataSource = objInv.DtResultados GVAlmacen.DataSource = objInv.DtResultados
TmpDT = objInv.DtResultados TmpDT = objInv.DtResultados
End If End If