From 09f47cfd9d414592a1f0c787a1406d484523e3bf Mon Sep 17 00:00:00 2001 From: Faustin Date: Mon, 13 Jun 2022 11:36:46 +0200 Subject: [PATCH 1/4] FIX Srutinizer 'The property socid does not seem to exist on RecruitmentJobPosition' --- htdocs/recruitment/recruitmentcandidature_list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/recruitment/recruitmentcandidature_list.php b/htdocs/recruitment/recruitmentcandidature_list.php index 9a0a21484b1..e9da2466f8a 100644 --- a/htdocs/recruitment/recruitmentcandidature_list.php +++ b/htdocs/recruitment/recruitmentcandidature_list.php @@ -461,7 +461,7 @@ if ($jobposition->id > 0 && (empty($action) || ($action != 'edit' && $action != $morehtmlref .= ''; $morehtmlref .= ''; } else { - $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1); + $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, 0, $object->fk_project, 'none', 0, 0, 0, 1); } } else { if (!empty($object->fk_project)) { From c058a6b75d0b406bfd83c1e071f1911ca1014d78 Mon Sep 17 00:00:00 2001 From: Faustin Date: Mon, 13 Jun 2022 15:49:57 +0200 Subject: [PATCH 2/4] replaced 0 by -1 for no thirrd party id... --- htdocs/recruitment/recruitmentcandidature_list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/recruitment/recruitmentcandidature_list.php b/htdocs/recruitment/recruitmentcandidature_list.php index e9da2466f8a..f9cd7b3c9dd 100644 --- a/htdocs/recruitment/recruitmentcandidature_list.php +++ b/htdocs/recruitment/recruitmentcandidature_list.php @@ -461,7 +461,7 @@ if ($jobposition->id > 0 && (empty($action) || ($action != 'edit' && $action != $morehtmlref .= ''; $morehtmlref .= ''; } else { - $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, 0, $object->fk_project, 'none', 0, 0, 0, 1); + $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, -1, $object->fk_project, 'none', 0, 0, 0, 1); } } else { if (!empty($object->fk_project)) { From c9900666e824d4e84184a9a296c217a0b6c13379 Mon Sep 17 00:00:00 2001 From: Faustin Date: Mon, 13 Jun 2022 16:02:25 +0200 Subject: [PATCH 3/4] Class Salary does not contain attribute salary but amount instead --- htdocs/salaries/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/salaries/card.php b/htdocs/salaries/card.php index 00591b5a32f..e4c4bb24464 100644 --- a/htdocs/salaries/card.php +++ b/htdocs/salaries/card.php @@ -232,7 +232,7 @@ if ($action == 'add' && empty($cancel)) { // Set user current salary as ref salary for the payment $fuser = new User($db); $fuser->fetch(GETPOST("fk_user", "int")); - $object->salary = $fuser->salary; + $object->amount = $fuser->salary; // Fill array 'array_options' with data from add form $ret = $extrafields->setOptionalsFromPost(null, $object); From ac395cace882047b40767c8fbc4da7bf255cf72b Mon Sep 17 00:00:00 2001 From: Faustin Date: Mon, 13 Jun 2022 16:05:41 +0200 Subject: [PATCH 4/4] wrong branch... --- htdocs/salaries/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/salaries/card.php b/htdocs/salaries/card.php index e4c4bb24464..00591b5a32f 100644 --- a/htdocs/salaries/card.php +++ b/htdocs/salaries/card.php @@ -232,7 +232,7 @@ if ($action == 'add' && empty($cancel)) { // Set user current salary as ref salary for the payment $fuser = new User($db); $fuser->fetch(GETPOST("fk_user", "int")); - $object->amount = $fuser->salary; + $object->salary = $fuser->salary; // Fill array 'array_options' with data from add form $ret = $extrafields->setOptionalsFromPost(null, $object);