diff --git a/app/Http/Requests/Expense/StoreExpenseRequest.php b/app/Http/Requests/Expense/StoreExpenseRequest.php index 0c964fef9016..019099c54f24 100644 --- a/app/Http/Requests/Expense/StoreExpenseRequest.php +++ b/app/Http/Requests/Expense/StoreExpenseRequest.php @@ -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(); diff --git a/app/Http/Requests/Expense/UpdateExpenseRequest.php b/app/Http/Requests/Expense/UpdateExpenseRequest.php index 26b144731048..d8107dd3b4c9 100644 --- a/app/Http/Requests/Expense/UpdateExpenseRequest.php +++ b/app/Http/Requests/Expense/UpdateExpenseRequest.php @@ -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']); }