diff --git a/include/class_customer.php b/include/class_customer.php
index a35d3f831..be1217b11 100644
--- a/include/class_customer.php
+++ b/include/class_customer.php
@@ -253,12 +253,12 @@ where
" ".$client->strAttribut(ATTR_DEF_PAYS).
"";
- $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('
%15.2f€ | ',$a['debit']);
$r.=sprintf(' %15.2f€ | ',$a['credit']);
diff --git a/include/class_periode.php b/include/class_periode.php
index e782b942e..5edd03f6f 100644
--- a/include/class_periode.php
+++ b/include/class_periode.php
@@ -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
diff --git a/include/class_supplier.php b/include/class_supplier.php
index ae44f4b7d..60ccf1094 100644
--- a/include/class_supplier.php
+++ b/include/class_supplier.php
@@ -134,12 +134,12 @@ class Supplier extends fiche{
" ".$supplier->strAttribut(ATTR_DEF_PAYS).
"";
- $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(' %15.2f€ | ',$a['debit']);
$r.=sprintf(' %15.2f€ | ',$a['credit']);
$r.=sprintf(' %15.2f€ | ',$a['solde']);