Merge pull request #19866 from atm-gauthier/FIX_hrm_divers

FIX : rankorder + vacant positions
This commit is contained in:
Laurent Destailleur 2022-01-25 14:02:44 +01:00 committed by GitHub
commit 4b00ddb0b5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 6 deletions

View File

@ -109,7 +109,7 @@ class Position extends CommonObject
'date_creation' => array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>'1', 'position'=>500, 'notnull'=>1, 'visible'=>-2,),
'tms' => array('type'=>'timestamp', 'label'=>'DateModification', 'enabled'=>'1', 'position'=>501, 'notnull'=>0, 'visible'=>-2,),
'fk_contrat' => array('type'=>'integer:Contrat:contrat/class/contrat.class.php', 'label'=>'fk_contrat', 'enabled'=>'1', 'position'=>50, 'notnull'=>0, 'visible'=>0,),
'fk_user' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'Employee', 'enabled'=>'1', 'position'=>55, 'notnull'=>1, 'visible'=>1,),
'fk_user' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'Employee', 'enabled'=>'1', 'position'=>55, 'notnull'=>0, 'visible'=>1,),
'fk_job' => array('type'=>'integer:Job:/hrm/class/job.class.php', 'label'=>'Job', 'enabled'=>'1', 'position'=>56, 'notnull'=>1, 'visible'=>1,),
'date_start' => array('type'=>'date', 'label'=>'DateStart', 'enabled'=>'1', 'position'=>51, 'notnull'=>1, 'visible'=>1,),
'date_end' => array('type'=>'date', 'label'=>'DateEnd', 'enabled'=>'1', 'position'=>52, 'notnull'=>0, 'visible'=>1,),

View File

@ -264,7 +264,7 @@ if (($id || $ref) && $action == 'edit') {
if (is_array($SkilldetRecords) && count($SkilldetRecords) > 0) {
print '<table>';
foreach ($SkilldetRecords as $sk) {
if ($sk->rank > $MaxNumberSkill) {
if ($sk->rankorder > $MaxNumberSkill) {
continue;
}
@ -291,7 +291,7 @@ if (($id || $ref) && $action == 'edit') {
// if (!empty($val['help'])) {
// print $form->textwithpicto($langs->trans($val['label']), $langs->trans($val['help']));
// } else {
print $langs->trans($val['label']).'&nbsp;'.$langs->trans('rank').'&nbsp;'.$sk->rank;
print $langs->trans($val['label']).'&nbsp;'.$langs->trans('rank').'&nbsp;'.$sk->rankorder;
// }
print '</td>';
print '<td class="valuefieldcreate">';
@ -696,7 +696,7 @@ if ($action != "create" && $action != "edit") {
break; // Should not happen
}
if ($obj->rank > $MaxNumberSkill) {
if ($obj->rankorder > $MaxNumberSkill) {
continue;
}

View File

@ -292,7 +292,7 @@ CREATE TABLE llx_hrm_job_user(
date_creation datetime NOT NULL,
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
fk_contrat integer,
fk_user integer NOT NULL,
fk_user integer,
fk_job integer NOT NULL,
date_start date,
date_end date,

View File

@ -23,7 +23,7 @@ CREATE TABLE llx_hrm_job_user(
date_creation datetime NOT NULL,
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
fk_contrat integer,
fk_user integer NOT NULL,
fk_user integer,
fk_job integer NOT NULL,
date_start datetime,
date_end datetime,