1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-21 00:41:34 +02:00

Fixes for missing payments

This commit is contained in:
David Bomba 2023-10-06 22:08:23 +11:00
parent 9424950dbb
commit 715e5022f0

View File

@ -84,8 +84,12 @@ class TemplateAction implements ShouldQueue
$resource = $entity->query()
->withTrashed()
->whereIn('id', $this->transformKeys($this->ids))
->where('company_id', $this->company->id)
->get();
->where('company_id', $this->company->id);
if($this->entity == Invoice::class)
$resource->with('payments');
$resource->get();
if(count($resource) <= 1)
$data[$key] = [$resource];