cambio para compatibilidad

This commit is contained in:
Bryam105
2025-12-09 11:13:02 -03:30
parent 32b4aed518
commit 75ce7142b0
+1 -1
View File
@@ -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);
}
}