Skip to content

Commit

Permalink
fix filtering dealers and shares for app export (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
Fenrikur authored Aug 15, 2023
1 parent 2197f76 commit ef96451
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions app/Models/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use App\Enums\ApplicationStatus;
use App\Enums\ApplicationType;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Casts\Attribute;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
Expand Down Expand Up @@ -376,8 +377,10 @@ public static function getAllApplicationsForAppExport() {
'type as Type',
)
->whereNotNull('offer_accepted_at')
->where('type', ApplicationType::Dealer)
->orWhere('type', ApplicationType::Share)
->where(function (Builder $query){
$query->where('type', ApplicationType::Dealer)
->orWhere('type', ApplicationType::Share);
})
->get();
return json_decode(json_encode($applications), true);
}
Expand Down

0 comments on commit ef96451

Please sign in to comment.