This commit is contained in:
James Cole
2023-12-21 05:07:26 +01:00
parent 1f7ceb6df6
commit a445bc53cd
61 changed files with 165 additions and 163 deletions

View File

@@ -495,10 +495,10 @@ trait AttachmentCollection
app('log')->debug('Add filter on no attachments.');
$this->joinAttachmentTables();
$this->query->where(static function (Builder $q1) { // @phpstan-ignore-line
$this->query->where(static function (Builder $q1): void { // @phpstan-ignore-line
$q1
->whereNull('attachments.attachable_id')
->orWhere(static function (Builder $q2) {
->orWhere(static function (Builder $q2): void {
$q2
->whereNotNull('attachments.attachable_id')
->whereNotNull('attachments.deleted_at')
@@ -522,7 +522,7 @@ trait AttachmentCollection
$this->hasJoinedAttTables = true;
$this->query->leftJoin('attachments', 'attachments.attachable_id', '=', 'transaction_journals.id')
->where(
static function (EloquentBuilder $q1) { // @phpstan-ignore-line
static function (EloquentBuilder $q1): void { // @phpstan-ignore-line
$q1->where('attachments.attachable_type', TransactionJournal::class);
$q1->where('attachments.uploaded', true);
$q1->whereNull('attachments.deleted_at');