From fe075d8fffdbc006ac63fa75686a62287d1557f8 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Thu, 11 May 2006 16:30:15 +0000 Subject: [PATCH] =?UTF-8?q?Fix:=20ajout=20v=E9rification?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/includes/modules/commande/mod_commande_diamant.php | 4 +++- htdocs/includes/modules/facture/neptune/neptune.modules.php | 4 +++- htdocs/includes/modules/modCommercial.class.php | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/htdocs/includes/modules/commande/mod_commande_diamant.php b/htdocs/includes/modules/commande/mod_commande_diamant.php index ced544156e4..7c117693fd9 100644 --- a/htdocs/includes/modules/commande/mod_commande_diamant.php +++ b/htdocs/includes/modules/commande/mod_commande_diamant.php @@ -94,13 +94,15 @@ class mod_commande_diamant extends ModeleNumRefCommandes global $db, $conf; // 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.= " 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); } diff --git a/htdocs/includes/modules/facture/neptune/neptune.modules.php b/htdocs/includes/modules/facture/neptune/neptune.modules.php index 9a638eb9ae6..80182b71296 100644 --- a/htdocs/includes/modules/facture/neptune/neptune.modules.php +++ b/htdocs/includes/modules/facture/neptune/neptune.modules.php @@ -86,13 +86,15 @@ class mod_facture_neptune extends ModeleNumRefFactures global $db,$conf; // 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.= " FROM ".MAIN_DB_PREFIX."facture"; + $sql.= " WHERE facnumber like '${fayy}%'"; $resql=$db->query($sql); if ($resql) { $row = $db->fetch_row($resql); + $fayy=''; if ($row) $fayy = substr($row[0],0,4); } diff --git a/htdocs/includes/modules/modCommercial.class.php b/htdocs/includes/modules/modCommercial.class.php index e1db285702d..c3390ffe7b5 100644 --- a/htdocs/includes/modules/modCommercial.class.php +++ b/htdocs/includes/modules/modCommercial.class.php @@ -80,7 +80,7 @@ class modCommercial extends DolibarrModules $this->boxes[1][0] = "Derniers prospects enregistrés"; $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"; // Permissions