feat(purchase,sale,ticket): expose refunded total summary in admin sales and tickets

This commit is contained in:
2026-09-11 16:23:23 -03:00
parent 4bb4f526e4
commit 4f7ede1072
8 changed files with 84 additions and 4 deletions

View File

@@ -15,20 +15,24 @@ class AdminAppTicketCollection extends ResourceCollection
private readonly int $totalTickets;
private readonly string $refundedTotal;
public function __construct(AdminAppTicketResult $result)
{
parent::__construct($result->tickets);
$this->scannedTickets = $result->scannedTickets;
$this->totalTickets = $result->totalTickets;
$this->refundedTotal = $result->refundedTotal;
}
/** @return array{scanned_tickets: int, total_tickets: int} */
/** @return array{scanned_tickets: int, total_tickets: int, refunded_total: string} */
public function with(Request $request): array
{
return [
'scanned_tickets' => $this->scannedTickets,
'total_tickets' => $this->totalTickets,
'refunded_total' => $this->refundedTotal,
];
}
}