mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-09-20 08:21:34 +02:00
Added back API route for quotes
This commit is contained in:
parent
3b9b4a049e
commit
7facf518cf
@ -269,8 +269,7 @@ Route::group(['middleware' => 'api', 'prefix' => 'api/v1'], function()
|
||||
Route::get('accounts', 'AccountApiController@show');
|
||||
Route::put('accounts', 'AccountApiController@update');
|
||||
Route::resource('clients', 'ClientApiController');
|
||||
//Route::get('quotes', 'QuoteApiController@index');
|
||||
//Route::resource('quotes', 'QuoteApiController');
|
||||
Route::get('quotes', 'QuoteApiController@index');
|
||||
Route::get('invoices', 'InvoiceApiController@index');
|
||||
Route::get('download/{invoice_id}', 'InvoiceApiController@download');
|
||||
Route::resource('invoices', 'InvoiceApiController');
|
||||
|
@ -234,6 +234,12 @@ class Invoice extends EntityModel implements BalanceAffecting
|
||||
->where('is_recurring', '=', false);
|
||||
}
|
||||
|
||||
public function scopeQuotes($query)
|
||||
{
|
||||
return $query->where('invoice_type_id', '=', INVOICE_TYPE_QUOTE)
|
||||
->where('is_recurring', '=', false);
|
||||
}
|
||||
|
||||
public function scopeInvoiceType($query, $typeId)
|
||||
{
|
||||
return $query->where('invoice_type_id', '=', $typeId);
|
||||
|
Loading…
Reference in New Issue
Block a user