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:
parent
02a85cfc5a
commit
e7f04f0cf8
@ -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();
|
||||
|
||||
|
@ -87,8 +87,6 @@ class InvoiceTest extends TestCase
|
||||
false))->handle();
|
||||
}
|
||||
|
||||
|
||||
|
||||
public function testInvoiceGetDatesBetween()
|
||||
{
|
||||
$response = $this->withHeaders([
|
||||
|
Loading…
Reference in New Issue
Block a user