diff --git a/html/test.php b/html/test.php
index ed9a957d8..d8b890a74 100644
--- a/html/test.php
+++ b/html/test.php
@@ -65,6 +65,23 @@ if (!file_exists('authorized_debug'))
}
define('ALLOWED', 1);
html_page_start("Classic");
+/******************************************************************************************************************/
+/* Utilities
+/******************************************************************************************************************/
+
+/**
+ * Return the card this most activities
+ * @return integer (fiche.f_id)
+ */
+function get_card_with_activity() {
+ global $cn;
+ $card_count=$cn->get_array("select count(*),f_id ".
+ " from jrnx ".
+ " where ".
+ " f_id is not null ".
+ "group by f_id order by count(*) desc");
+ return $card_count[0]['f_id'];
+}
/*
* Loading of all scenario
diff --git a/include/class/acc_ledger.class.php b/include/class/acc_ledger.class.php
index 4e4750565..3b78c74f1 100644
--- a/include/class/acc_ledger.class.php
+++ b/include/class/acc_ledger.class.php
@@ -57,7 +57,7 @@ require_once NOALYSS_INCLUDE.'/class/pre_op_ods.class.php';
/** @brief Class for jrn, class acc_ledger for manipulating the ledger
*
*/
-class Acc_Ledger extends jrn_def_sql
+class Acc_Ledger extends jrn_def_sql
{
var $id; /* * < jrn_def.jrn_def_id */
@@ -82,7 +82,7 @@ class Acc_Ledger extends jrn_def_sql
$this->nb=MAX_ARTICLE;
parent::__construct($p_cn, $p_id);
}
-
+
function get_last_pj()
{
if (isNumber($this->id)==0)
@@ -95,7 +95,8 @@ class Acc_Ledger extends jrn_def_sql
$ret=$this->db->get_array("select last_value,is_called from s_jrn_pj".$this->id);
$last=$ret[0]['last_value'];
/**
- * \note With PSQL sequence , the last_value column is 1 when before AND after the first call, to make the difference between them
+ * \note With PSQL sequence , the last_value column is 1 when before AND after the first call,
+ * to make the difference between them
* I have to check whether the sequence has been already called or not */
if ($ret[0]['is_called']=='f')
$last--;
@@ -739,8 +740,11 @@ class Acc_Ledger extends jrn_def_sql
$ret.=tr(td('').td(_('Totaux')).td($total_deb, 'class="num"').td($total_cred,
'class="num"'), 'class="highlight"');
$ret.="";
- if ($g_parameter->MY_ANALYTIC!='nu'&&$p_readonly==false)
- $ret.='';
+ if ($g_parameter->MY_ANALYTIC!='nu'&&$p_readonly==false) {
+ $ret.='';
+
+ }
return $ret;
}
@@ -983,7 +987,11 @@ class Acc_Ledger extends jrn_def_sql
$ret.='