hay 1 bug en el mostrarstock
This commit is contained in:
@@ -88,10 +88,10 @@ namespace Controladora
|
||||
|
||||
public int MostrarStockDeProducto(Producto producto)
|
||||
{
|
||||
if (producto == null) return -1;
|
||||
if (producto.Id < 0) return -1;
|
||||
if (producto == null) return 0;
|
||||
if (producto.Id < 0) return 0;
|
||||
var lotes = RepositorioLote.Instance.Listar();
|
||||
if (lotes.Any(x => x.Producto.Id != producto.Id)) return -1; // basicamente no hay productos con esa id
|
||||
if (lotes.Any(x => x.Producto.Id != producto.Id)) return 0; // basicamente no hay productos con esa id
|
||||
|
||||
var CantidadStock = lotes
|
||||
.Where(x => x.Producto.Id == producto.Id)
|
||||
|
||||
Reference in New Issue
Block a user