Merge pull request #1325 from FHenry/3.5

[ bug #1153 ] SQL Error on the VAT main screen (with pgsql)
This commit is contained in:
Laurent Destailleur 2013-11-27 16:08:02 -08:00
commit 74d6698f7d
2 changed files with 2 additions and 2 deletions

View File

@ -222,7 +222,7 @@ $sql.= " FROM ".MAIN_DB_PREFIX."tva as f";
$sql.= " WHERE f.entity = ".$conf->entity;
$sql.= " AND f.datev >= '".$db->idate(dol_get_first_day($y,1,false))."'";
$sql.= " AND f.datev <= '".$db->idate(dol_get_last_day($y,12,false))."'";
$sql.= " GROUP BY dm ASC";
$sql.= " GROUP BY dm ORDER BY dm ASC";
pt($db, $sql,$langs->trans("Year")." $y");

View File

@ -2089,7 +2089,7 @@ class ContratLigne
$sql.= " total_localtax1='".$this->total_localtax1."',";
$sql.= " total_localtax2='".$this->total_localtax2."',";
$sql.= " total_ttc='".$this->total_ttc."',";
$sql.= " fk_product_fournisseur_price='".$this->fk_fournprice."',";
$sql.= " fk_product_fournisseur_price=".(!empty($this->fk_fournprice)?$this->fk_fournprice:"NULL").",";
$sql.= " buy_price_ht='".price2num($this->pa_ht)."',";
$sql.= " info_bits='".$this->info_bits."',";
$sql.= " fk_user_author=".($this->fk_user_author >= 0?$this->fk_user_author:"NULL").",";