mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04: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->with('payments', 'client');
|
||||||
}
|
}
|
||||||
|
|
||||||
$resource->withTrashed()
|
$result = $resource->withTrashed()
|
||||||
->whereIn('id', $this->transformKeys($this->ids))
|
->whereIn('id', $this->transformKeys($this->ids))
|
||||||
->where('company_id', $this->company->id);
|
->where('company_id', $this->company->id)
|
||||||
|
->get();
|
||||||
|
|
||||||
$resource->get();
|
|
||||||
|
if($result->count() <= 1)
|
||||||
if($resource->count() <= 1)
|
$data[$key] = collect($result);
|
||||||
$data[$key] = [$resource];
|
|
||||||
else
|
else
|
||||||
$data[$key] = $resource;
|
$data[$key] = $result;
|
||||||
|
|
||||||
$pdf = $template_service->build($data)->getPdf();
|
$pdf = $template_service->build($data)->getPdf();
|
||||||
|
|
||||||
|
@ -87,8 +87,6 @@ class InvoiceTest extends TestCase
|
|||||||
false))->handle();
|
false))->handle();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public function testInvoiceGetDatesBetween()
|
public function testInvoiceGetDatesBetween()
|
||||||
{
|
{
|
||||||
$response = $this->withHeaders([
|
$response = $this->withHeaders([
|
||||||
|
Loading…
x
Reference in New Issue
Block a user