From 75ce7142b03881efd0bf71874f7e22a1465323b6 Mon Sep 17 00:00:00 2001 From: Bryam105 Date: Tue, 9 Dec 2025 11:13:02 -0330 Subject: [PATCH] cambio para compatibilidad --- app/Http/Controllers/SaleController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Controllers/SaleController.php b/app/Http/Controllers/SaleController.php index d0d63b2..27fa950 100644 --- a/app/Http/Controllers/SaleController.php +++ b/app/Http/Controllers/SaleController.php @@ -34,7 +34,7 @@ class SaleController extends Controller $producto = Product::find($item['product_id']); $totalVenta += $producto->price * $item['quantity']; - if ($producto->stock < $item['quantity']) { + if ($producto->stock_quantity < $item['quantity']) { throw new \Exception("No hay suficiente stock de " . $producto->name); } }