Agregar la funcion de agrupar por subproyecto en kardexhorizontal

This commit is contained in:
HECTOR RODRIGUEZ
2021-07-15 23:30:09 -07:00
parent 8c90c144e0
commit 363cfcb837

View File

@@ -1541,6 +1541,47 @@ Public Class ClsInventarios
Return Retorno
End Function
Public Function GetKardexAlmacenHorizontalAgrupado(CvePS As Integer, FechaFin As Date, CveAlmacen As Integer, CveUnidadMedida As Integer, CveProveedor As Integer, CveTipoAlmacen As Integer,
IncluyeTransitorios As Integer, CveClasificacion As Integer, CveUsuario As Integer, CveEmpresa As Integer, Optional CondicionExistencias As Integer = 0,
Optional Orden As Integer = -1, Optional Marcas As String = "-1", Optional IncluyeProyectado As Integer = -1, Optional CveAlmacenes As String = "-1") As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Inv_KardexAlmacenHorizontalGetAgrupado")
With SqlAdapter.SelectCommand.Parameters
'.Add("@FechaI", SqlDbType.VarChar).Value = FechaI
.Add("@FechaFin", SqlDbType.Date).Value = FechaFin
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacion
.Add("@CvePS", SqlDbType.Int).Value = CvePS
.Add("@CveAlmacen", SqlDbType.Int).Value = CveAlmacen
.Add("@CveUnidadMedida", SqlDbType.Int).Value = CveUnidadMedida
.Add("@IncluyeTransitorios", SqlDbType.Int).Value = IncluyeTransitorios
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@CveProveedorCompra", SqlDbType.Int).Value = CveProveedor
.Add("@CveTipoAlmacen", SqlDbType.Int).Value = CveTipoAlmacen
.Add("@ExistenciasCondicion", SqlDbType.Int).Value = CondicionExistencias
.Add("@Orden", SqlDbType.Int).Value = Orden
.Add("@Marcas", SqlDbType.VarChar).Value = Marcas
.Add("@IncluyeProyectado", SqlDbType.TinyInt).Value = IncluyeProyectado
.Add("@CveAlmacenes", SqlDbType.NVarChar).Value = CveAlmacenes
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch Ex1 As SqlException
Me.OnError("Ocurrió un error al obtener el kardex de almacen.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
Catch ex As Exception
OnError("Ocurrió un error al obtener el kardex de almacen.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
Return Retorno
End Function
Public Function GetKardex(Entrada As Boolean, Salida As Boolean, CvePS As Integer, FechaI As String, FechaF As String, CveAlmacen As Integer, CveTiposAlmacen As String, CveUnidadMedida As Integer, CveUsuario As Integer, CveEmpresa As Integer, Optional AgruparAlmacen As Boolean = False, Optional Serie As String = "-1", Optional CveAlmacenes As String = "-1") As Boolean
Dim Retorno As Boolean = False