mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-03 09:04:34 -04:00
Fixes for task requests
This commit is contained in:
parent
6862fabbe0
commit
77d489211e
@ -70,8 +70,8 @@ class StoreTaskRequest 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;
|
||||||
}
|
}
|
||||||
|
@ -69,7 +69,7 @@ class UpdateTaskRequest 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;
|
||||||
|
@ -90,7 +90,7 @@ class Number
|
|||||||
return (float) $s;
|
return (float) $s;
|
||||||
}
|
}
|
||||||
|
|
||||||
// remove all seperators from first part and keep the end
|
// remove all separators from first part and keep the end
|
||||||
$s = str_replace('.', '', substr($s, 0, -3)).substr($s, -3);
|
$s = str_replace('.', '', substr($s, 0, -3)).substr($s, -3);
|
||||||
|
|
||||||
// return float
|
// return float
|
||||||
|
Loading…
x
Reference in New Issue
Block a user