-cambios en validacion de uso de Secciones Almacen, Serie,Lote, Caducidad
This commit is contained in:
@@ -386,7 +386,6 @@ Partial Class Inventarios_RecepcionUsados
|
||||
BtnContabilizar.Enabled = PermiteContabilizar()
|
||||
BtnNuevo.Enabled = PermiteCrearNuevo()
|
||||
|
||||
ActivaPermisoSeccionAlmacen()
|
||||
If CveMovimiento > 0 Then
|
||||
PermisoVerImportes()
|
||||
End If
|
||||
@@ -417,11 +416,7 @@ Partial Class Inventarios_RecepcionUsados
|
||||
Private Function PermiteCrearNuevo() As Boolean
|
||||
Return If(UsuarioActual.TienePermisoProceso(184) Or EsConsumoInterno, True, False)
|
||||
End Function
|
||||
Private Sub ActivaPermisoSeccionAlmacen()
|
||||
' GvM.Columns(12).Visible = UsuarioActual.Empresa.Funcionalidad(147) = "1"
|
||||
|
||||
|
||||
End Sub
|
||||
Private Sub PermisoVerImportes()
|
||||
Dim TienePermisoImportes As Boolean = UsuarioActual.TienePermisoProceso(201)
|
||||
End Sub
|
||||
@@ -465,7 +460,6 @@ Partial Class Inventarios_RecepcionUsados
|
||||
dt.Columns.Add("CveAF")
|
||||
dt.Columns.Add("SerieLote", Type.GetType("System.String"))
|
||||
dt.Columns.Add("Lote", Type.GetType("System.String"))
|
||||
dt.Columns.Add("Batch", Type.GetType("System.String"))
|
||||
|
||||
dt.Columns.Add("Observaciones")
|
||||
dt.Columns.Add("CountMovimientoEntradaDetalle")
|
||||
@@ -481,10 +475,6 @@ Partial Class Inventarios_RecepcionUsados
|
||||
End Sub
|
||||
Private Sub CargaCombos()
|
||||
|
||||
DdlSeccion.DataSource = GlobalDTSeccionAlmacen(UsuarioActual.CveEmpresa)
|
||||
DdlSeccion.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
DdlSeccion.DataBind()
|
||||
|
||||
'Llenar el dropdownlist de monedas
|
||||
DdlMoneda.DataSource = GlobalDTMonedas
|
||||
DdlMoneda.DataBind()
|
||||
@@ -870,9 +860,9 @@ Partial Class Inventarios_RecepcionUsados
|
||||
#End Region
|
||||
|
||||
#Region " AGREGAR - GUARDAR "
|
||||
Private Function GetExistencias(CvePS As Integer, CveUnidadMedida As Integer, CveEmpresa As Integer, CveAlmacen As Integer, Optional SerieLote As String = "-1", Optional Lote As String = "-1", Optional Batch As String = "-1") As Double
|
||||
Private Function GetExistencias(CvePS As Integer, CveUnidadMedida As Integer, CveEmpresa As Integer, CveAlmacen As Integer, Optional SerieLote As String = "-1", Optional Lote As String = "-1", Optional FechaCaducidad As Date = MinFecha) As Double
|
||||
Dim Inv As New ClsInventarios
|
||||
Dim Existencia As Double = Inv.GetExistenciasPS(CvePS, CveUnidadMedida, CveEmpresa, CveAlmacen, -1, FechaMovto:=String.Format("{0} {1}", TxtFecha.Text.ToDate.ToString("yyyy/MM/dd"), TxtHoraInicio.PostedTime), SerieLote:=SerieLote, Lote:=Lote, Batch:=Batch)
|
||||
Dim Existencia As Double = Inv.GetExistenciasPS(CvePS, CveUnidadMedida, CveEmpresa, CveAlmacen, -1, FechaMovto:=String.Format("{0} {1}", TxtFecha.Text.ToDate.ToString("yyyy/MM/dd"), TxtHoraInicio.PostedTime), SerieLote:=SerieLote, Lote:=Lote, FechaCaducidad:=FechaCaducidad)
|
||||
Inv.Dispose()
|
||||
Return Existencia
|
||||
End Function
|
||||
@@ -976,7 +966,6 @@ Partial Class Inventarios_RecepcionUsados
|
||||
registro.Item("CveAF") = CveAF
|
||||
registro.Item("SerieLote") = If(SerieLote <> "", SerieLote, "")
|
||||
registro.Item("Lote") = If(Lote <> "", Lote, "")
|
||||
registro.Item("Batch") = If(Batch <> "", Batch, "")
|
||||
registro.Item("Observaciones") = Observaciones
|
||||
|
||||
registro.Item("CveTamaño") = CveTamaño
|
||||
@@ -1013,7 +1002,6 @@ Partial Class Inventarios_RecepcionUsados
|
||||
DtMovimientos.Rows(IndexDTUsado)("CveAF") = CveAF
|
||||
DtMovimientos.Rows(IndexDTUsado)("SerieLote") = If(SerieLote <> "", SerieLote, "")
|
||||
DtMovimientos.Rows(IndexDTUsado)("Lote") = If(Lote <> "", Lote, "")
|
||||
DtMovimientos.Rows(IndexDTUsado)("Batch") = If(Batch <> "", Batch, "")
|
||||
DtMovimientos.Rows(IndexDTUsado)("Observaciones") = Observaciones
|
||||
|
||||
DtMovimientos.Rows(IndexDTUsado)("CveTamaño") = CveTamaño
|
||||
@@ -1133,7 +1121,7 @@ Partial Class Inventarios_RecepcionUsados
|
||||
ImporteConcepto = Dr("PU").ToString.ToDecimal
|
||||
End If
|
||||
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, ImporteConcepto, Dr("CveAF").ToString.ToEntero, -1, Dr("SerieLote").ToString, Dr("Observaciones").ToString, Lote:=Dr("Lote").ToString, Batch:=Dr("Batch").ToString, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, ImporteConcepto, Dr("CveAF").ToString.ToEntero, -1, Dr("SerieLote").ToString, Dr("Observaciones").ToString, Lote:=Dr("Lote").ToString, FechaCaducidad:=Dr("FechaCaducidad").ToString.ToDate, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
||||
Mensaje = "Error al guardar los movimientos"
|
||||
ErrorMovInv = True
|
||||
Exit For
|
||||
@@ -1273,7 +1261,7 @@ Partial Class Inventarios_RecepcionUsados
|
||||
-1, -1, -1, -1, Modulo:="RU/G")
|
||||
End If
|
||||
|
||||
ObjInv.AddMovimientoDetalle(CveMovimiento, Cantidad, CveUM, CvePS, CostoPromedio, -1, SerieLote:=SerieLote)
|
||||
ObjInv.AddMovimientoDetalle(CveMovimiento, Cantidad, CveUM, CvePS, CostoPromedio, -1, Serie:=SerieLote)
|
||||
ObjInv.GetMovimientosDetalle(CveMovimiento, UsuarioActual.CveEmpresa)
|
||||
DtMovimientos = ObjInv.DtResultados.FiltraParametros("", "CveMovimientoDetalle DESC").AsEnumerable.Take(25).CopyToDataTable
|
||||
ObjInv.Dispose()
|
||||
|
||||
Reference in New Issue
Block a user