-- al editar remision, que si tiene salida, no permita cambiar el producto

This commit is contained in:
rrene
2020-04-27 20:27:07 -07:00
parent 0f3c6b63a4
commit 9a5f8394dd
9 changed files with 209 additions and 127 deletions

View File

@@ -464,7 +464,7 @@ Partial Class Inventarios_RecepcionEntrega
GVPendientes.DataBind()
UpPendientes.Update()
DtPendientes.Dispose()
If DtPendientes IsNot Nothing Then DtPendientes.Dispose()
End Sub
Protected Sub GVPendientes_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GVPendientes.RowDataBound
@@ -632,10 +632,7 @@ Partial Class Inventarios_RecepcionEntrega
DdlAlmacen.SelectedValueExist(CveAlmacenTraspasoOrigen)
End If
DtDatos.Columns.Add("AplicaSeccion", GetType(Boolean))
DtDatos.Columns.Add("AplicaSerie", GetType(Boolean))
DtDatos.Columns.Add("AplicaLote", GetType(Boolean))
DtDatos.Columns.Add("AplicaCaducidad", GetType(Boolean))
If Not DtDatos.Columns.Contains("Lote") Then
DtDatos.Columns.Add("Lote", GetType(String))
End If
@@ -1749,7 +1746,7 @@ Partial Class Inventarios_RecepcionEntrega
For Each Dr As DataRow In DtDatos.Rows
If Dr("CantidadGV").ToString.ToDecimal > 0 Then
If CBool(Dr("AplicaSeccion")) Then
If CBool(Dr("AplicaSerieLote")) Then
DtDetalle = DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", Dr("Consec")))
For Each Dr1 As DataRow In DtDetalle.Rows
@@ -1882,7 +1879,12 @@ Partial Class Inventarios_RecepcionEntrega
CantidadPendiente = If(Dr1("ExistenciaFinal").ToString.ToDecimal > CantidadSaldo, CantidadSaldo, Dr1("ExistenciaFinal").ToString.ToDecimal)
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, CantidadPendiente.ToString.ToDecimal, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, 0, -1, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, FechaCaducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("Caducidad").ToString.ToDate, MinFecha), Lote:=If(CBool(Dr("AplicaLote")), Dr("Lote").ToString, "-1"), CveSeccionAlmacen:=If(CBool(Dr("AplicaSeccion")), Dr("CveSeccion").ToString.ToEntero, -1)) Then
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, CantidadPendiente.ToString.ToDecimal, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, 0, -1,
SerieLote:=Dr("SerieLote").ToString,
CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero,
FechaCaducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("Caducidad").ToString.ToDate, MinFecha),
Lote:=If(CBool(Dr("AplicaLote")), Dr("Lote").ToString, "-1"),
CveSeccionAlmacen:=If(CBool(Dr("AplicaSeccion")), Dr("CveSeccion").ToString.ToEntero, -1)) Then
ErrorMovInv = True
TextoError = "Ocurrió un error al procesar los conceptos de traspaso de apartado. Por favor vuelva a intentar."
Exit For
@@ -1894,7 +1896,8 @@ Partial Class Inventarios_RecepcionEntrega
Next
If ErrorMovInv Then Exit For
Else
ErrorMovInv = True
End If
End If