Proveedores correcion Tipo Fecha vencimiento correcion, Wish List Ajustes
This commit is contained in:
@@ -2633,7 +2633,7 @@ Public Class ClsOC
|
||||
|
||||
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
|
||||
DataAdapter("PA_OC_PendientesCompra")
|
||||
|
||||
@@ -2641,6 +2641,7 @@ Public Class ClsOC
|
||||
.Add("@CvePS", SqlDbType.Int).Value = CvePS
|
||||
.Add("@CveSubProyectos", SqlDbType.VarChar, 100).Value = CveSubProyectos
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@Opcion", SqlDbType.Int).Value = Opcion
|
||||
End With
|
||||
|
||||
Try
|
||||
@@ -2653,7 +2654,7 @@ Public Class ClsOC
|
||||
Return Retorno
|
||||
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
|
||||
DataAdapter("PA_OC_CancelarPartidaPendiente")
|
||||
|
||||
@@ -2661,6 +2662,7 @@ Public Class ClsOC
|
||||
.Add("@CveOrdenCompraDetalle", SqlDbType.Int).Value = CveOrdenCompraDetalle
|
||||
.Add("@NuevaCantidad", SqlDbType.Decimal).Value = NuevaCantidad
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@Opcion", SqlDbType.Int).Value = Opcion
|
||||
End With
|
||||
|
||||
Try
|
||||
|
||||
@@ -3288,14 +3288,11 @@
|
||||
<asp:CheckBox ID="ChkUsaLimiteCredito" runat="server" />
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList runat="server" ID="DdlTipoFechaVencimiento" CssClass="form-control select2me" Width="200px">
|
||||
<asp:ListItem Value="-1">-</asp:ListItem>
|
||||
<asp:DropDownList runat="server" ID="DdlTipoFechaVencimiento" CssClass="form-control select2me" Width="200px">
|
||||
<asp:ListItem Value="1">Fecha Factura</asp:ListItem>
|
||||
<asp:ListItem Value="2">Fecha Entrada</asp:ListItem>
|
||||
</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>
|
||||
</asp:DropDownList>
|
||||
|
||||
<label for="<%= DdlTipoFechaVencimiento.ClientID.ToString()%>">Tipo Fecha Vencimiento:</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -425,42 +425,17 @@
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="col-md-5">
|
||||
<asp:UpdatePanel runat="server" UpdateMode="Conditional" ID="UpNumeroParte">
|
||||
<ContentTemplate>
|
||||
<asp:Label runat="server" ID="LblNumeroParte" Text="" Visible ="false"></asp:Label>
|
||||
</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">
|
||||
<ContentTemplate>
|
||||
<asp:UpdatePanel runat="server" ID="UpOCS" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="col-md-1" style="text-align:right!important">
|
||||
<div id="DivIndicadorL1" runat="server" visible="false" >
|
||||
@@ -497,11 +472,51 @@
|
||||
</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>
|
||||
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -334,22 +334,34 @@ Partial Class Inventarios_Kardex
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargarOCPendientesCompra()
|
||||
|
||||
Private Sub CargarOCPendientesCompra(Opcion As Integer) ' Opcion1 OC, 2 REQ
|
||||
|
||||
|
||||
Dim tCveSubProyectos As String = "-1"
|
||||
If ddlAlmacen.SelectedValue <> "" Then
|
||||
Dim tt As String = ddlAlmacen.GetSelectedValues()
|
||||
tCveSubProyectos = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltraParametros($"CveAlmacen IN ({tt})").DataColumnToString("CveSubProyecto")
|
||||
End If
|
||||
|
||||
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")
|
||||
LnkIndicador_OC.Text = ObjOC.DtResultados.Copy.SUM("CantidadPendienteVincular").ToString()
|
||||
LnkIndicador_OC2.Text = ObjOC.DtResultados.Copy.SUM("CantidadPendienteVincular").ToString()
|
||||
If Opcion = 1 Then
|
||||
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
|
||||
|
||||
ObjOC.Dispose()
|
||||
GvOC.DataBind()
|
||||
UpModalOC.Update()
|
||||
UpOCS.Update()
|
||||
UpAddWishList.Update()
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -463,7 +475,8 @@ Partial Class Inventarios_Kardex
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
|
||||
CargarOCPendientesCompra()
|
||||
CargarOCPendientesCompra(1)
|
||||
CargarOCPendientesCompra(2)
|
||||
CargaPreciosLista(CvePS)
|
||||
DivIndicadorOC.Visible = True
|
||||
DivIndicadorOC2.Visible = True
|
||||
@@ -837,6 +850,11 @@ Partial Class Inventarios_Kardex
|
||||
RegistraScript(String.Format("$('#{0}').modal('show');", "ModalOC"))
|
||||
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)
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).BindingContainer, GridViewRow)
|
||||
|
||||
@@ -848,8 +866,9 @@ Partial Class Inventarios_Kardex
|
||||
End If
|
||||
|
||||
Dim ObjOC As New ClsOC
|
||||
If ObjOC.CancelarPartidaPendiente(CveOrdenCompraDetalle, NuevaCantidad, UsuarioActual.CveEmpresa) Then
|
||||
CargarOCPendientesCompra()
|
||||
If ObjOC.CancelarPartidaPendiente(CveOrdenCompraDetalle, NuevaCantidad, UsuarioActual.CveEmpresa, GlobalDTAFCaracteristicasOpciones:=1) Then
|
||||
CargarOCPendientesCompra(1)
|
||||
CargarOCPendientesCompra(2)
|
||||
Alert("La partida se cancelo correctamente.")
|
||||
End If
|
||||
|
||||
|
||||
@@ -58,6 +58,7 @@ Partial Class Inventarios_RepAlmacen
|
||||
|
||||
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
|
||||
|
||||
GVAlmacen.DataSource = objInv.DtResultados
|
||||
TmpDT = objInv.DtResultados
|
||||
End If
|
||||
|
||||
Reference in New Issue
Block a user