mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Merge pull request #615 from turbo124/master
Increase scope of /api/v1/invoices GET call
This commit is contained in:
commit
e26539b56d
@ -1,6 +1,7 @@
|
|||||||
<?php namespace App\Http\Controllers;
|
<?php namespace App\Http\Controllers;
|
||||||
|
|
||||||
use Auth;
|
use Auth;
|
||||||
|
use Illuminate\Support\Facades\Log;
|
||||||
use Utils;
|
use Utils;
|
||||||
use Response;
|
use Response;
|
||||||
use Input;
|
use Input;
|
||||||
@ -51,9 +52,9 @@ class InvoiceApiController extends BaseAPIController
|
|||||||
{
|
{
|
||||||
$paginator = Invoice::scope();
|
$paginator = Invoice::scope();
|
||||||
$invoices = Invoice::scope()
|
$invoices = Invoice::scope()
|
||||||
->with(array_merge(['invoice_items'], $this->getIncluded()))
|
->with(array_merge(['invoice_items'], $this->getIncluded()));
|
||||||
->where('invoices.is_quote', '=', false)
|
// ->where('invoices.is_quote', '=', false)
|
||||||
->where('invoices.is_recurring', '=', false);
|
// ->where('invoices.is_recurring', '=', false);
|
||||||
|
|
||||||
if ($clientPublicId = Input::get('client_id')) {
|
if ($clientPublicId = Input::get('client_id')) {
|
||||||
$filter = function($query) use ($clientPublicId) {
|
$filter = function($query) use ($clientPublicId) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user