mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 21:22:58 +01:00
Fixes for project with both project and client id
This commit is contained in:
parent
7d01295168
commit
880f1a620f
@ -69,7 +69,7 @@ class StoreExpenseRequest extends Request
|
|||||||
|
|
||||||
/* Ensure the project is related */
|
/* Ensure the project is related */
|
||||||
if (array_key_exists('project_id', $input) && isset($input['project_id'])) {
|
if (array_key_exists('project_id', $input) && isset($input['project_id'])) {
|
||||||
$project = Project::withTrashed()->find($input['project_id'])->company()->first();
|
$project = Project::withTrashed()->where('id', $input['project_id'])->company()->first();
|
||||||
|
|
||||||
if($project){
|
if($project){
|
||||||
$input['client_id'] = $project->client_id;
|
$input['client_id'] = $project->client_id;
|
||||||
|
@ -64,7 +64,7 @@ class UpdateExpenseRequest extends Request
|
|||||||
|
|
||||||
/* Ensure the project is related */
|
/* Ensure the project is related */
|
||||||
if (array_key_exists('project_id', $input) && isset($input['project_id'])) {
|
if (array_key_exists('project_id', $input) && isset($input['project_id'])) {
|
||||||
$project = Project::withTrashed()->find($input['project_id'])->company()->first();
|
$project = Project::withTrashed()->where('id', $input['project_id'])->company()->first();
|
||||||
|
|
||||||
if($project){
|
if($project){
|
||||||
$input['client_id'] = $project->client_id;
|
$input['client_id'] = $project->client_id;
|
||||||
|
Loading…
Reference in New Issue
Block a user