PSR2 space after comma in function call

This commit is contained in:
Frédéric FRANCE
2019-01-27 11:55:16 +01:00
parent a9da6a2d51
commit 7ee086b402
1474 changed files with 28095 additions and 28097 deletions

View File

@@ -111,7 +111,7 @@ class CommandeStats extends Stats
$sql.= " WHERE c.date_commande BETWEEN '".$this->db->idate(dol_get_first_day($year))."' AND '".$this->db->idate(dol_get_last_day($year))."'";
$sql.= " AND ".$this->where;
$sql.= " GROUP BY dm";
$sql.= $this->db->order('dm','DESC');
$sql.= $this->db->order('dm', 'DESC');
$res=$this->_getNbByMonth($year, $sql, $format);
return $res;
@@ -132,7 +132,7 @@ class CommandeStats extends Stats
if (!$user->rights->societe->client->voir && !$this->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
$sql.= " WHERE ".$this->where;
$sql.= " GROUP BY dm";
$sql.= $this->db->order('dm','DESC');
$sql.= $this->db->order('dm', 'DESC');
return $this->_getNbByYear($sql);
}
@@ -154,7 +154,7 @@ class CommandeStats extends Stats
$sql.= " WHERE c.date_commande BETWEEN '".$this->db->idate(dol_get_first_day($year))."' AND '".$this->db->idate(dol_get_last_day($year))."'";
$sql.= " AND ".$this->where;
$sql.= " GROUP BY dm";
$sql.= $this->db->order('dm','DESC');
$sql.= $this->db->order('dm', 'DESC');
$res=$this->_getAmountByMonth($year, $sql, $format);
return $res;
@@ -176,7 +176,7 @@ class CommandeStats extends Stats
$sql.= " WHERE c.date_commande BETWEEN '".$this->db->idate(dol_get_first_day($year))."' AND '".$this->db->idate(dol_get_last_day($year))."'";
$sql.= " AND ".$this->where;
$sql.= " GROUP BY dm";
$sql.= $this->db->order('dm','DESC');
$sql.= $this->db->order('dm', 'DESC');
return $this->_getAverageByMonth($year, $sql);
}
@@ -195,7 +195,7 @@ class CommandeStats extends Stats
if (!$user->rights->societe->client->voir && !$this->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
$sql.= " WHERE ".$this->where;
$sql.= " GROUP BY year";
$sql.= $this->db->order('year','DESC');
$sql.= $this->db->order('year', 'DESC');
return $this->_getAllByYear($sql);
}
@@ -215,9 +215,9 @@ class CommandeStats extends Stats
if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
$sql.= " WHERE ".$this->where;
$sql.= " AND c.rowid = tl.fk_commande AND tl.fk_product = product.rowid";
$sql.= " AND c.date_commande BETWEEN '".$this->db->idate(dol_get_first_day($year,1,false))."' AND '".$this->db->idate(dol_get_last_day($year,12,false))."'";
$sql.= " AND c.date_commande BETWEEN '".$this->db->idate(dol_get_first_day($year, 1, false))."' AND '".$this->db->idate(dol_get_last_day($year, 12, false))."'";
$sql.= " GROUP BY product.ref";
$sql.= $this->db->order('nb','DESC');
$sql.= $this->db->order('nb', 'DESC');
//$sql.= $this->db->plimit(20);
return $this->_getAllByProduct($sql);