aplica lote/caducidad ajuste en pantalla
This commit is contained in:
@@ -125,11 +125,22 @@ Partial Class Inventarios_AjustesSeccionAlmacen
|
|||||||
If gvr.FCCheckBox("ChkEditCaducidad").Checked And FechaCaducidadNueva.Length > 0 And FechaCaducidadNueva <> FechaCaducidadOriginal Then
|
If gvr.FCCheckBox("ChkEditCaducidad").Checked And FechaCaducidadNueva.Length > 0 And FechaCaducidadNueva <> FechaCaducidadOriginal Then
|
||||||
If Not ListaCaducidad.ContainsKey(gvr.DataKey("CvePS").ToEntero) Then ListaCaducidad.Add(gvr.DataKey("CvePS").ToEntero, FechaCaducidadNueva) 'guardo que dato le corresponde
|
If Not ListaCaducidad.ContainsKey(gvr.DataKey("CvePS").ToEntero) Then ListaCaducidad.Add(gvr.DataKey("CvePS").ToEntero, FechaCaducidadNueva) 'guardo que dato le corresponde
|
||||||
Modificar = True
|
Modificar = True
|
||||||
|
If FechaCaducidadOriginal = "" Then
|
||||||
|
ErrorMovInv = Not ObjPS.UpdateAplicaLoteCaducidadAlmacen(gvr.DataKey("CvePS").ToEntero, UsuarioActual.CveEmpresa, False, False)
|
||||||
|
Else
|
||||||
|
ErrorMovInv = Not ObjPS.UpdateAplicaLoteCaducidadAlmacen(gvr.DataKey("CvePS").ToEntero, UsuarioActual.CveEmpresa, True, True)
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If gvr.FCCheckBox("ChkLote").Checked And LoteNuevo.Length > 0 And LoteNuevo <> LoteOriginal Then
|
If gvr.FCCheckBox("ChkLote").Checked And LoteNuevo.Length > 0 And LoteNuevo <> LoteOriginal Then
|
||||||
If Not ListaLote.ContainsKey(gvr.DataKey("CvePS").ToEntero) Then ListaLote.Add(gvr.DataKey("CvePS").ToEntero, LoteNuevo) 'guardo que dato le corresponde
|
If Not ListaLote.ContainsKey(gvr.DataKey("CvePS").ToEntero) Then ListaLote.Add(gvr.DataKey("CvePS").ToEntero, LoteNuevo) 'guardo que dato le corresponde
|
||||||
Modificar = True
|
Modificar = True
|
||||||
|
If LoteOriginal = "" Then
|
||||||
|
ErrorMovInv = Not ObjPS.UpdateAplicaLoteCaducidadAlmacen(gvr.DataKey("CvePS").ToEntero, UsuarioActual.CveEmpresa, False, False)
|
||||||
|
Else
|
||||||
|
ErrorMovInv = Not ObjPS.UpdateAplicaLoteCaducidadAlmacen(gvr.DataKey("CvePS").ToEntero, UsuarioActual.CveEmpresa, True, True)
|
||||||
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Modificar Then
|
If Modificar Then
|
||||||
@@ -187,6 +198,12 @@ Partial Class Inventarios_AjustesSeccionAlmacen
|
|||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If Lote = "" Then
|
||||||
|
ErrorMovInv = Not ObjPS.UpdateAplicaLoteCaducidadAlmacen(Row("CvePS").ToString().ToEntero(), UsuarioActual.CveEmpresa, False, False)
|
||||||
|
Else
|
||||||
|
ErrorMovInv = Not ObjPS.UpdateAplicaLoteCaducidadAlmacen(Row("CvePS").ToString().ToEntero(), UsuarioActual.CveEmpresa, True, True)
|
||||||
|
End If
|
||||||
|
|
||||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, Cantidad, CveUM, CvePS, PU, -1, CostoIndirecto:=CostoIndirecto, CveSeccionAlmacen:=CveSeccionAlmacen, Lote:=Lote, Serie:=Serie, FechaCaducidad:=FechaCaducidad, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, Cantidad, CveUM, CvePS, PU, -1, CostoIndirecto:=CostoIndirecto, CveSeccionAlmacen:=CveSeccionAlmacen, Lote:=Lote, Serie:=Serie, FechaCaducidad:=FechaCaducidad, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
||||||
ErrorMovInv = True
|
ErrorMovInv = True
|
||||||
Exit For
|
Exit For
|
||||||
@@ -420,7 +437,7 @@ Partial Class Inventarios_AjustesSeccionAlmacen
|
|||||||
Dim Lote As String = RowExcel("Lote").ToString()
|
Dim Lote As String = RowExcel("Lote").ToString()
|
||||||
Dim FechaCaducidad As Date = IfNull(RowExcel("FechaCaducidad"), MinFecha).ToString.ToDate
|
Dim FechaCaducidad As Date = IfNull(RowExcel("FechaCaducidad"), MinFecha).ToString.ToDate
|
||||||
|
|
||||||
Dim RowExistencia As DataRow = DtExistenciasSecciones.FiltroPrimero($"CvePS={CvePS} and ISNULL(Serie,'') = '{Serie}'")
|
Dim RowExistencia As DataRow = DtExistenciasSecciones.FiltroPrimero($"CvePS={CvePS} and ISNULL(Serie,'') = '{Serie}'", Orderby:="Serie,Lote,FechaCaducidad")
|
||||||
|
|
||||||
If RowExistencia IsNot Nothing Then
|
If RowExistencia IsNot Nothing Then
|
||||||
Dim CveSeccionAlmacenSalida As Integer = RowExistencia("CveSeccionAlmacen").ToString().ToEntero()
|
Dim CveSeccionAlmacenSalida As Integer = RowExistencia("CveSeccionAlmacen").ToString().ToEntero()
|
||||||
|
|||||||
Reference in New Issue
Block a user