dolibarr  17.0.2
card.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
3  * Copyright (C) 2005-2010 Laurent Destailleur <eldy@users.sourceforge.net>
4  * Copyright (C) 2010-2016 Juanjo Menent <jmenent@2byte.es>
5  * Copyright (C) 2018-2021 Frédéric France <frederic.france@netlogic.fr>
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 
27 // Load Dolibarr environment
28 require '../../main.inc.php';
29 require_once DOL_DOCUMENT_ROOT.'/core/lib/prelevement.lib.php';
30 require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/ligneprelevement.class.php';
31 require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/bonprelevement.class.php';
32 require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
33 
34 // Load translation files required by the page
35 $langs->loadLangs(array('banks', 'categories', 'bills', 'companies', 'withdrawals'));
36 
37 // Get supervariables
38 $action = GETPOST('action', 'aZ09');
39 $id = GETPOST('id', 'int');
40 $ref = GETPOST('ref', 'alpha');
41 $socid = GETPOST('socid', 'int');
42 $type = GETPOST('type', 'aZ09');
43 
44 // Load variable for pagination
45 $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit;
46 $sortfield = GETPOST('sortfield', 'aZ09comma');
47 $sortorder = GETPOST('sortorder', 'aZ09comma');
48 $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
49 if (empty($page) || $page == -1) {
50  $page = 0;
51 } // If $page is not defined, or '' or -1
52 $offset = $limit * $page;
53 $pageprev = $page - 1;
54 $pagenext = $page + 1;
55 
56 if (!$sortfield) {
57  $sortfield = 'pl.rowid';
58 }
59 if (!$sortorder) {
60  $sortorder = 'ASC';
61 }
62 
63 $object = new BonPrelevement($db);
64 
65 // Load object
66 include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once // Must be include, not include_once. Include fetch and fetch_thirdparty but not fetch_optionals
67 
68 $hookmanager->initHooks(array('directdebitprevcard', 'globalcard', 'directdebitprevlist'));
69 
70 $type = $object->type;
71 
72 if ($type == 'bank-transfer') {
73  $result = restrictedArea($user, 'paymentbybanktransfer', '', '', '');
74 } else {
75  $result = restrictedArea($user, 'prelevement', '', '', 'bons');
76 }
77 
78 
79 /*
80  * Actions
81  */
82 
83 $parameters = array('socid' => $socid);
84 $reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
85 if ($reshook < 0) {
86  setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
87 }
88 
89 if (empty($reshook)) {
90  if ($action == 'confirm_delete') {
91  $savtype = $object->type;
92  $res = $object->delete($user);
93  if ($res > 0) {
94  if ($savtype == 'bank-transfer') {
95  header("Location: ".DOL_URL_ROOT.'/compta/paymentbybanktransfer/index.php');
96  } else {
97  header("Location: ".DOL_URL_ROOT.'/compta/prelevement/index.php');
98  }
99  exit;
100  }
101  }
102 
103  if ($action == 'infotrans' && (($user->rights->prelevement->bons->send && $object->type != 'bank-transfer') || ($user->rights->paymentbybanktransfer->send && $object->type == 'bank-transfer'))) {
104  require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
105 
106  $dt = dol_mktime(12, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int'));
107 
108  /*
109  if ($_FILES['userfile']['name'] && basename($_FILES['userfile']['name'],".ps") == $object->ref)
110  {
111  $dir = $conf->prelevement->dir_output.'/receipts';
112 
113  if (dol_move_uploaded_file($_FILES['userfile']['tmp_name'], $dir . "/" . dol_unescapefile($_FILES['userfile']['name']),1) > 0)
114  {
115  $object->set_infotrans($user, $dt, GETPOST('methode','alpha'));
116  }
117 
118  header("Location: card.php?id=".$id);
119  exit;
120  }
121  else
122  {
123  dol_syslog("Fichier invalide",LOG_WARNING);
124  $mesg='BadFile';
125  }*/
126 
127  $error = $object->set_infotrans($user, $dt, GETPOST('methode', 'alpha'));
128 
129  if ($error) {
130  header("Location: card.php?id=".$id."&error=$error");
131  exit;
132  }
133  }
134 
135  // Set direct debit order to credited, create payment and close invoices
136  if ($action == 'infocredit' && (($user->rights->prelevement->bons->credit && $object->type != 'bank-transfer') || ($user->rights->paymentbybanktransfer->debit && $object->type == 'bank-transfer'))) {
137  $dt = dol_mktime(12, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int'));
138 
139  if (($object->type != 'bank-transfer' && $object->statut == BonPrelevement::STATUS_CREDITED) || ($object->type == 'bank-transfer' && $object->statut == BonPrelevement::STATUS_DEBITED)) {
140  $error = 1;
141  setEventMessages('WithdrawalCantBeCreditedTwice', array(), 'errors');
142  } else {
143  $error = $object->set_infocredit($user, $dt);
144  }
145 
146  if ($error) {
147  setEventMessages($object->error, $object->errors, 'errors');
148  }
149  }
150 }
151 
152 
153 
154 /*
155  * View
156  */
157 
158 $form = new Form($db);
159 
160 llxHeader('', $langs->trans("WithdrawalsReceipts"));
161 
162 if ($id > 0 || $ref) {
163  $head = prelevement_prepare_head($object);
164  print dol_get_fiche_head($head, 'prelevement', $langs->trans("WithdrawalsReceipts"), -1, 'payment');
165 
166  if (GETPOST('error', 'alpha') != '') {
167  print '<div class="error">'.$object->getErrorString(GETPOST('error', 'alpha')).'</div>';
168  }
169 
170  $linkback = '<a href="'.DOL_URL_ROOT.'/compta/prelevement/orders_list.php?restore_lastsearch_values=1'.($object->type != 'bank-transfer' ? '' : '&type=bank-transfer').'">'.$langs->trans("BackToList").'</a>';
171 
172  dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref');
173 
174  print '<div class="fichecenter">';
175  print '<div class="underbanner clearboth"></div>';
176  print '<table class="border centpercent tableforfield">';
177 
178  print '<tr><td class="titlefieldcreate">'.$langs->trans("Date").'</td><td>'.dol_print_date($object->datec, 'day').'</td></tr>';
179 
180  print '<tr><td>'.$langs->trans("Amount").'</td><td><span class="amount">'.price($object->amount).'</span></td></tr>';
181 
182  // Status
183  /*
184  print '<tr><td>'.$langs->trans('Status').'</td>';
185  print '<td>'.$object->getLibStatut(1).'</td>';
186  print '</tr>';
187  */
188 
189  if (!empty($object->date_trans)) {
190  $muser = new User($db);
191  $muser->fetch($object->user_trans);
192 
193  print '<tr><td>'.$langs->trans("TransData").'</td><td>';
194  print dol_print_date($object->date_trans, 'day');
195  print ' &nbsp; <span class="opacitymedium">'.$langs->trans("By").'</span> '.$muser->getNomUrl(-1).'</td></tr>';
196  print '<tr><td>'.$langs->trans("TransMetod").'</td><td>';
197  print $object->methodes_trans[$object->method_trans];
198  print '</td></tr>';
199  }
200  if (!empty($object->date_credit)) {
201  print '<tr><td>'.$langs->trans('CreditDate').'</td><td>';
202  print dol_print_date($object->date_credit, 'day');
203  print '</td></tr>';
204  }
205 
206  print '</table>';
207 
208  print '<br>';
209 
210  print '<div class="underbanner clearboth"></div>';
211  print '<table class="border centpercent tableforfield">';
212 
213  $acc = new Account($db);
214  $result = $acc->fetch(($object->type == 'bank-transfer' ? $conf->global->PAYMENTBYBANKTRANSFER_ID_BANKACCOUNT : $conf->global->PRELEVEMENT_ID_BANKACCOUNT));
215 
216  // Bank account
217  print '<tr><td class="titlefieldcreate">';
218  $labelofbankfield = "BankToReceiveWithdraw";
219  if ($object->type == 'bank-transfer') {
220  $labelofbankfield = 'BankToPayCreditTransfer';
221  }
222  print $langs->trans($labelofbankfield);
223  print '</td>';
224  print '<td>';
225  if ($acc->id > 0) {
226  print $acc->getNomUrl(1);
227  }
228  print '</td>';
229  print '</tr>';
230 
231  print '<tr><td class="titlefieldcreate">';
232  $labelfororderfield = 'WithdrawalFile';
233  if ($object->type == 'bank-transfer') {
234  $labelfororderfield = 'CreditTransferFile';
235  }
236  print $langs->trans($labelfororderfield).'</td><td>';
237  $relativepath = 'receipts/'.$object->ref.'.xml';
238  $modulepart = 'prelevement';
239  if ($object->type == 'bank-transfer') {
240  $modulepart = 'paymentbybanktransfer';
241  }
242  print '<a data-ajax="false" href="'.DOL_URL_ROOT.'/document.php?type=text/plain&amp;modulepart='.$modulepart.'&amp;file='.urlencode($relativepath).'">'.$relativepath;
243  print img_picto('', 'download', 'class="paddingleft"');
244  print '</a>';
245  print '</td></tr>';
246 
247  // Other attributes
248  $parameters = array();
249  $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
250  print $hookmanager->resPrint;
251 
252  print '</table>';
253 
254  print '</div>';
255 
256  print dol_get_fiche_end();
257 
258 
259  $formconfirm = '';
260 
261  // Confirmation to delete
262  if ($action == 'delete') {
263  $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('Delete'), $langs->trans('ConfirmDeleteObject'), 'confirm_delete', '', 0, 1);
264  }
265 
266  // Call Hook formConfirm
267  /*$parameters = array('formConfirm' => $formconfirm);
268  $reshook = $hookmanager->executeHooks('formConfirm', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
269  if (empty($reshook)) $formconfirm.=$hookmanager->resPrint;
270  elseif ($reshook > 0) $formconfirm=$hookmanager->resPrint;*/
271 
272  // Print form confirm
273  print $formconfirm;
274 
275 
276  if (empty($object->date_trans) && (($user->rights->prelevement->bons->send && $object->type != 'bank-transfer') || ($user->rights->paymentbybanktransfer->send && $object->type == 'bank-transfer')) && $action == 'settransmitted') {
277  print '<form method="post" name="userfile" action="card.php?id='.$object->id.'" enctype="multipart/form-data">';
278  print '<input type="hidden" name="token" value="'.newToken().'">';
279  print '<input type="hidden" name="action" value="infotrans">';
280  print '<table class="noborder centpercent">';
281  print '<tr class="liste_titre">';
282  print '<td colspan="3">'.$langs->trans("NotifyTransmision").'</td></tr>';
283  print '<tr class="oddeven"><td>'.$langs->trans("TransData").'</td><td>';
284  print $form->selectDate('', '', '', '', '', "userfile", 1, 1);
285  print '</td></tr>';
286  print '<tr class="oddeven"><td>'.$langs->trans("TransMetod").'</td><td>';
287  print $form->selectarray("methode", $object->methodes_trans);
288  print '</td></tr>';
289  print '</table>';
290  print '<div class="center"><input type="submit" class="button" value="'.dol_escape_htmltag($langs->trans("SetToStatusSent")).'"></div>';
291  print '</form>';
292  print '<br>';
293  }
294 
295  if (!empty($object->date_trans) && empty($object->date_credit) && (($user->rights->prelevement->bons->credit && $object->type != 'bank-transfer') || ($user->rights->paymentbybanktransfer->debit && $object->type == 'bank-transfer')) && $action == 'setcredited') {
296  $btnLabel = ($object->type == 'bank-transfer') ? $langs->trans("ClassDebited") : $langs->trans("ClassCredited");
297  print '<form name="infocredit" method="post" action="card.php?id='.$object->id.'">';
298  print '<input type="hidden" name="token" value="'.newToken().'">';
299  print '<input type="hidden" name="action" value="infocredit">';
300  print '<table class="noborder centpercent">';
301  print '<tr class="liste_titre">';
302  print '<td colspan="3">'.$langs->trans("NotifyCredit").'</td></tr>';
303  print '<tr class="oddeven"><td>'.$langs->trans('CreditDate').'</td><td>';
304  print $form->selectDate(-1, '', '', '', '', "infocredit", 1, 1);
305  print '</td></tr>';
306  print '</table>';
307  print '<br><div class="center"><span class="opacitymedium">'.$langs->trans("ThisWillAlsoAddPaymentOnInvoice").'</span></div>';
308  print '<div class="center"><input type="submit" class="button" value="'.dol_escape_htmltag($btnLabel).'"></div>';
309  print '</form>';
310  print '<br>';
311  }
312 
313  // Actions
314  if ($action != 'settransmitted' && $action != 'setcredited') {
315  print "\n".'<div class="tabsAction">'."\n";
316  $parameters = array();
317  $reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
318  if (empty($reshook)) {
319  if (empty($object->date_trans)) {
320  if ($object->type == 'bank-transfer') print dolGetButtonAction($langs->trans("SetToStatusSent"), '', 'default', 'card.php?action=settransmitted&token='.newToken().'&id='.$object->id, '', $user->rights->paymentbybanktransfer->send);
321  else print dolGetButtonAction($langs->trans("SetToStatusSent"), '', 'default', 'card.php?action=settransmitted&token='.newToken().'&id='.$object->id, '', $user->rights->prelevement->bons->send);
322  }
323  if (!empty($object->date_trans) && empty($object->date_credit)) {
324  if ($object->type == 'bank-transfer') print dolGetButtonAction($langs->trans("ClassDebited"), '', 'default', 'card.php?action=setcredited&token='.newToken().'&id='.$object->id, '', $user->rights->paymentbybanktransfer->debit);
325  else print dolGetButtonAction($langs->trans("ClassCredited"), '', 'default', 'card.php?action=setcredited&token='.newToken().'&id='.$object->id, '', $user->rights->prelevement->bons->credit);
326  }
327 
328  if ($object->type == 'bank-transfer') print dolGetButtonAction($langs->trans("Delete"), '', 'delete', 'card.php?action=delete&token='.newToken().'&id='.$object->id, '', $user->rights->paymentbybanktransfer->create);
329  else print dolGetButtonAction($langs->trans("Delete"), '', 'delete', 'card.php?action=delete&token='.newToken().'&id='.$object->id, '', $user->rights->prelevement->bons->creer);
330  }
331  print '</div>';
332  }
333 
334 
335  $ligne = new LignePrelevement($db);
336 
337  /*
338  * Lines into withdraw request
339  */
340  $sql = "SELECT pl.rowid, pl.statut, pl.amount,";
341  $sql .= " s.rowid as socid, s.nom as name";
342  $sql .= " FROM ".MAIN_DB_PREFIX."prelevement_lignes as pl";
343  $sql .= ", ".MAIN_DB_PREFIX."prelevement_bons as pb";
344  $sql .= ", ".MAIN_DB_PREFIX."societe as s";
345  $sql .= " WHERE pl.fk_prelevement_bons = ".((int) $id);
346  $sql .= " AND pl.fk_prelevement_bons = pb.rowid";
347  $sql .= " AND pb.entity = ".((int) $conf->entity); // No sharing of entity here
348  $sql .= " AND pl.fk_soc = s.rowid";
349  if ($socid) {
350  $sql .= " AND s.rowid = ".((int) $socid);
351  }
352  $sql .= $db->order($sortfield, $sortorder);
353 
354  // Count total nb of records
355  $nbtotalofrecords = '';
356  if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) {
357  $result = $db->query($sql);
358  $nbtotalofrecords = $db->num_rows($result);
359  if (($page * $limit) > $nbtotalofrecords) {
360  // if total resultset is smaller then paging size (filtering), goto and load page 0
361  $page = 0;
362  $offset = 0;
363  }
364  }
365 
366  $sql .= $db->plimit($limit + 1, $offset);
367 
368  $result = $db->query($sql);
369 
370  if ($result) {
371  $num = $db->num_rows($result);
372  $i = 0;
373 
374  $urladd = "&id=".urlencode($id);
375  if ($limit > 0 && $limit != $conf->liste_limit) {
376  $urladd .= '&limit='.urlencode($limit);
377  }
378 
379  print '<form method="POST" action="'.$_SERVER ['PHP_SELF'].'" name="search_form">'."\n";
380  print '<input type="hidden" name="token" value="'.newToken().'"/>';
381  print '<input type="hidden" name="id" value="'.$id.'"/>';
382  print '<input type="hidden" name="socid" value="'.$socid.'"/>';
383  if (!empty($page)) {
384  print '<input type="hidden" name="page" value="'.$page.'"/>';
385  }
386  if (!empty($limit)) {
387  print '<input type="hidden" name="limit" value="'.$limit.'"/>';
388  }
389  if (!empty($sortfield)) {
390  print '<input type="hidden" name="sortfield" value="'.$sortfield.'"/>';
391  }
392  if (!empty($sortorder)) {
393  print '<input type="hidden" name="sortorder" value="'.$sortorder.'"/>';
394  }
395  print_barre_liste($langs->trans("Lines"), $page, $_SERVER["PHP_SELF"], $urladd, $sortfield, $sortorder, '', $num, $nbtotalofrecords, '', 0, '', '', $limit);
396 
397  print '<div class="div-table-responsive-no-min">'; // You can use div-table-responsive-no-min if you dont need reserved height for your table
398  print '<table class="noborder liste" width="100%" cellpadding="4">';
399  print '<tr class="liste_titre">';
400  print_liste_field_titre("Lines", $_SERVER["PHP_SELF"], "pl.rowid", '', $urladd, '', $sortfield, $sortorder);
401  print_liste_field_titre("ThirdParty", $_SERVER["PHP_SELF"], "s.nom", '', $urladd, '', $sortfield, $sortorder);
402  print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "pl.amount", "", $urladd, 'class="right"', $sortfield, $sortorder);
404  print "</tr>\n";
405 
406  $total = 0;
407 
408  while ($i < min($num, $limit)) {
409  $obj = $db->fetch_object($result);
410 
411  print '<tr class="oddeven">';
412 
413  // Status of line
414  print "<td>";
415  print '<a class="valignmiddle" href="'.DOL_URL_ROOT.'/compta/prelevement/line.php?id='.$obj->rowid.'&type='.$object->type.'&token='.newToken().'">';
416  print $ligne->LibStatut($obj->statut, 2);
417  print '<span class="paddingleft">'.$obj->rowid.'</span>';
418  print '</a></td>';
419 
420  $thirdparty = new Societe($db);
421  $thirdparty->fetch($obj->socid);
422  print '<td>';
423  print $thirdparty->getNomUrl(1);
424  print "</td>\n";
425 
426  print '<td class="right"><span class="amount">'.price($obj->amount)."</span></td>\n";
427 
428  print '<td class="right">';
429 
430  if ($obj->statut == 3) {
431  print '<b>'.$langs->trans("StatusRefused").'</b>';
432  } else {
433  if ($object->statut == BonPrelevement::STATUS_CREDITED) {
434  if ($obj->statut == 2) {
435  if ($user->rights->prelevement->bons->credit) {
436  //print '<a class="butActionDelete" href="line.php?action=rejet&id='.$obj->rowid.'">'.$langs->trans("StandingOrderReject").'</a>';
437  print '<a href="line.php?action=rejet&type='.$object->type.'&id='.$obj->rowid.'&token='.newToken().'">'.$langs->trans("StandingOrderReject").'</a>';
438  } else {
439  //print '<a class="butActionRefused classfortooltip" href="#" title="'.$langs->trans("NotAllowed").'">'.$langs->trans("StandingOrderReject").'</a>';
440  }
441  }
442  } else {
443  //print '<a class="butActionRefused classfortooltip" href="#" title="'.$langs->trans("NotPossibleForThisStatusOfWithdrawReceiptORLine").'">'.$langs->trans("StandingOrderReject").'</a>';
444  }
445  }
446 
447  print '</td></tr>';
448 
449  $total += $obj->amount;
450 
451  $i++;
452  }
453 
454  if ($num > 0) {
455  $total = price2num($total, 'MT');
456 
457  print '<tr class="liste_total">';
458  print '<td>'.$langs->trans("Total").'</td>';
459  print '<td>&nbsp;</td>';
460  print '<td class="right">';
461  if (empty($offset) && $num <= $limit) {
462  // If we have all record on same page, then the following test/warning can be done
463  if ($total != $object->amount) {
464  print img_warning($langs->trans("TotalAmountOfdirectDebitOrderDiffersFromSumOfLines"));
465  }
466  }
467  print price($total);
468  print "</td>\n";
469  print '<td>&nbsp;</td>';
470  print "</tr>\n";
471  }
472 
473  print "</table>";
474  print '</div>';
475  print '</form>';
476 
477  $db->free($result);
478  } else {
479  dol_print_error($db);
480  }
481 }
482 
483 // End of page
484 llxFooter();
485 $db->close();
Societe
Class to manage third parties objects (customers, suppliers, prospects...)
Definition: societe.class.php:49
llxFooter
llxFooter()
Empty footer.
Definition: wrapper.php:70
LignePrelevement
Class to manage withdrawals.
Definition: ligneprelevement.class.php:32
GETPOST
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
Definition: functions.lib.php:520
dol_print_error
dol_print_error($db='', $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
Definition: functions.lib.php:4993
img_warning
img_warning($titlealt='default', $moreatt='', $morecss='pictowarning')
Show warning logo.
Definition: functions.lib.php:4670
$form
if($cancel &&! $id) if($action=='add' &&! $cancel) if($action=='delete') if($id) $form
Actions.
Definition: card.php:143
dol_banner_tab
dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='rowid', $fieldref='ref', $morehtmlref='', $moreparam='', $nodbprefix=0, $morehtmlleft='', $morehtmlstatus='', $onlybanner=0, $morehtmlright='')
Show tab footer of a card.
Definition: functions.lib.php:2082
price2num
price2num($amount, $rounding='', $option=0)
Function that return a number with universal decimal format (decimal separator is '.
Definition: functions.lib.php:5823
dol_print_date
dol_print_date($time, $format='', $tzoutput='auto', $outputlangs='', $encodetooutput=false)
Output date in a string format according to outputlangs (or langs if not defined).
Definition: functions.lib.php:2550
img_picto
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=false, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
Definition: functions.lib.php:4024
llxHeader
if(!defined('NOREQUIRESOC')) if(!defined('NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined('NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined('NOREQUIREAJAX')) llxHeader()
Empty header.
Definition: wrapper.php:56
BonPrelevement
Class to manage withdrawal receipts.
Definition: bonprelevement.class.php:43
$formconfirm
$formconfirm
if ($action == 'delbookkeepingyear') {
Definition: listbyaccount.php:614
print_barre_liste
print_barre_liste($titre, $page, $file, $options='', $sortfield='', $sortorder='', $morehtmlcenter='', $num=-1, $totalnboflines='', $picto='generic', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limit=-1, $hideselectlimit=0, $hidenavigation=0, $pagenavastextinput=0, $morehtmlrightbeforearrow='')
Print a title with navigation controls for pagination.
Definition: functions.lib.php:5413
dol_get_fiche_head
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='')
Show tabs of a record.
Definition: functions.lib.php:1858
restrictedArea
restrictedArea(User $user, $features, $object=0, $tableandshare='', $feature2='', $dbt_keyfield='fk_soc', $dbt_select='rowid', $isdraft=0, $mode=0)
Check permissions of a user to show a page and an object.
Definition: security.lib.php:346
newToken
newToken()
Return the value of token currently saved into session with name 'newtoken'.
Definition: functions.lib.php:11269
dol_get_fiche_end
dol_get_fiche_end($notab=0)
Return tab footer of a card.
Definition: functions.lib.php:2054
User
Class to manage Dolibarr users.
Definition: user.class.php:46
GETPOSTISSET
GETPOSTISSET($paramname)
Return true if we are in a context of submitting the parameter $paramname from a POST of a form.
Definition: functions.lib.php:421
print_liste_field_titre
print_liste_field_titre($name, $file="", $field="", $begin="", $moreparam="", $moreattrib="", $sortfield="", $sortorder="", $prefix="", $tooltip="", $forcenowrapcolumntitle=0)
Show title line of an array.
Definition: functions.lib.php:5178
dolGetButtonAction
dolGetButtonAction($label, $text='', $actionType='default', $url='', $id='', $userRight=1, $params=array())
Function dolGetButtonAction.
Definition: functions.lib.php:10832
Form
Class to manage generation of HTML components Only common components must be here.
Definition: html.form.class.php:53
$parameters
$parameters
Actions.
Definition: card.php:79
price
price($amount, $form=0, $outlangs='', $trunc=1, $rounding=-1, $forcerounding=-1, $currency_code='')
Function to format a value into an amount for visual output Function used into PDF and HTML pages.
Definition: functions.lib.php:5697
prelevement_prepare_head
prelevement_prepare_head(BonPrelevement $object)
Prepare array with list of tabs.
Definition: prelevement.lib.php:34
setEventMessages
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='')
Set event messages in dol_events session object.
Definition: functions.lib.php:8460
dol_mktime
dol_mktime($hour, $minute, $second, $month, $day, $year, $gm='auto', $check=1)
Return a timestamp date built from detailed informations (by default a local PHP server timestamp) Re...
Definition: functions.lib.php:2863
$nbtotalofrecords
$nbtotalofrecords
Count total nb of records.
Definition: list.php:329
Account
Class to manage bank accounts.
Definition: account.class.php:39