64 global $user, $langs, $conf;
66 include_once DOL_DOCUMENT_ROOT.
'/accountancy/class/bookkeeping.class.php';
70 $this->info_box_head = array(
'text' => $langs->trans(
"BoxTitleSuspenseAccount"));
72 if ($user->hasRight(
'accounting',
'mouvements',
'lire')) {
74 if (!empty($suspenseAccount) && $suspenseAccount > 0) {
75 $sql =
"SELECT COUNT(*) as nb_suspense_account";
76 $sql .=
" FROM ".MAIN_DB_PREFIX.
"accounting_bookkeeping as b";
77 $sql .=
" WHERE b.numero_compte = '".$this->db->escape($suspenseAccount).
"'";
78 $sql .=
" AND b.entity = ".$conf->entity;
80 $result = $this->db->query($sql);
81 $nbSuspenseAccount = 0;
83 $obj = $this->db->fetch_object($result);
84 $nbSuspenseAccount = $obj->nb_suspense_account;
87 $this->info_box_contents[0][0] = array(
89 'text' => $langs->trans(
"NumberOfLinesInSuspenseAccount")
92 $this->info_box_contents[0][1] = array(
93 'td' =>
'class="right"',
94 'text' =>
'<a href="'.DOL_URL_ROOT.
'/accountancy/bookkeeping/list.php?search_accountancy_code_start='.urlencode($suspenseAccount).
'&search_accountancy_code_end='.urlencode($suspenseAccount).
'">'.$nbSuspenseAccount.
'</a>',
98 $this->info_box_contents[0][0] = array(
99 'td' =>
'class="nohover"',
100 'text' =>
'<span class="opacitymedium">'.$langs->trans(
"SuspenseAccountNotDefined").
'</span>'
104 $this->info_box_contents[0][0] = array(
105 'td' =>
'class="nohover"',
106 'text' =>
'<span class="opacitymedium">'.$langs->trans(
"ReadPermissionNotAllowed").
'</span>'