show order reference on payment verification component

This commit is contained in:
Omair Saleh
2022-09-30 15:50:30 +08:00
parent 2ea62bcfb9
commit 6268cdd21f
+3 -1
View File
@@ -46,7 +46,9 @@ class OrderResource extends JsonResource
'received_packages' => PackingListResource::collection($this->packingLists()->where('type', PackingListType::WAREHOUSE_RECEIVE_LIST)->whereHas('packages')->get()),
];
}),
'invoices' => TransactionResource::collection($this->transactions()->whereNotIn('transactions.status', [0, 1])->get()),
'invoices' => $this->whenLoaded('packingLists', function() {
return TransactionResource::collection($this->transactions()->whereNotIn('transactions.status', [0, 1])->get());
}),
'remarks' => RemarkResource::collection($this->remarks),
'created_at' => $this->created_at->format('d-m-Y')
];