Fix: ajout vérification
This commit is contained in:
parent
fb5ab2366d
commit
fe075d8fff
@ -94,13 +94,15 @@ class mod_commande_diamant extends ModeleNumRefCommandes
|
|||||||
global $db, $conf;
|
global $db, $conf;
|
||||||
|
|
||||||
// D'abord on récupère la valeur max (réponse immédiate car champ indéxé)
|
// D'abord on récupère la valeur max (réponse immédiate car champ indéxé)
|
||||||
$cyy='';
|
$cyy = 'C'.strftime("%y",time());
|
||||||
$sql = "SELECT MAX(ref)";
|
$sql = "SELECT MAX(ref)";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."commande";
|
$sql.= " FROM ".MAIN_DB_PREFIX."commande";
|
||||||
|
$sql.= " WHERE ref like '${cyy}%'";
|
||||||
$resql=$db->query($sql);
|
$resql=$db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
$row = $db->fetch_row($resql);
|
$row = $db->fetch_row($resql);
|
||||||
|
$cyy='';
|
||||||
if ($row) $cyy = substr($row[0],0,3);
|
if ($row) $cyy = substr($row[0],0,3);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -86,13 +86,15 @@ class mod_facture_neptune extends ModeleNumRefFactures
|
|||||||
global $db,$conf;
|
global $db,$conf;
|
||||||
|
|
||||||
// D'abord on récupère la valeur max (réponse immédiate car champ indéxé)
|
// D'abord on récupère la valeur max (réponse immédiate car champ indéxé)
|
||||||
$fayy='';
|
$fayy = 'FA'.strftime("%y",time());
|
||||||
$sql = "SELECT MAX(facnumber)";
|
$sql = "SELECT MAX(facnumber)";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."facture";
|
$sql.= " FROM ".MAIN_DB_PREFIX."facture";
|
||||||
|
$sql.= " WHERE facnumber like '${fayy}%'";
|
||||||
$resql=$db->query($sql);
|
$resql=$db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
$row = $db->fetch_row($resql);
|
$row = $db->fetch_row($resql);
|
||||||
|
$fayy='';
|
||||||
if ($row) $fayy = substr($row[0],0,4);
|
if ($row) $fayy = substr($row[0],0,4);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -80,7 +80,7 @@ class modCommercial extends DolibarrModules
|
|||||||
$this->boxes[1][0] = "Derniers prospects enregistrés";
|
$this->boxes[1][0] = "Derniers prospects enregistrés";
|
||||||
$this->boxes[1][1] = "box_prospect.php";
|
$this->boxes[1][1] = "box_prospect.php";
|
||||||
|
|
||||||
$this->boxes[2][0] = "Dernieres actions";
|
$this->boxes[2][0] = "Dernières actions";
|
||||||
$this->boxes[2][1] = "box_actions.php";
|
$this->boxes[2][1] = "box_actions.php";
|
||||||
|
|
||||||
// Permissions
|
// Permissions
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user