-- mejora, pdte por surtir
This commit is contained in:
@@ -945,6 +945,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
|||||||
Serie = If(gvr.DataKey("Serie") = "", "-1", gvr.DataKey("Serie"))
|
Serie = If(gvr.DataKey("Serie") = "", "-1", gvr.DataKey("Serie"))
|
||||||
Lote = If(gvr.DataKey("Lote") = "", "-1", gvr.DataKey("Lote"))
|
Lote = If(gvr.DataKey("Lote") = "", "-1", gvr.DataKey("Lote"))
|
||||||
FechaCaducidad = If(gvr.DataKey("FechaCaducidad") = "", MinFecha, gvr.DataKey("FechaCaducidad").ToDate)
|
FechaCaducidad = If(gvr.DataKey("FechaCaducidad") = "", MinFecha, gvr.DataKey("FechaCaducidad").ToDate)
|
||||||
|
Dim MsgAdicional As String = ""
|
||||||
|
|
||||||
If ObjInventario.GetExistenciasProducto(gvr.DataKey("CvePS").ToEntero, gvr.DataKey("CveUM").ToEntero, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDate.ToString("yyyy/MM/dd 23:59"), CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Serie, Lote:=Lote, Caducidad:=FechaCaducidad) Then
|
If ObjInventario.GetExistenciasProducto(gvr.DataKey("CvePS").ToEntero, gvr.DataKey("CveUM").ToEntero, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDate.ToString("yyyy/MM/dd 23:59"), CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Serie, Lote:=Lote, Caducidad:=FechaCaducidad) Then
|
||||||
'si hay existencia en almacen costeado, lo tengo que sacar
|
'si hay existencia en almacen costeado, lo tengo que sacar
|
||||||
@@ -957,15 +958,11 @@ Partial Class Inventarios_TraspasoAlmacen
|
|||||||
' para asegurarnos que lo pendiente por surtir se pueda surtir con otras series, consultamos de nuevo, pero a nivel producto, para checar existencia
|
' para asegurarnos que lo pendiente por surtir se pueda surtir con otras series, consultamos de nuevo, pero a nivel producto, para checar existencia
|
||||||
|
|
||||||
If ExistenciaSinPendiente > 0 AndAlso Existencia <= 0 AndAlso PendienteporSurtir > 0 Then
|
If ExistenciaSinPendiente > 0 AndAlso Existencia <= 0 AndAlso PendienteporSurtir > 0 Then
|
||||||
|
MsgAdicional = " Pendiente por surtir: " & PendienteporSurtir.FormatoNumero(0)
|
||||||
If ObjInventario.GetExistenciasProducto(gvr.DataKey("CvePS").ToEntero, gvr.DataKey("CveUM").ToEntero, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd 23:59")) Then
|
If ObjInventario.GetExistenciasProducto(gvr.DataKey("CvePS").ToEntero, gvr.DataKey("CveUM").ToEntero, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd 23:59")) Then
|
||||||
'si hay existencia en almacen costeado, lo tengo que sacar
|
'si hay existencia en almacen costeado, lo tengo que sacar
|
||||||
Existencia = ObjInventario.DtResultados.FiltroPrimeroValor("ExistenciaFinal", String.Format("CveAlmacen = {0}", DdlAlmacenOrigen.SelectedValue)).ToDecimal
|
Existencia = ObjInventario.DtResultados.FiltroPrimeroValor("ExistenciaFinal", String.Format("CveAlmacen = {0}", DdlAlmacenOrigen.SelectedValue)).ToDecimal
|
||||||
'si la existencia del producto en general, supera a lo pendiente, entonces la serie si se puede sacar.
|
'si la existencia del producto en general, supera a lo pendiente, entonces la serie si se puede sacar.
|
||||||
If Existencia > PendienteporSurtir Then
|
|
||||||
Existencia = ExistenciaSinPendiente
|
|
||||||
Else
|
|
||||||
Existencia = ExistenciaSinPendiente - PendienteporSurtir
|
|
||||||
End If
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@@ -975,7 +972,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
|||||||
|
|
||||||
If Existencia < 0 Then
|
If Existencia < 0 Then
|
||||||
ErrorExistencia = True
|
ErrorExistencia = True
|
||||||
TextoExistencia.AppendFormat("-<b>#{0}</b> {1} {2} Existencia: <b>{3}</b><br/>", gvr.DataKey("No"), gvr.DataKey("PS"), If(gvr.DataKey("Serie").ToString().Trim().Length > 0, $" Serie: <b>{gvr.DataKey("Serie")}</b>", ""), (Existencia + gvr.FCTextBox("TxtCantidad2").Text.ToEntero))
|
TextoExistencia.AppendFormat("-<b>#{0}</b> {1} {2} Existencia: <b>{3}</b>{4}<br/>", gvr.DataKey("No"), gvr.DataKey("PS"), If(gvr.DataKey("Serie").ToString().Trim().Length > 0, $" Serie: <b>{gvr.DataKey("Serie")}</b>", ""), (Existencia + gvr.FCTextBox("TxtCantidad2").Text.ToEntero), MsgAdicional)
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user