Fix: Wrong module numbering for project
This commit is contained in:
parent
3f2ee959f0
commit
48f100c068
@ -90,7 +90,8 @@ class mod_project_simple extends ModeleNumRefProjects
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
$date=$project->date_c;
|
$date=empty($project->date_c)?dol_now():$project->date_c;
|
||||||
|
|
||||||
//$yymm = strftime("%y%m",time());
|
//$yymm = strftime("%y%m",time());
|
||||||
$yymm = strftime("%y%m",$date);
|
$yymm = strftime("%y%m",$date);
|
||||||
$num = sprintf("%04s",$max+1);
|
$num = sprintf("%04s",$max+1);
|
||||||
|
|||||||
@ -119,7 +119,8 @@ class mod_project_universal extends ModeleNumRefProjects
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
$numFinal=get_next_value($db,$mask,'projet','ref','',$objsoc->code_client,$project->date_c);
|
$date=empty($project->date_c)?dol_now():$project->date_c;
|
||||||
|
$numFinal=get_next_value($db,$mask,'projet','ref','',$objsoc->code_client,$date);
|
||||||
|
|
||||||
return $numFinal;
|
return $numFinal;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -21,7 +21,7 @@
|
|||||||
/**
|
/**
|
||||||
* \file htdocs/projet/fiche.php
|
* \file htdocs/projet/fiche.php
|
||||||
* \ingroup projet
|
* \ingroup projet
|
||||||
* \brief Fiche projet
|
* \brief Project card
|
||||||
* \version $Id$
|
* \version $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -260,6 +260,7 @@ if ($_GET["action"] == 'create' && $user->rights->projet->creer)
|
|||||||
$modProject = new $obj;
|
$modProject = new $obj;
|
||||||
$defaultref = $modProject->getNextValue($soc,$project);
|
$defaultref = $modProject->getNextValue($soc,$project);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (empty($defaultref)) $defaultref='';
|
if (empty($defaultref)) $defaultref='';
|
||||||
|
|
||||||
// Ref
|
// Ref
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user