hay 1 bug en el mostrarstock

This commit is contained in:
fedpo
2024-08-06 16:27:06 +01:00
committed by fede
parent 4262d66025
commit 66be7e6a69
8 changed files with 27 additions and 8 deletions

View File

@@ -83,7 +83,7 @@ namespace Modelo
public bool DisminuirStock(DetalleFactura detalleFactura)
{
bool ret = false;
while (detalleFactura.Cantidad >= 0)
while (detalleFactura.Cantidad > 0)
{
var elementoAdisminuir = almacen.Where(x=> x.Habilitado == true)
.First(x => x.Producto.Id == detalleFactura.Producto.Id);