list.php 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505
  1. <?php
  2. /* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
  3. * Copyright (C) 2004-2018 Laurent Destailleur <eldy@users.sourceforge.net>
  4. * Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
  5. * Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
  6. * Copyright (C) 2019 Thibault FOUCART <support@ptibogxiv.net>
  7. *
  8. * This program is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License as published by
  10. * the Free Software Foundation; either version 3 of the License, or
  11. * (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program. If not, see <https://www.gnu.org/licenses/>.
  20. */
  21. /**
  22. * \file htdocs/don/list.php
  23. * \ingroup donations
  24. * \brief List of donations
  25. */
  26. // Load Dolibarr environment
  27. require '../main.inc.php';
  28. require_once DOL_DOCUMENT_ROOT.'/don/class/don.class.php';
  29. if (isModEnabled('project')) {
  30. require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
  31. }
  32. // Load translation files required by the page
  33. $langs->loadLangs(array('companies', 'donations'));
  34. $action = GETPOST('action', 'aZ09') ? GETPOST('action', 'aZ09') : 'view'; // The action 'create'/'add', 'edit'/'update', 'view', ...
  35. $massaction = GETPOST('massaction', 'alpha'); // The bulk action (combo box choice into lists)
  36. $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'sclist';
  37. $limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
  38. $sortfield = GETPOST('sortfield', 'aZ09comma');
  39. $sortorder = GETPOST('sortorder', 'aZ09comma');
  40. $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
  41. $type = GETPOST('type', 'aZ');
  42. $mode = GETPOST('mode', 'alpha');
  43. if (empty($page) || $page == -1) {
  44. $page = 0;
  45. } // If $page is not defined, or '' or -1
  46. $offset = $limit * $page;
  47. $pageprev = $page - 1;
  48. $pagenext = $page + 1;
  49. if (!$sortorder) {
  50. $sortorder = "DESC";
  51. }
  52. if (!$sortfield) {
  53. $sortfield = "d.datedon";
  54. }
  55. $search_status = (GETPOST("search_status", 'intcomma') != '') ? GETPOST("search_status", 'intcomma') : "-4";
  56. $search_all = trim((GETPOST('search_all', 'alphanohtml') != '') ? GETPOST('search_all', 'alphanohtml') : GETPOST('sall', 'alphanohtml'));
  57. $search_ref = GETPOST('search_ref', 'alpha');
  58. $search_company = GETPOST('search_company', 'alpha');
  59. $search_thirdparty = GETPOST('search_thirdparty', 'alpha');
  60. $search_name = GETPOST('search_name', 'alpha');
  61. $search_amount = GETPOST('search_amount', 'alpha');
  62. $optioncss = GETPOST('optioncss', 'alpha');
  63. $moreforfilter = GETPOST('moreforfilter', 'alpha');
  64. if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) { // Both test are required to be compatible with all browsers
  65. $search_all = "";
  66. $search_ref = "";
  67. $search_company = "";
  68. $search_thirdparty = "";
  69. $search_name = "";
  70. $search_amount = "";
  71. $search_status = '';
  72. }
  73. // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
  74. $hookmanager->initHooks(array('donationlist'));
  75. // List of fields to search into when doing a "search in all"
  76. $fieldstosearchall = array(
  77. 'd.rowid'=>'Id',
  78. 'd.ref'=>'Ref',
  79. 'd.lastname'=>'Lastname',
  80. 'd.firstname'=>'Firstname',
  81. );
  82. // Security check
  83. $result = restrictedArea($user, 'don');
  84. $permissiontoread = $user->hasRight('don', 'read');
  85. $permissiontoadd = $user->hasRight('don', 'write');
  86. $permissiontodelete = $user->hasRight('don', 'delete');
  87. /*
  88. * Actions
  89. */
  90. if (GETPOST('cancel', 'alpha')) {
  91. $action = 'list';
  92. $massaction = '';
  93. }
  94. if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') {
  95. $massaction = '';
  96. }
  97. /*
  98. * View
  99. */
  100. $form = new Form($db);
  101. $donationstatic = new Don($db);
  102. if (isModEnabled('project')) {
  103. $projectstatic = new Project($db);
  104. }
  105. $title = $langs->trans("Donations");
  106. $help_url = 'EN:Module_Donations|FR:Module_Dons|ES:M&oacute;dulo_Donaciones|DE:Modul_Spenden';
  107. // Build and execute select
  108. // --------------------------------------------------------------------
  109. $sql = "SELECT d.rowid, d.datedon, d.fk_soc as socid, d.firstname, d.lastname, d.societe,";
  110. $sql .= " d.amount, d.fk_statut as status,";
  111. $sql .= " p.rowid as pid, p.ref, p.title, p.public";
  112. $sqlfields = $sql; // $sql fields to remove for count total
  113. $sql .= " FROM ".MAIN_DB_PREFIX."don as d LEFT JOIN ".MAIN_DB_PREFIX."projet AS p";
  114. $sql .= " ON p.rowid = d.fk_projet";
  115. $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "societe AS s ON s.rowid = d.fk_soc";
  116. $sql .= " WHERE d.entity IN (". getEntity('donation') . ")";
  117. if ($search_status != '' && $search_status != '-4') {
  118. $sql .= " AND d.fk_statut IN (".$db->sanitize($search_status).")";
  119. }
  120. if (trim($search_ref) != '') {
  121. $sql .= natural_search(array('d.ref', "d.rowid"), $search_ref);
  122. }
  123. if (trim($search_all) != '') {
  124. $sql .= natural_search(array_keys($fieldstosearchall), $search_all);
  125. }
  126. if (trim($search_company) != '') {
  127. $sql .= natural_search('d.societe', $search_company);
  128. }
  129. if (trim($search_thirdparty) != '') {
  130. $sql .= natural_search("s.nom", $search_thirdparty);
  131. }
  132. if (trim($search_name) != '') {
  133. $sql .= natural_search(array('d.lastname', 'd.firstname'), $search_name);
  134. }
  135. if ($search_amount) {
  136. $sql .= natural_search('d.amount', $search_amount, 1);
  137. }
  138. // Count total nb of records
  139. $nbtotalofrecords = '';
  140. if (!getDolGlobalInt('MAIN_DISABLE_FULL_SCANLIST')) {
  141. /* The fast and low memory method to get and count full list converts the sql into a sql count */
  142. $sqlforcount = preg_replace('/^'.preg_quote($sqlfields, '/').'/', 'SELECT COUNT(*) as nbtotalofrecords', $sql);
  143. $sqlforcount = preg_replace('/GROUP BY .*$/', '', $sqlforcount);
  144. $resql = $db->query($sqlforcount);
  145. if ($resql) {
  146. $objforcount = $db->fetch_object($resql);
  147. $nbtotalofrecords = $objforcount->nbtotalofrecords;
  148. } else {
  149. dol_print_error($db);
  150. }
  151. if (($page * $limit) > $nbtotalofrecords) { // if total resultset is smaller than the paging size (filtering), goto and load page 0
  152. $page = 0;
  153. $offset = 0;
  154. }
  155. $db->free($resql);
  156. }
  157. // Complete request and execute it with limit
  158. $sql .= $db->order($sortfield, $sortorder);
  159. if ($limit) {
  160. $sql .= $db->plimit($limit + 1, $offset);
  161. }
  162. $resql = $db->query($sql);
  163. if (!$resql) {
  164. dol_print_error($db);
  165. exit;
  166. }
  167. $num = $db->num_rows($resql);
  168. // Direct jump if only one record found
  169. if ($num == 1 && !getDolGlobalInt('MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE') && $search_all && !$page) {
  170. $obj = $db->fetch_object($resql);
  171. $id = $obj->rowid;
  172. header("Location: ".dol_buildpath('/mymodule/myobject_card.php', 1).'?id='.$id);
  173. exit;
  174. }
  175. // Output page
  176. // --------------------------------------------------------------------
  177. llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'bodyforlist'); // Can use also classforhorizontalscrolloftabs instead of bodyforlist for no horizontal scroll
  178. // Example : Adding jquery code
  179. // print '<script type="text/javascript">
  180. // jQuery(document).ready(function() {
  181. // function init_myfunc()
  182. // {
  183. // jQuery("#myid").removeAttr(\'disabled\');
  184. // jQuery("#myid").attr(\'disabled\',\'disabled\');
  185. // }
  186. // init_myfunc();
  187. // jQuery("#mybutton").click(function() {
  188. // init_myfunc();
  189. // });
  190. // });
  191. // </script>';
  192. $arrayofselected = is_array($toselect) ? $toselect : array();
  193. $param = '';
  194. if (!empty($mode)) {
  195. $param .= '&mode='.urlencode($mode);
  196. }
  197. if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) {
  198. $param .= '&contextpage='.urlencode($contextpage);
  199. }
  200. if ($limit > 0 && $limit != $conf->liste_limit) {
  201. $param .= '&limit='.((int) $limit);
  202. }
  203. if ($optioncss != '') {
  204. $param .= '&optioncss='.urlencode($optioncss);
  205. }
  206. if ($search_status && $search_status != -1) {
  207. $param .= '&search_status='.urlencode($search_status);
  208. }
  209. if ($search_ref) {
  210. $param .= '&search_ref='.urlencode($search_ref);
  211. }
  212. if ($search_company) {
  213. $param .= '&search_company='.urlencode($search_company);
  214. }
  215. if ($search_name) {
  216. $param .= '&search_name='.urlencode($search_name);
  217. }
  218. if ($search_amount) {
  219. $param .= '&search_amount='.urlencode($search_amount);
  220. }
  221. // List of mass actions available
  222. $arrayofmassactions = array(
  223. //'validate'=>img_picto('', 'check', 'class="pictofixedwidth"').$langs->trans("Validate"),
  224. //'generate_doc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("ReGeneratePDF"),
  225. //'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"),
  226. //'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"),
  227. );
  228. if (!empty($permissiontodelete)) {
  229. $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete");
  230. }
  231. if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete'))) {
  232. $arrayofmassactions = array();
  233. }
  234. $massactionbutton = $form->selectMassAction('', $arrayofmassactions);
  235. print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">'."\n";
  236. if ($optioncss != '') {
  237. print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
  238. }
  239. print '<input type="hidden" name="token" value="'.newToken().'">';
  240. print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
  241. print '<input type="hidden" name="action" value="list">';
  242. print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
  243. print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
  244. print '<input type="hidden" name="page" value="'.$page.'">';
  245. print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
  246. print '<input type="hidden" name="page_y" value="">';
  247. print '<input type="hidden" name="mode" value="'.$mode.'">';
  248. print '<input type="hidden" name="type" value="'.$type.'">';
  249. $newcardbutton = '';
  250. $newcardbutton .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-bars imgforviewmode', $_SERVER["PHP_SELF"].'?mode=common'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ((empty($mode) || $mode == 'common') ? 2 : 1), array('morecss'=>'reposition'));
  251. $newcardbutton .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-list imgforviewmode', $_SERVER["PHP_SELF"].'?mode=kanban'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ($mode == 'kanban' ? 2 : 1), array('morecss'=>'reposition'));
  252. if ($user->hasRight('don', 'creer')) {
  253. $newcardbutton .= dolGetButtonTitleSeparator();
  254. $newcardbutton .= dolGetButtonTitle($langs->trans('NewDonation'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/don/card.php?action=create');
  255. }
  256. print_barre_liste($langs->trans("Donations"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'object_donation', 0, $newcardbutton, '', $limit, 0, 0, 1);
  257. if ($search_all) {
  258. $setupstring = '';
  259. foreach ($fieldstosearchall as $key => $val) {
  260. $fieldstosearchall[$key] = $langs->trans($val);
  261. $setupstring .= $key."=".$val.";";
  262. }
  263. print '<!-- Search done like if DONATION_QUICKSEARCH_ON_FIELDS = '.$setupstring.' -->'."\n";
  264. print '<div class="divsearchfieldfilter">'.$langs->trans("FilterOnInto", $search_all).join(', ', $fieldstosearchall).'</div>';
  265. }
  266. $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
  267. $selectedfields = ($mode != 'kanban' ? $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN', '')) : ''); // This also change content of $arrayfields
  268. $selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : '');
  269. print '<div class="div-table-responsive">';
  270. print '<table class="tagtable nobottomiftotal liste'.(!empty($moreforfilter) ? " listwithfilterbefore" : "").'">'."\n";
  271. // Fields title search
  272. // --------------------------------------------------------------------
  273. print '<tr class="liste_titre_filter">';
  274. // Action column
  275. if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
  276. print '<td class="liste_titre center maxwidthsearch">';
  277. $searchpicto = $form->showFilterButtons('left');
  278. print $searchpicto;
  279. print '</td>';
  280. }
  281. print '<td class="liste_titre">';
  282. print '<input class="flat" size="10" type="text" name="search_ref" value="'.$search_ref.'">';
  283. print '</td>';
  284. if (getDolGlobalString('DONATION_USE_THIRDPARTIES')) {
  285. print '<td class="liste_titre">';
  286. print '<input class="flat" size="10" type="text" name="search_thirdparty" value="'.$search_thirdparty.'">';
  287. print '</td>';
  288. } else {
  289. print '<td class="liste_titre">';
  290. print '<input class="flat" size="10" type="text" name="search_company" value="'.$search_company.'">';
  291. print '</td>';
  292. }
  293. print '<td class="liste_titre">';
  294. print '<input class="flat" size="10" type="text" name="search_name" value="'.$search_name.'">';
  295. print '</td>';
  296. print '<td class="liste_titre left">';
  297. print '&nbsp;';
  298. print '</td>';
  299. if (isModEnabled('project')) {
  300. print '<td class="liste_titre right">';
  301. print '&nbsp;';
  302. print '</td>';
  303. }
  304. print '<td class="liste_titre right"><input name="search_amount" class="flat" type="text" size="8" value="'.$search_amount.'"></td>';
  305. print '<td class="liste_titre center parentonrightofpage">';
  306. $liststatus = array(
  307. Don::STATUS_DRAFT=>$langs->trans("DonationStatusPromiseNotValidated"),
  308. Don::STATUS_VALIDATED=>$langs->trans("DonationStatusPromiseValidated"),
  309. Don::STATUS_PAID=>$langs->trans("DonationStatusPaid"),
  310. Don::STATUS_CANCELED=>$langs->trans("Canceled")
  311. );
  312. print $form->selectarray('search_status', $liststatus, $search_status, -4, 0, 0, '', 0, 0, 0, '', 'search_status maxwidth100 onrightofpage');
  313. print '</td>';
  314. if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
  315. print '<td class="liste_titre center maxwidthsearch">';
  316. $searchpicto = $form->showFilterButtons();
  317. print $searchpicto;
  318. print '</td>';
  319. }
  320. print '</tr>'."\n";
  321. $totalarray = array();
  322. $totalarray['nbfield'] = 0;
  323. // Fields title label
  324. // --------------------------------------------------------------------
  325. print '<tr class="liste_titre">';
  326. // Action column
  327. if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
  328. print_liste_field_titre('');
  329. $totalarray['nbfield']++;
  330. }
  331. print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "d.rowid", "", $param, "", $sortfield, $sortorder);
  332. $totalarray['nbfield']++;
  333. if (getDolGlobalString('DONATION_USE_THIRDPARTIES')) {
  334. print_liste_field_titre("ThirdParty", $_SERVER["PHP_SELF"], "d.fk_soc", "", $param, "", $sortfield, $sortorder);
  335. $totalarray['nbfield']++;
  336. } else {
  337. print_liste_field_titre("Company", $_SERVER["PHP_SELF"], "d.societe", "", $param, "", $sortfield, $sortorder);
  338. $totalarray['nbfield']++;
  339. }
  340. print_liste_field_titre("Name", $_SERVER["PHP_SELF"], "d.lastname", "", $param, "", $sortfield, $sortorder);
  341. $totalarray['nbfield']++;
  342. print_liste_field_titre("Date", $_SERVER["PHP_SELF"], "d.datedon", "", $param, '', $sortfield, $sortorder, 'center ');
  343. $totalarray['nbfield']++;
  344. if (isModEnabled('project')) {
  345. $langs->load("projects");
  346. print_liste_field_titre("Project", $_SERVER["PHP_SELF"], "d.fk_projet", "", $param, "", $sortfield, $sortorder);
  347. $totalarray['nbfield']++;
  348. }
  349. print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "d.amount", "", $param, '', $sortfield, $sortorder, 'right ');
  350. $totalarray['nbfield']++;
  351. print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "d.fk_statut", "", $param, '', $sortfield, $sortorder, 'center ');
  352. $totalarray['nbfield']++;
  353. if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
  354. print_liste_field_titre('');
  355. $totalarray['nbfield']++;
  356. }
  357. print '</tr>'."\n";
  358. $i = 0;
  359. $savnbfield = $totalarray['nbfield'];
  360. $totalarray = array();
  361. $totalarray['nbfield'] = 0;
  362. $imaxinloop = ($limit ? min($num, $limit) : $num);
  363. while ($i < $imaxinloop) {
  364. $obj = $db->fetch_object($resql);
  365. $donationstatic->setVarsFromFetchObj($obj);
  366. $company = new Societe($db);
  367. $result = $company->fetch($obj->socid);
  368. if ($mode == 'kanban') {
  369. if ($i == 0) {
  370. print '<tr class="trkanban"><td colspan="'.$savnbfield.'">';
  371. print '<div class="box-flex-container kanban">';
  372. }
  373. // Output Kanban
  374. $donationstatic->amount = $obj->amount;
  375. $donationstatic->date = $obj->datedon;
  376. $donationstatic->labelStatus = $obj->status;
  377. $donationstatic->id = $obj->rowid;
  378. $donationstatic->ref = $obj->rowid;
  379. if (!empty($obj->socid) && $company->id > 0) {
  380. $donationstatic->societe = $company->getNomUrl(1);
  381. } else {
  382. $donationstatic->societe = $obj->societe;
  383. }
  384. $object = $donationstatic;
  385. $selected = -1;
  386. if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
  387. $selected = 0;
  388. if (in_array($object->id, $arrayofselected)) {
  389. $selected = 1;
  390. }
  391. }
  392. print $donationstatic->getKanbanView('', array('selected' => $selected));
  393. if ($i == ($imaxinloop - 1)) {
  394. print '</div>';
  395. print '</td></tr>';
  396. }
  397. } else {
  398. print '<tr class="oddeven">';
  399. if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
  400. print '<td></td>';
  401. }
  402. $donationstatic->id = $obj->rowid;
  403. $donationstatic->ref = $obj->rowid;
  404. $donationstatic->lastname = $obj->lastname;
  405. $donationstatic->firstname = $obj->firstname;
  406. print "<td>".$donationstatic->getNomUrl(1)."</td>";
  407. if (getDolGlobalString('DONATION_USE_THIRDPARTIES')) {
  408. if (!empty($obj->socid) && $company->id > 0) {
  409. print "<td>".$company->getNomUrl(1)."</td>";
  410. } else {
  411. print "<td>".$obj->societe."</td>";
  412. }
  413. } else {
  414. print "<td>".$obj->societe."</td>";
  415. }
  416. print "<td>".$donationstatic->getFullName($langs)."</td>";
  417. print '<td class="center">'.dol_print_date($db->jdate($obj->datedon), 'day').'</td>';
  418. if (isModEnabled('project')) {
  419. print "<td>";
  420. if ($obj->pid) {
  421. $projectstatic->id = $obj->pid;
  422. $projectstatic->ref = $obj->ref;
  423. $projectstatic->id = $obj->pid;
  424. $projectstatic->public = $obj->public;
  425. $projectstatic->title = $obj->title;
  426. print $projectstatic->getNomUrl(1);
  427. } else {
  428. print '&nbsp;';
  429. }
  430. print "</td>\n";
  431. }
  432. print '<td class="right"><span class="amount">'.price($obj->amount).'</span></td>';
  433. // Status
  434. print '<td class="center">'.$donationstatic->LibStatut($obj->status, 5).'</td>';
  435. if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
  436. print '<td></td>';
  437. }
  438. print "</tr>";
  439. }
  440. $i++;
  441. }
  442. print "</table>";
  443. print '</div>';
  444. print "</form>\n";
  445. $db->free($resql);
  446. llxFooter();
  447. $db->close();