modifie le prefix pour qu'il comporte 4 caracteres

This commit is contained in:
opensides 2004-06-16 13:47:17 +00:00
parent b3c438b3b8
commit ec00340f2f

View File

@ -324,7 +324,7 @@ class Societe {
$nom = preg_replace("/[[:punct:]]/","",$this->db->result(0,0)); $nom = preg_replace("/[[:punct:]]/","",$this->db->result(0,0));
$this->db->free(); $this->db->free();
$prefix = strtoupper(substr($nom, 0, 2)); $prefix = strtoupper(substr($nom, 0, 4));
$sql = "SELECT count(*) FROM ".MAIN_DB_PREFIX."societe WHERE prefix_comm = '$prefix'"; $sql = "SELECT count(*) FROM ".MAIN_DB_PREFIX."societe WHERE prefix_comm = '$prefix'";
if ( $this->db->query( $sql) ) if ( $this->db->query( $sql) )