mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Fixes for mailers
This commit is contained in:
parent
81098bb33f
commit
28909b6396
@ -96,6 +96,7 @@ class EmailMailable extends Mailable
|
||||
|
||||
$documents = Document::query()->whereIn('id', $this->email_object->documents)
|
||||
->where('size', '<', $this->max_attachment_size)
|
||||
->where('is_public',1)
|
||||
->cursor()
|
||||
->map(function ($document) {
|
||||
return Attachment::fromData(fn () => $document->getFile(), $document->name);
|
||||
|
@ -4,7 +4,7 @@
|
||||
<div class="sm:flex sm:items-start sm:justify-between">
|
||||
<div>
|
||||
<p class="text-lg leading-6 font-medium text-gray-900">{{ ctrans('texts.attachments') }}:</p>
|
||||
@foreach ($entity->documents as $document)
|
||||
@foreach ($entity->documents()->where('is_public',1)->get() as $document)
|
||||
<div class="inline-flex items-center space-x-1">
|
||||
@if($entity instanceof App\Models\PurchaseOrder)
|
||||
<a href="{{ route('vendor.documents.download', $document->hashed_id) }}" target="_blank"
|
||||
@ -27,7 +27,7 @@
|
||||
</div>
|
||||
@endforeach
|
||||
|
||||
@foreach ($entity->company->documents as $document)
|
||||
@foreach ($entity->company->documents()->where('is_public',1)->get() as $document)
|
||||
<div class="inline-flex items-center space-x-1">
|
||||
@if($entity instanceof App\Models\PurchaseOrder)
|
||||
<a href="{{ route('vendor.documents.download', $document->hashed_id) }}" target="_blank"
|
||||
|
Loading…
x
Reference in New Issue
Block a user