Fix: Update request
This commit is contained in:
parent
a2cd3e5969
commit
74579860c7
@ -1345,15 +1345,17 @@ class Commande extends CommonObject
|
|||||||
*/
|
*/
|
||||||
function nb_expedition()
|
function nb_expedition()
|
||||||
{
|
{
|
||||||
$sql = 'SELECT count(*) FROM '.MAIN_DB_PREFIX.'expedition as e';
|
$sql = 'SELECT count(*)';
|
||||||
$sql .=" WHERE e.fk_commande = ".$this->id;
|
$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.= " WHERE el.fk_source = ".$this->id;
|
||||||
|
|
||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
$row = $this->db->fetch_row($resql);
|
$row = $this->db->fetch_row($resql);
|
||||||
return $row[0];
|
return $row[0];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user