Skip to content
Snippets Groups Projects
Commit 8ee98b48 authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Fix: BUG#33584

parent 1e5a8617
No related branches found
No related tags found
No related merge requests found
...@@ -1346,9 +1346,11 @@ class Commande extends CommonObject ...@@ -1346,9 +1346,11 @@ class Commande extends CommonObject
function nb_expedition() function nb_expedition()
{ {
$sql = 'SELECT count(*)'; $sql = 'SELECT count(*)';
$sql.= ' FROM '.MAIN_DB_PREFIX.'expedition as e,'; $sql.= ' FROM '.MAIN_DB_PREFIX.'expedition as e';
$sql.= ' '.MAIN_DB_PREFIX."element_element as el ON el.fk_target = e.rowid AND el.targettype = 'shipping'"; $sql.= ', '.MAIN_DB_PREFIX.'element_element as el';
$sql.= " WHERE el.fk_source = ".$this->id; $sql.= ' WHERE el.fk_source = '.$this->id;
$sql.= " AND el.fk_target = e.rowid";
$sql.= " AND el.targettype = 'shipping'";
$resql = $this->db->query($sql); $resql = $this->db->query($sql);
if ($resql) if ($resql)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment