mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Support creating inline vendors and categories
This commit is contained in:
parent
2135d7c973
commit
a3b359f062
@ -24,6 +24,7 @@ class ExpenseRequest extends EntityRequest
|
||||
{
|
||||
$input = $this->all();
|
||||
|
||||
// check if we're creating a new expense category
|
||||
if ($this->expense_category_id == '-1'
|
||||
&& trim($this->expense_category_name)
|
||||
&& $this->user()->can('create', ENTITY_EXPENSE_CATEGORY))
|
||||
@ -36,6 +37,7 @@ class ExpenseRequest extends EntityRequest
|
||||
$input['expense_category_id'] = ExpenseCategory::getPrivateId($this->expense_category_id);
|
||||
}
|
||||
|
||||
// check if we're creating a new vendor
|
||||
if ($this->vendor_id == '-1'
|
||||
&& trim($this->vendor_name)
|
||||
&& $this->user()->can('create', ENTITY_VENDOR))
|
||||
|
Loading…
x
Reference in New Issue
Block a user