1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 05:02:36 +01:00

pass result, not collect

This commit is contained in:
David Bomba 2023-10-06 22:35:54 +11:00
parent 02a85cfc5a
commit e7f04f0cf8
2 changed files with 7 additions and 9 deletions

View File

@ -85,16 +85,16 @@ class TemplateAction implements ShouldQueue
$resource->with('payments', 'client');
}
$resource->withTrashed()
$result = $resource->withTrashed()
->whereIn('id', $this->transformKeys($this->ids))
->where('company_id', $this->company->id);
->where('company_id', $this->company->id)
->get();
$resource->get();
if($resource->count() <= 1)
$data[$key] = [$resource];
if($result->count() <= 1)
$data[$key] = collect($result);
else
$data[$key] = $resource;
$data[$key] = $result;
$pdf = $template_service->build($data)->getPdf();

View File

@ -87,8 +87,6 @@ class InvoiceTest extends TestCase
false))->handle();
}
public function testInvoiceGetDatesBetween()
{
$response = $this->withHeaders([