fix up group transactions bulk purchase orders

This commit is contained in:
omair saleh
2022-07-15 14:08:27 +08:00
parent d75e3cb2bc
commit d974f6c8dc
2 changed files with 13 additions and 2 deletions
+1 -1
View File
@@ -33,7 +33,7 @@ class GroupResource extends JsonResource
'currency' => new CurrencyResource($this->currency),
'created_at' => Carbon::parse($this->created_at)->format('d-m-Y h:i:s A'),
'currency_rate' => (float) $this->currency_rate,
'transactions' => $this->transactions()->count(),
'transactions' => $this->transactions()->get()->pluck('owner.owner.marking'),
'complete_transactions' => $this->transactions()->whereHasMorph('owner', [Transaction::class], function($query){
return $query->whereHas('booking', function($query){
return $query->whereHas('transactions', function($query){