From 37aa4eb51b593c28035d91f6d1dc666b7f3ba372 Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Fri, 25 Jun 2010 17:54:39 +0000 Subject: [PATCH] Get simpler to find the sign of FIN operation --- include/class_acc_ledger.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/class_acc_ledger.php b/include/class_acc_ledger.php index d8abf1a3b..d53539726 100644 --- a/include/class_acc_ledger.php +++ b/include/class_acc_ledger.php @@ -574,9 +574,9 @@ jr_comment||' ('||jr_internal||')'||case when jr_pj_number is not null and jr_pj // Check ledger type : if ( $row['jrn_def_type'] == 'FIN' ) { - $positive = $this->db->count_sql("select * from jrn inner join jrnx on jr_grpt_id=j_grpt ". - " where jr_id=".$row['jr_id']." and $sql_fin ". - " and j_debit='f'"); + $positive = $this->db->get_value("select qf_amount from quant_fin where jr_id=$1", + array($row['jr_id'])); + $positive=($positive < 0)?1:0; } $r.="";