up
This commit is contained in:
@@ -166,10 +166,7 @@ class InventarioPrendaDistribucion extends Model
|
||||
\DB::table('producto_bodega')->insert(['producto_id' => $productoId, 'bodega_id' => $bodegaId, 'stock' => $cantidad, 'created_at' => now(), 'updated_at' => now()]);
|
||||
}
|
||||
|
||||
$prod = \App\Models\Producto::find($productoId);
|
||||
if ($prod && ! $prod->variants()->exists()) {
|
||||
$prod->increment('stock', $cantidad);
|
||||
}
|
||||
// Nota: No incrementamos el stock global del producto aquí — el stock global ya se incrementó cuando se creó el InventarioPrenda.
|
||||
|
||||
// Reducir disponibilidad en inventario_prenda
|
||||
$parent = $dist->inventarioPrenda;
|
||||
|
||||
Reference in New Issue
Block a user