fix bill seeder

This commit is contained in:
omair saleh
2022-02-22 00:52:05 +08:00
parent 94857d2464
commit 85c9853b15
2 changed files with 2 additions and 3 deletions
+1 -1
View File
@@ -57,7 +57,7 @@ class BookingResource extends JsonResource
'expired_payment_attempts' => TransactionResource::collection($this->transactions()->payments()->where('status', ApprovalStatus::PENDING_SUBMISSION)->whereDate('expires_on', '<', Carbon::now())->get()),
'payment_history' => TransactionResource::collection($this->transactions()->where(function($query){
$query->where(function($query){
$query->payments();
$query->payments()->where('status', '!=', ApprovalStatus::PENDING_SUBMISSION);
})->orWhere(function($query){
$query->where(function($query){
$query->where('type', TransactionType::REFUND)->whereIn('status', [ApprovalStatus::APPROVED, ApprovalStatus::PENDING_VERIFICATION, ApprovalStatus::REJECTED, ApprovalStatus::COMPLETED]);