Add deleted check to attachment filter

This commit is contained in:
James Cole 2023-04-15 10:19:54 +02:00
parent fb6706648e
commit 0189b91d3b
No known key found for this signature in database
GPG Key ID: B49A324B7EAD6D80

View File

@ -92,7 +92,8 @@ trait AttachmentCollection
->where(
static function (EloquentBuilder $q1) {
$q1->where('attachments.attachable_type', TransactionJournal::class);
//$q1->where('attachments.uploaded', true);
$q1->where('attachments.uploaded', true);
$q1->whereNull('attachments.deleted_at');
$q1->orWhereNull('attachments.attachable_type');
}
);