Fix: Wrong module numbering for project

This commit is contained in:
Laurent Destailleur 2010-02-15 00:57:27 +00:00
parent 3f2ee959f0
commit 48f100c068
3 changed files with 6 additions and 3 deletions

View File

@ -90,7 +90,8 @@ class mod_project_simple extends ModeleNumRefProjects
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",$date);
$num = sprintf("%04s",$max+1);

View File

@ -119,7 +119,8 @@ class mod_project_universal extends ModeleNumRefProjects
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;
}

View File

@ -21,7 +21,7 @@
/**
* \file htdocs/projet/fiche.php
* \ingroup projet
* \brief Fiche projet
* \brief Project card
* \version $Id$
*/
@ -260,6 +260,7 @@ if ($_GET["action"] == 'create' && $user->rights->projet->creer)
$modProject = new $obj;
$defaultref = $modProject->getNextValue($soc,$project);
}
if (empty($defaultref)) $defaultref='';
// Ref