Support filtering API invoices by status
This commit is contained in:
parent
1d8bd29323
commit
cfddcc940a
1 changed files with 5 additions and 0 deletions
|
|
@ -68,6 +68,11 @@ class InvoiceApiController extends BaseAPIController
|
|||
$invoices->whereInvoiceNumber($invoiceNumber);
|
||||
}
|
||||
|
||||
// Fllter by status
|
||||
if ($statusId = Input::get('status_id')) {
|
||||
$invoices->where('invoice_status_id', '>=', $statusId);
|
||||
}
|
||||
|
||||
return $this->listResponse($invoices);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue