cambio para compatibilidad
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user