Update index.php
change datep
This commit is contained in:
parent
024ba2ee42
commit
54d2f1161d
@ -277,7 +277,7 @@ function activitytrim($product_type)
|
|||||||
global $conf,$langs,$db;
|
global $conf,$langs,$db;
|
||||||
|
|
||||||
// on affiche les 3 dernières années
|
// on affiche les 3 dernières années
|
||||||
$begindate=date('Y',dol_time_plus_duree(time(), -3, "y"));
|
$yearofbegindate=date('Y',dol_time_plus_duree(time(), -3, "y"));
|
||||||
|
|
||||||
// ventilation par trimestre
|
// ventilation par trimestre
|
||||||
$sql = "SELECT DATE_FORMAT(p.datep,'%Y') as annee, DATE_FORMAT(p.datep,'%m') as mois, sum(fd.total_ht) as Mnttot";
|
$sql = "SELECT DATE_FORMAT(p.datep,'%Y') as annee, DATE_FORMAT(p.datep,'%m') as mois, sum(fd.total_ht) as Mnttot";
|
||||||
@ -289,7 +289,7 @@ function activitytrim($product_type)
|
|||||||
$sql.= " AND pf.fk_paiement= p.rowid";
|
$sql.= " AND pf.fk_paiement= p.rowid";
|
||||||
$sql.= " AND fd.product_type=".$product_type;
|
$sql.= " AND fd.product_type=".$product_type;
|
||||||
$sql.= " AND s.entity = ".$conf->entity;
|
$sql.= " AND s.entity = ".$conf->entity;
|
||||||
$sql.= " AND DATE_FORMAT(p.datep,'%Y') > ".date('Y',$begindate)." and paye=1";
|
$sql.= " AND p.datep >= '".$db->idate(dol_get_first_day($yearofbegindate),1)."'";
|
||||||
$sql.= " GROUP BY annee, mois ";
|
$sql.= " GROUP BY annee, mois ";
|
||||||
$sql.= " ORDER BY annee, mois ";
|
$sql.= " ORDER BY annee, mois ";
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user