diff --git a/App_Code/ClsOC.vb b/App_Code/ClsOC.vb
index b632cf800..e7b81ca0c 100644
--- a/App_Code/ClsOC.vb
+++ b/App_Code/ClsOC.vb
@@ -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
diff --git a/Compras/Proveedores.aspx b/Compras/Proveedores.aspx
index d15ca089f..ff3731bfc 100644
--- a/Compras/Proveedores.aspx
+++ b/Compras/Proveedores.aspx
@@ -3288,14 +3288,11 @@
diff --git a/Inventarios/Kardex.aspx b/Inventarios/Kardex.aspx
index 08e58753a..5ac90999b 100644
--- a/Inventarios/Kardex.aspx
+++ b/Inventarios/Kardex.aspx
@@ -425,42 +425,17 @@
+
+
+
+
+
+
+
+
+ |
+
+
+
+ |
+
+
+
+ |
+
+ Agregar
+ |
+
-
+
+
+
+
+
+
+
diff --git a/Inventarios/Kardex.aspx.vb b/Inventarios/Kardex.aspx.vb
index 3f8c5340b..55ae9d92f 100644
--- a/Inventarios/Kardex.aspx.vb
+++ b/Inventarios/Kardex.aspx.vb
@@ -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
diff --git a/Inventarios/RepAlmacen.aspx.vb b/Inventarios/RepAlmacen.aspx.vb
index ee88947c6..1014abc19 100644
--- a/Inventarios/RepAlmacen.aspx.vb
+++ b/Inventarios/RepAlmacen.aspx.vb
@@ -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