feat(inventory): track administrative entry reservations

This commit is contained in:
2026-09-24 09:34:42 -03:00
parent 3671b95a83
commit 884da2c89a
8 changed files with 73 additions and 11 deletions

View File

@@ -393,7 +393,7 @@ class InvitationPurchaseProvisioner
$inventory = DB::table('inventories')->where('id', $variant->inventory_id)->lockForUpdate()->first();
if ($inventory === null || $inventory->real_stock < 1 || $inventory->reserved_stock > 0) {
if ($inventory === null || $inventory->real_stock < 1 || $inventory->reserved_stock > 0 || ($inventory->entry_reserved_stock ?? 0) > 0) {
throw new RuntimeException("El asiento {$variant->descripcion} ya no está disponible.");
}