month_report.php 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478
  1. <?php
  2. /* Copyright (C) 2007-2010 Laurent Destailleur <eldy@users.sourceforge.net>
  3. * Copyright (C) 2011 François Legastelois <flegastelois@teclib.com>
  4. * Copyright (C) 2018-2019 Frédéric France <frederic.france@netlogic.fr>
  5. * Copyright (C) 2020 Tobias Sekan <tobias.sekan@startmail.com>
  6. *
  7. * This program is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License as published by
  9. * the Free Software Foundation; either version 3 of the License, or
  10. * (at your option) any later version.
  11. *
  12. * This program is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with this program. If not, see <https://www.gnu.org/licenses/>.
  19. */
  20. /**
  21. * \file month_report.php
  22. * \ingroup holiday
  23. * \brief Monthly report of leave requests.
  24. */
  25. // Load Dolibarr environment
  26. require '../main.inc.php';
  27. require_once DOL_DOCUMENT_ROOT.'/holiday/class/holiday.class.php';
  28. require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php';
  29. require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
  30. require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
  31. require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
  32. // Load translation files required by the page
  33. $langs->loadLangs(array('holiday', 'hrm'));
  34. $action = GETPOST('action', 'aZ09') ?GETPOST('action', 'aZ09') : 'view';
  35. $massaction = GETPOST('massaction', 'alpha');
  36. $contextpage = GETPOST('contextpage', 'aZ');
  37. $optioncss = GETPOST('optioncss', 'aZ');
  38. $socid = 0;
  39. $id = GETPOST('id', 'int');
  40. $search_ref = GETPOST('search_ref', 'alphanohtml');
  41. $search_employee = GETPOST('search_employee', 'int');
  42. $search_type = GETPOST('search_type', 'int');
  43. $search_description = GETPOST('search_description', 'alphanohtml');
  44. $limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
  45. $sortfield = GETPOST('sortfield', 'aZ09comma');
  46. $sortorder = GETPOST('sortorder', 'aZ09comma');
  47. if (!$sortfield) {
  48. $sortfield = "cp.rowid";
  49. }
  50. if (!$sortorder) {
  51. $sortorder = "ASC";
  52. }
  53. $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
  54. if (empty($page) || $page == -1) {
  55. $page = 0;
  56. }
  57. $hookmanager->initHooks(array('leavemovementlist'));
  58. $arrayfields = array();
  59. $arrayofmassactions = array();
  60. // Security check
  61. if ($user->socid > 0) { // Protection if external user
  62. //$socid = $user->socid;
  63. accessforbidden();
  64. }
  65. $result = restrictedArea($user, 'holiday', $id, '');
  66. /*
  67. * Actions
  68. */
  69. if (GETPOST('cancel', 'alpha')) {
  70. $action = 'list'; $massaction = '';
  71. }
  72. if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') {
  73. $massaction = '';
  74. }
  75. $parameters = array();
  76. $reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
  77. if ($reshook < 0) {
  78. setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
  79. }
  80. if (empty($reshook)) {
  81. // Selection of new fields
  82. include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php';
  83. // Purge search criteria
  84. if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) { // All tests are required to be compatible with all browsers
  85. $search_ref = '';
  86. $search_employee = '';
  87. $search_type = '';
  88. $search_description = '';
  89. $toselect = array();
  90. $search_array_options = array();
  91. }
  92. if (GETPOST('button_removefilter_x', 'alpha')
  93. || GETPOST('button_removefilter.x', 'alpha')
  94. || GETPOST('button_removefilter', 'alpha')
  95. || GETPOST('button_search_x', 'alpha')
  96. || GETPOST('button_search.x', 'alpha')
  97. || GETPOST('button_search', 'alpha')) {
  98. $massaction = '';
  99. }
  100. }
  101. $arrayfields = array(
  102. 'cp.ref'=>array('label' => 'Ref', 'checked'=>1, 'position'=>5),
  103. 'cp.fk_type'=>array('label' => 'Type', 'checked'=>1, 'position'=>10),
  104. 'cp.fk_user'=>array('label' => 'Employee', 'checked'=>1, 'position'=>20),
  105. 'cp.date_debut'=>array('label' => 'DateDebCP', 'checked'=>-1, 'position'=>30),
  106. 'cp.date_fin'=>array('label' => 'DateFinCP', 'checked'=>-1, 'position'=>32),
  107. 'used_days'=>array('label' => 'NbUseDaysCPShort', 'checked'=>-1, 'position'=>34),
  108. 'date_start_month'=>array('label' => 'DateStartInMonth', 'checked'=>1, 'position'=>50),
  109. 'date_end_month'=>array('label' => 'DateEndInMonth', 'checked'=>1, 'position'=>52),
  110. 'used_days_month'=>array('label' => 'NbUseDaysCPShortInMonth', 'checked'=>1, 'position'=>54),
  111. 'cp.description'=>array('label' => 'DescCP', 'checked'=>-1, 'position'=>800),
  112. );
  113. /*
  114. * View
  115. */
  116. $form = new Form($db);
  117. $formother = new FormOther($db);
  118. $holidaystatic = new Holiday($db);
  119. $listhalfday = array('morning'=>$langs->trans("Morning"), "afternoon"=>$langs->trans("Afternoon"));
  120. $title = $langs->trans('CPTitreMenu');
  121. llxHeader('', $title);
  122. $search_month = GETPOST("remonth", 'int') ?GETPOST("remonth", 'int') : date("m", time());
  123. $search_year = GETPOST("reyear", 'int') ?GETPOST("reyear", 'int') : date("Y", time());
  124. $year_month = sprintf("%04d", $search_year).'-'.sprintf("%02d", $search_month);
  125. $sql = "SELECT cp.rowid, cp.ref, cp.fk_user, cp.date_debut, cp.date_fin, cp.fk_type, cp.description, cp.halfday, cp.statut as status";
  126. $sql .= " FROM ".MAIN_DB_PREFIX."holiday cp";
  127. $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."user u ON cp.fk_user = u.rowid";
  128. $sql .= " WHERE cp.rowid > 0";
  129. $sql .= " AND cp.statut = ".Holiday::STATUS_APPROVED;
  130. $sql .= " AND (";
  131. $sql .= " (date_format(cp.date_debut, '%Y-%m') = '".$db->escape($year_month)."' OR date_format(cp.date_fin, '%Y-%m') = '".$db->escape($year_month)."')";
  132. $sql .= " OR"; // For leave over several months
  133. $sql .= " (date_format(cp.date_debut, '%Y-%m') < '".$db->escape($year_month)."' AND date_format(cp.date_fin, '%Y-%m') > '".$db->escape($year_month)."') ";
  134. $sql .= " )";
  135. if (!empty($search_ref)) {
  136. $sql .= natural_search('cp.ref', $search_ref);
  137. }
  138. if (!empty($search_employee) && $search_employee > 0) {
  139. $sql .= " AND cp.fk_user = ".((int) $search_employee);
  140. }
  141. if (!empty($search_type) && $search_type != '-1') {
  142. $sql .= ' AND cp.fk_type IN ('.$db->sanitize($search_type).')';
  143. }
  144. if (!empty($search_description)) {
  145. $sql .= natural_search('cp.description', $search_description);
  146. }
  147. $sql .= $db->order($sortfield, $sortorder);
  148. $resql = $db->query($sql);
  149. if (empty($resql)) {
  150. dol_print_error($db);
  151. exit;
  152. }
  153. $num = $db->num_rows($resql);
  154. $param = '';
  155. if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) {
  156. $param .= '&contextpage='.urlencode($contextpage);
  157. }
  158. if ($limit > 0 && $limit != $conf->liste_limit) {
  159. $param .= '&limit='.((int) $limit);
  160. }
  161. if (!empty($search_ref)) {
  162. $param .= '&search_ref='.urlencode($search_ref);
  163. }
  164. if (!empty($search_employee)) {
  165. $param .= '&search_employee='.urlencode($search_employee);
  166. }
  167. if (!empty($search_type)) {
  168. $param .= '&search_type='.urlencode($search_type);
  169. }
  170. if (!empty($search_description)) {
  171. $param .= '&search_description='.urlencode($search_description);
  172. }
  173. print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">';
  174. if ($optioncss != '') {
  175. print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
  176. }
  177. print '<input type="hidden" name="token" value="'.newToken().'">';
  178. print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
  179. print '<input type="hidden" name="action" value="list">';
  180. print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
  181. print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
  182. print '<input type="hidden" name="page" value="'.$page.'">';
  183. print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
  184. print load_fiche_titre($langs->trans('MenuReportMonth'), '', 'title_hrm');
  185. // Selection filter
  186. print '<div class="tabBar">';
  187. print $formother->select_month($search_month, 'remonth', 0, 0, 'minwidth50 maxwidth75imp valignmiddle', true);
  188. print $formother->selectyear($search_year, 'reyear', 0, 10, 5, 0, 0, '', 'valignmiddle width75', true);
  189. print '<input type="submit" class="button" value="'.dol_escape_htmltag($langs->trans("Search")).'" />';
  190. print '</div>';
  191. print '<br>';
  192. $moreforfilter = '';
  193. $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
  194. $selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields
  195. $selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : '');
  196. print '<div class="div-table-responsive">';
  197. print '<table class="tagtable nobottomiftotal liste">';
  198. print '<tr class="liste_titre_filter">';
  199. // Action column
  200. if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
  201. print '<th class="wrapcolumntitle center maxwidthsearch liste_titre">';
  202. $searchpicto = $form->showFilterButtons('left');
  203. print $searchpicto;
  204. print '</th>';
  205. }
  206. // Filter: Ref
  207. if (!empty($arrayfields['cp.ref']['checked'])) {
  208. print '<th class="liste_titre">';
  209. print '<input class="flat maxwidth100" type="text" name="search_ref" value="'.dol_escape_htmltag($search_ref).'">';
  210. print '</th>';
  211. }
  212. // Filter: Type
  213. if (!empty($arrayfields['cp.fk_type']['checked'])) {
  214. $typeleaves = $holidaystatic->getTypes(1, -1);
  215. $arraytypeleaves = array();
  216. foreach ($typeleaves as $key => $val) {
  217. $labeltoshow = ($langs->trans($val['code']) != $val['code'] ? $langs->trans($val['code']) : $val['label']);
  218. $arraytypeleaves[$val['rowid']] = $labeltoshow;
  219. }
  220. print '<th class="liste_titre">';
  221. print $form->selectarray('search_type', $arraytypeleaves, $search_type, 1, 0, 0, '', 0, 0, 0, '', 'maxwidth100', 1);
  222. print '</th>';
  223. }
  224. // Filter: Employee
  225. if (!empty($arrayfields['cp.fk_user']['checked'])) {
  226. print '<th class="liste_titre">';
  227. print $form->select_dolusers($search_employee, "search_employee", 1, null, 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth100');
  228. print '</th>';
  229. }
  230. if (!empty($arrayfields['cp.date_debut']['checked'])) {
  231. print '<th class="liste_titre"></th>';
  232. }
  233. if (!empty($arrayfields['cp.date_fin']['checked'])) {
  234. print '<th class="liste_titre"></th>';
  235. }
  236. if (!empty($arrayfields['used_days']['checked'])) {
  237. print '<th class="liste_titre"></th>';
  238. }
  239. if (!empty($arrayfields['date_start_month']['checked'])) {
  240. print '<th class="liste_titre"></th>';
  241. }
  242. if (!empty($arrayfields['date_end_month']['checked'])) {
  243. print '<th class="liste_titre"></th>';
  244. }
  245. if (!empty($arrayfields['used_days_month']['checked'])) {
  246. print '<th class="liste_titre"></th>';
  247. }
  248. // Filter: Description
  249. if (!empty($arrayfields['cp.description']['checked'])) {
  250. print '<th class="liste_titre">';
  251. print '<input type="text" class="maxwidth100" name="search_description" value="'.$search_description.'">';
  252. print '</th>';
  253. }
  254. // Action column
  255. if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
  256. print '<th class="liste_titre maxwidthsearch">';
  257. $searchpicto = $form->showFilterButtons();
  258. print $searchpicto;
  259. print '</th>';
  260. }
  261. print '</tr>';
  262. print '<tr class="liste_titre">';
  263. // Action column
  264. if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
  265. print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ')."\n";
  266. }
  267. if (!empty($arrayfields['cp.ref']['checked'])) {
  268. print_liste_field_titre($arrayfields['cp.ref']['label'], $_SERVER["PHP_SELF"], 'cp.ref', '', '', '', $sortfield, $sortorder);
  269. }
  270. if (!empty($arrayfields['cp.fk_type']['checked'])) {
  271. print_liste_field_titre($arrayfields['cp.fk_type']['label'], $_SERVER["PHP_SELF"], 'cp.fk_type', '', '', '', $sortfield, $sortorder);
  272. }
  273. if (!empty($arrayfields['cp.fk_user']['checked'])) {
  274. print_liste_field_titre($arrayfields['cp.fk_user']['label'], $_SERVER["PHP_SELF"], 'cp.fk_user', '', '', '', $sortfield, $sortorder);
  275. }
  276. if (!empty($arrayfields['ct.label']['checked'])) {
  277. print_liste_field_titre($arrayfields['ct.label']['label'], $_SERVER["PHP_SELF"], 'ct.label', '', '', '', $sortfield, $sortorder);
  278. }
  279. if (!empty($arrayfields['cp.date_debut']['checked'])) {
  280. print_liste_field_titre($arrayfields['cp.date_debut']['label'], $_SERVER["PHP_SELF"], 'cp.date_debut', '', '', '', $sortfield, $sortorder, 'center ');
  281. }
  282. if (!empty($arrayfields['cp.date_fin']['checked'])) {
  283. print_liste_field_titre($arrayfields['cp.date_fin']['label'], $_SERVER["PHP_SELF"], 'cp.date_fin', '', '', '', $sortfield, $sortorder, 'center ');
  284. }
  285. if (!empty($arrayfields['used_days']['checked'])) {
  286. print_liste_field_titre($arrayfields['used_days']['label'], $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'maxwidth125 right ');
  287. }
  288. if (!empty($arrayfields['date_start_month']['checked'])) {
  289. print_liste_field_titre($arrayfields['date_start_month']['label'], $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center ');
  290. }
  291. if (!empty($arrayfields['date_end_month']['checked'])) {
  292. print_liste_field_titre($arrayfields['date_end_month']['label'], $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center ');
  293. }
  294. if (!empty($arrayfields['used_days_month']['checked'])) {
  295. print_liste_field_titre($arrayfields['used_days_month']['label'], $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'maxwidth125 right ');
  296. }
  297. if (!empty($arrayfields['cp.description']['checked'])) {
  298. print_liste_field_titre($arrayfields['cp.description']['label'], $_SERVER["PHP_SELF"], 'cp.description', '', '', '', $sortfield, $sortorder);
  299. }
  300. // Action column
  301. if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
  302. print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ')."\n";
  303. }
  304. print '</tr>';
  305. if ($num == 0) {
  306. print '<tr><td colspan="11"><span class="opacitymedium">'.$langs->trans('None').'</span></td></tr>';
  307. } else {
  308. $tmpuser = new User($db);
  309. while ($obj = $db->fetch_object($resql)) {
  310. $tmpuser->fetch($obj->fk_user);
  311. $date_start = $db->jdate($obj->date_debut, true);
  312. $date_end = $db->jdate($obj->date_fin, true);
  313. $tmpstart = dol_getdate($date_start);
  314. $tmpend = dol_getdate($date_end);
  315. $starthalfday = ($obj->halfday == -1 || $obj->halfday == 2) ? 'afternoon' : 'morning';
  316. $endhalfday = ($obj->halfday == 1 || $obj->halfday == 2) ? 'morning' : 'afternoon';
  317. $halfdayinmonth = $obj->halfday;
  318. $starthalfdayinmonth = $starthalfday;
  319. $endhalfdayinmonth = $endhalfday;
  320. //0:Full days, 2:Start afternoon end morning, -1:Start afternoon end afternoon, 1:Start morning end morning
  321. // Set date_start_gmt and date_end_gmt that are date to show for the selected month
  322. $date_start_inmonth = $db->jdate($obj->date_debut, true);
  323. $date_end_inmonth = $db->jdate($obj->date_fin, true);
  324. if ($tmpstart['year'] < $search_year || $tmpstart['mon'] < $search_month) {
  325. $date_start_inmonth = dol_get_first_day($search_year, $search_month, true);
  326. $starthalfdayinmonth = 'morning';
  327. if ($halfdayinmonth == 2) {
  328. $halfdayinmonth = 1;
  329. }
  330. if ($halfdayinmonth == -1) {
  331. $halfdayinmonth = 0;
  332. }
  333. }
  334. if ($tmpend['year'] > $search_year || $tmpend['mon'] > $search_month) {
  335. $date_end_inmonth = dol_get_last_day($search_year, $search_month, true) - ((24 * 3600) - 1);
  336. $endhalfdayinmonth = 'afternoon';
  337. if ($halfdayinmonth == 2) {
  338. $halfdayinmonth = -1;
  339. }
  340. if ($halfdayinmonth == 1) {
  341. $halfdayinmonth = 0;
  342. }
  343. }
  344. // Leave request
  345. $holidaystatic->id = $obj->rowid;
  346. $holidaystatic->ref = $obj->ref;
  347. $holidaystatic->statut = $obj->status;
  348. $holidaystatic->status = $obj->status;
  349. $holidaystatic->fk_user = $obj->fk_user;
  350. $holidaystatic->fk_type = $obj->fk_type;
  351. $holidaystatic->description = $obj->description;
  352. $holidaystatic->halfday = $obj->halfday;
  353. $holidaystatic->date_debut = $db->jdate($obj->date_debut);
  354. $holidaystatic->date_fin = $db->jdate($obj->date_fin);
  355. print '<tr class="oddeven">';
  356. // Action column
  357. if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
  358. print '<td></td>';
  359. }
  360. if (!empty($arrayfields['cp.ref']['checked'])) {
  361. print '<td class="nowraponall">'.$holidaystatic->getNomUrl(1, 1).'</td>';
  362. }
  363. if (!empty($arrayfields['cp.fk_type']['checked'])) {
  364. print '<td>'.$arraytypeleaves[$obj->fk_type].'</td>';
  365. }
  366. if (!empty($arrayfields['cp.fk_user']['checked'])) {
  367. print '<td class="tdoverflowmax150">'.$tmpuser->getNomUrl(-1).'</td>';
  368. }
  369. if (!empty($arrayfields['cp.date_debut']['checked'])) {
  370. print '<td class="center">'.dol_print_date($db->jdate($obj->date_debut), 'day');
  371. print ' <span class="opacitymedium">('.$langs->trans($listhalfday[$starthalfday]).')</span>';
  372. print '</td>';
  373. }
  374. if (!empty($arrayfields['cp.date_fin']['checked'])) {
  375. print '<td class="center">'.dol_print_date($db->jdate($obj->date_fin), 'day');
  376. print ' <span class="opacitymedium">('.$langs->trans($listhalfday[$endhalfday]).')</span>';
  377. print '</td>';
  378. }
  379. if (!empty($arrayfields['used_days']['checked'])) {
  380. print '<td class="right">'.num_open_day($date_start, $date_end, 0, 1, $obj->halfday).'</td>';
  381. }
  382. if (!empty($arrayfields['date_start_month']['checked'])) {
  383. print '<td class="center">'.dol_print_date($date_start_inmonth, 'day');
  384. print ' <span class="opacitymedium">('.$langs->trans($listhalfday[$starthalfdayinmonth]).')</span>';
  385. print '</td>';
  386. }
  387. if (!empty($arrayfields['date_end_month']['checked'])) {
  388. print '<td class="center">'.dol_print_date($date_end_inmonth, 'day');
  389. print ' <span class="opacitymedium">('.$langs->trans($listhalfday[$endhalfdayinmonth]).')</span>';
  390. print '</td>';
  391. }
  392. if (!empty($arrayfields['used_days_month']['checked'])) {
  393. print '<td class="right">'.num_open_day($date_start_inmonth, $date_end_inmonth, 0, 1, $halfdayinmonth).'</td>';
  394. }
  395. if (!empty($arrayfields['cp.description']['checked'])) {
  396. print '<td class="maxwidth300 small">';
  397. print '<div class="twolinesmax">';
  398. print dolGetFirstLineOfText(dol_string_nohtmltag($obj->description, 1));
  399. print '</div>';
  400. print '</td>';
  401. }
  402. // Action column
  403. if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
  404. print '<td></td>';
  405. }
  406. print '</tr>';
  407. }
  408. }
  409. print '</table>';
  410. print '</div>';
  411. print '</form>';
  412. // End of page
  413. llxFooter();
  414. $db->close();