feature/refund #7

Merged
ncoronel merged 63 commits from feature/refund into homo 2026-09-17 15:19:27 +00:00
145 changed files with 7409 additions and 338 deletions
Showing only changes of commit 69bea10519 - Show all commits

View File

@@ -12,14 +12,11 @@ class EntryResource extends JsonResource
/** @return array<string, mixed> */
public function toArray(Request $request): array
{
$variant = $this->variants->whereNull('replaced_by_variant_id')->sole();
return [
'id' => $this->id,
'title' => $this->nombre,
'description' => $this->descripcion,
'event_date_ids' => $variant->selectedEventDates()->pluck('id')->values(),
'stock' => $variant->inventory->real_stock,
'variants' => $this->variants->toArray(),
'price' => $this->precio,
];
}