update refund section

This commit is contained in:
edmondlang
2022-03-11 10:27:40 +08:00
parent 5fac75de95
commit a7646fb4eb
4 changed files with 28 additions and 134 deletions
+1
View File
@@ -46,6 +46,7 @@ class BookingResource extends JsonResource
],
'status' => $this->status,
'created_at' => Carbon::parse($this->created_at)->format('d-m-Y'),
'created_at_with_time' => Carbon::parse($this->created_at)->format('d-m-Y h:i:s A'),
$this->mergeWhen($this->relationLoaded('transactions'), [
'purchase_order' => new TransactionResource($this->transactions()->where('type', TransactionType::PURCHASE_ORDER)->first()),
'payment_attempts' => TransactionResource::collection(