mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-01-03 07:32:32 +01:00
Fix: ajout vrification
This commit is contained in:
@@ -94,13 +94,15 @@ class mod_commande_diamant extends ModeleNumRefCommandes
|
||||
global $db, $conf;
|
||||
|
||||
// D'abord on r<>cup<75>re la valeur max (r<>ponse imm<6D>diate car champ ind<6E>x<EFBFBD>)
|
||||
$cyy='';
|
||||
$cyy = 'C'.strftime("%y",time());
|
||||
$sql = "SELECT MAX(ref)";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."commande";
|
||||
$sql.= " WHERE ref like '${cyy}%'";
|
||||
$resql=$db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
$row = $db->fetch_row($resql);
|
||||
$cyy='';
|
||||
if ($row) $cyy = substr($row[0],0,3);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user