feat(desfile): cancel entry reservations

This commit is contained in:
2026-09-24 11:09:38 -03:00
parent 64820fe12b
commit b3cd9f5de5
4 changed files with 59 additions and 0 deletions

View File

@@ -73,6 +73,16 @@ class Inventory extends Model
$this->save();
}
public function releaseEntry(int $amount): void
{
if ($amount < 1 || $this->entry_reserved_stock < $amount) {
throw new \InvalidArgumentException('La cantidad de entradas reservadas no es válida.');
}
$this->entry_reserved_stock -= $amount;
$this->save();
}
public function reserve(int $amount, bool $tracksInventory): void
{
if ($amount < 0) {