Fix bug : Quick code must be used in gestion

This commit is contained in:
Dany De Bontridder 2008-05-07 18:46:52 +00:00
parent 68138c6175
commit f4a80ccd76
3 changed files with 13 additions and 10 deletions

View file

@ -253,12 +253,12 @@ where
" ".$client->strAttribut(ATTR_DEF_PAYS).
"</TD>";
$post=new Acc_Account_Ledger($this->cn,$client->strAttribut(ATTR_DEF_ACCOUNT));
/* Filter on the default year */
$User=new User($this->cn);
$filter_year=" j_tech_per in (select p_id from parm_periode ".
"where p_exercice='".$User->get_exercice()."')";
$a=$post->get_solde_detail($filter_year);
$a=$client->get_solde_detail($filter_year);
$r.=sprintf('<TD align="right"> %15.2f&euro;</TD>',$a['debit']);
$r.=sprintf('<TD align="right"> %15.2f&euro;</TD>',$a['credit']);

View file

@ -270,15 +270,18 @@ class Periode {
/*!\brief load data from database
*/
function load() {
$row=get_array($this->cn,"select p_start,p_end,p_exercice,p_closed,p_central from parm_periode where p_id=$1",
array($this->p_id));
if ($row == null ) return;
$this->p_start=$row['p_start'];
$this->p_end=$row['p_end'];
$this->p_exercice=$row['p_exercice'];
$this->p_closed=$row['p_closed'];
$this->p_central=$row['p_central'];
if ($row == null ) return;
$this->p_start=$row[0]['p_start'];
$this->p_end=$row[0]['p_end'];
$this->p_exercice=$row[0]['p_exercice'];
$this->p_closed=$row[0]['p_closed'];
$this->p_central=$row[0]['p_central'];
}
/*!\brief return the max and the min periode of the exercice given

View file

@ -134,12 +134,12 @@ class Supplier extends fiche{
" ".$supplier->strAttribut(ATTR_DEF_PAYS).
"</TD>";
$post=new Acc_Account_Ledger($this->cn,$supplier->strAttribut(ATTR_DEF_ACCOUNT));
/* Filter on the default year */
$User=new User($this->cn);
$filter_year=" j_tech_per in (select p_id from parm_periode ".
"where p_exercice='".$User->get_exercice()."')";
$a=$post->get_solde_detail($filter_year);
$a=$supplier->get_solde_detail($filter_year);
$r.=sprintf('<TD align="right"> %15.2f&euro;</TD>',$a['debit']);
$r.=sprintf('<TD align="right"> %15.2f&euro;</TD>',$a['credit']);
$r.=sprintf('<TD align="right"> %15.2f&euro;</TD>',$a['solde']);