1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 21:22:58 +01:00

Fixes for expense category validation

This commit is contained in:
David Bomba 2022-11-30 17:13:03 +11:00
parent c4b7cc615e
commit 4f06bd116b
2 changed files with 0 additions and 9 deletions

View File

@ -54,10 +54,6 @@ class StoreExpenseRequest extends Request
$input = $this->decodePrimaryKeys($input);
if (array_key_exists('category_id', $input) && is_string($input['category_id'])) {
$input['category_id'] = $this->decodePrimaryKey($input['category_id']);
}
if (! array_key_exists('currency_id', $input) || strlen($input['currency_id']) == 0) {
$input['currency_id'] = (string) auth()->user()->company()->settings->currency_id;
}
@ -66,7 +62,6 @@ class StoreExpenseRequest extends Request
$input['color'] = '';
}
/* Ensure the project is related */
if (array_key_exists('project_id', $input) && isset($input['project_id'])) {
$project = Project::withTrashed()->where('id', $input['project_id'])->company()->first();

View File

@ -50,10 +50,6 @@ class UpdateExpenseRequest extends Request
$input = $this->decodePrimaryKeys($input);
if (array_key_exists('category_id', $input) && is_string($input['category_id'])) {
$input['category_id'] = $this->decodePrimaryKey($input['category_id']);
}
if (array_key_exists('documents', $input)) {
unset($input['documents']);
}