26 require
'../../main.inc.php';
27 require_once DOL_DOCUMENT_ROOT.
'/core/lib/admin.lib.php';
28 require_once DOL_DOCUMENT_ROOT.
'/core/lib/accounting.lib.php';
29 require_once DOL_DOCUMENT_ROOT.
'/accountancy/class/accountingaccount.class.php';
30 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formaccounting.class.php';
33 $langs->loadLangs(array(
"compta",
"bills",
"admin",
"accountancy",
"salaries"));
36 $action =
GETPOST(
'action',
'aZ09');
37 $cancel =
GETPOST(
'cancel',
'alpha');
39 $rowid =
GETPOST(
'rowid',
'int');
40 $massaction =
GETPOST(
'massaction',
'aZ09');
41 $contextpage =
GETPOST(
'contextpage',
'aZ') ?
GETPOST(
'contextpage',
'aZ') :
'accountingaccountlist';
43 $search_account =
GETPOST(
'search_account',
'alpha');
44 $search_label =
GETPOST(
'search_label',
'alpha');
45 $search_labelshort =
GETPOST(
'search_labelshort',
'alpha');
46 $search_accountparent =
GETPOST(
'search_accountparent',
'alpha');
47 $search_pcgtype =
GETPOST(
'search_pcgtype',
'alpha');
49 $chartofaccounts =
GETPOST(
'chartofaccounts',
'int');
56 $limit =
GETPOST(
'limit',
'int') ?
GETPOST(
'limit',
'int') : $conf->liste_limit;
57 $sortfield =
GETPOST(
'sortfield',
'aZ09comma');
58 $sortorder =
GETPOST(
'sortorder',
'aZ09comma');
60 if (empty($page) || $page == -1) { $page = 0; }
61 $offset = $limit * $page;
62 $pageprev = $page - 1;
63 $pagenext = $page + 1;
64 if (!$sortfield) $sortfield =
"aa.account_number";
65 if (!$sortorder) $sortorder =
"ASC";
68 'aa.account_number'=>array(
'label'=>$langs->trans(
"AccountNumber"),
'checked'=>1),
69 'aa.label'=>array(
'label'=>$langs->trans(
"Label"),
'checked'=>1),
70 'aa.labelshort'=>array(
'label'=>$langs->trans(
"LabelToShow"),
'checked'=>1),
71 'aa.account_parent'=>array(
'label'=>$langs->trans(
"Accountparent"),
'checked'=>1),
72 'aa.pcg_type'=>array(
'label'=>$langs->trans(
"Pcgtype"),
'checked'=>1,
'help'=>
'PcgtypeDesc'),
73 'aa.reconcilable'=>array(
'label'=>$langs->trans(
"Reconcilable"),
'checked'=>1),
74 'aa.active'=>array(
'label'=>$langs->trans(
"Activated"),
'checked'=>1)
77 if ($conf->global->MAIN_FEATURES_LEVEL < 2) unset($arrayfields[
'aa.reconcilable']);
87 if (
GETPOST(
'cancel',
'alpha')) { $action =
'list'; $massaction =
''; }
88 if (!
GETPOST(
'confirmmassaction',
'alpha')) { $massaction =
''; }
90 $parameters = array();
91 $reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
92 if ($reshook < 0)
setEventMessages($hookmanager->error, $hookmanager->errors,
'errors');
96 if (!empty($cancel)) $action =
'';
98 include DOL_DOCUMENT_ROOT.
'/core/actions_changeselectedfields.inc.php';
100 if (
GETPOST(
'button_removefilter_x',
'alpha') ||
GETPOST(
'button_removefilter.x',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha'))
102 $search_account =
"";
104 $search_labelshort =
"";
105 $search_accountparent =
"";
106 $search_pcgtype =
"";
107 $search_array_options = array();
109 if ((
GETPOST(
'valid_change_chart',
'alpha') &&
GETPOST(
'chartofaccounts',
'int') > 0)
110 || (
GETPOST(
'chartofaccounts',
'int') > 0 &&
GETPOST(
'chartofaccounts',
'int') != $conf->global->CHARTOFACCOUNTS))
112 if ($chartofaccounts > 0)
115 $sql =
'SELECT code FROM '.MAIN_DB_PREFIX.
'c_country as c, '.MAIN_DB_PREFIX.
'accounting_system as a';
116 $sql .=
' WHERE c.rowid = a.fk_country AND a.rowid = '.(int) $chartofaccounts;
117 $resql = $db->query($sql);
120 $obj = $db->fetch_object(
$resql);
121 $country_code = $obj->code;
127 $sqlfile = DOL_DOCUMENT_ROOT.
'/install/mysql/data/llx_accounting_account_'.strtolower($country_code).
'.sql';
129 $offsetforchartofaccount = 0;
133 $tmp = file_get_contents($sqlfile);
135 if (preg_match(
'/-- ADD (\d+) to rowid/ims', $tmp, $reg))
137 $offsetforchartofaccount += $reg[1];
139 $offsetforchartofaccount += ($conf->entity * 100000000);
141 $result =
run_sql($sqlfile, 1, $conf->entity, 1,
'',
'default', 32768, 0, $offsetforchartofaccount);
151 if (!
dolibarr_set_const($db,
'CHARTOFACCOUNTS', $chartofaccounts,
'chaine', 0,
'', $conf->entity)) {
159 if ($action ==
'disable') {
160 if ($accounting->fetch($id)) {
161 $mode =
GETPOST(
'mode',
'int');
162 $result = $accounting->accountDeactivate($id, $mode);
169 } elseif ($action ==
'enable') {
170 if ($accounting->fetch($id)) {
171 $mode =
GETPOST(
'mode',
'int');
172 $result = $accounting->account_activate($id, $mode);
186 $form =
new Form($db);
189 llxHeader(
'', $langs->trans(
"ListAccounts"));
191 if ($action ==
'delete') {
192 $formconfirm = $html->formconfirm(
$_SERVER[
"PHP_SELF"].
'?id='.$id, $langs->trans(
'DeleteAccount'), $langs->trans(
'ConfirmDeleteAccount'),
'confirm_delete',
'', 0, 1);
196 $pcgver = $conf->global->CHARTOFACCOUNTS;
198 $sql =
"SELECT aa.rowid, aa.fk_pcg_version, aa.pcg_type, aa.account_number, aa.account_parent , aa.label, aa.labelshort, aa.reconcilable, aa.active, ";
199 $sql .=
" a2.rowid as rowid2, a2.label as label2, a2.account_number as account_number2";
200 $sql .=
" FROM ".MAIN_DB_PREFIX.
"accounting_account as aa";
201 $sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.
"accounting_system as asy ON aa.fk_pcg_version = asy.pcg_version AND aa.entity = ".$conf->entity;
202 if ($db->type ==
'pgsql') $sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.
"accounting_account as a2 ON a2.rowid = aa.account_parent AND a2.entity = ".$conf->entity;
203 else $sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.
"accounting_account as a2 ON a2.rowid = aa.account_parent AND a2.entity = ".$conf->entity;
204 $sql .=
" WHERE asy.rowid = ".$pcgver;
206 if (strlen(trim($search_account))) {
207 $lengthpaddingaccount = 0;
208 if ($conf->global->ACCOUNTING_LENGTH_GACCOUNT || $conf->global->ACCOUNTING_LENGTH_AACCOUNT) {
209 $lengthpaddingaccount = max($conf->global->ACCOUNTING_LENGTH_GACCOUNT, $conf->global->ACCOUNTING_LENGTH_AACCOUNT);
211 $search_account_tmp = $search_account;
212 $weremovedsomezero = 0;
213 if (strlen($search_account_tmp) <= $lengthpaddingaccount) {
214 for ($i = 0; $i < $lengthpaddingaccount; $i++) {
215 if (preg_match(
'/0$/', $search_account_tmp)) {
216 $weremovedsomezero++;
217 $search_account_tmp = preg_replace(
'/0$/',
'', $search_account_tmp);
223 if ($search_account_tmp) {
224 if ($weremovedsomezero) {
225 $search_account_tmp_clean = $search_account_tmp;
226 $search_account_clean = $search_account;
228 if (strpos($search_account_tmp,
'^') === 0)
231 $search_account_tmp_clean = preg_replace(
'/^\^/',
'', $search_account_tmp);
232 $search_account_clean = preg_replace(
'/^\^/',
'', $search_account);
234 $sql .=
" AND (aa.account_number LIKE '".$db->escape($startchar.$search_account_tmp_clean).
"'";
235 $sql .=
" OR aa.account_number LIKE '".$db->escape($startchar.$search_account_clean).
"%')";
236 }
else $sql .=
natural_search(
"aa.account_number", $search_account_tmp);
239 if (strlen(trim($search_label))) $sql .=
natural_search(
"aa.label", $search_label);
240 if (strlen(trim($search_labelshort))) $sql .=
natural_search(
"aa.labelshort", $search_labelshort);
241 if (strlen(trim($search_accountparent)) && $search_accountparent !=
'-1') $sql .=
natural_search(
"aa.account_parent", $search_accountparent, 2);
242 if (strlen(trim($search_pcgtype))) $sql .=
natural_search(
"aa.pcg_type", $search_pcgtype);
243 $sql .= $db->order($sortfield, $sortorder);
246 $nbtotalofrecords =
'';
247 if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
249 $resql = $db->query($sql);
250 $nbtotalofrecords = $db->num_rows(
$resql);
251 if (($page * $limit) > $nbtotalofrecords)
258 $sql .= $db->plimit($limit + 1, $offset);
260 dol_syslog(
'accountancy/admin/account.php:: $sql='.$sql);
261 $resql = $db->query($sql);
265 $num = $db->num_rows(
$resql);
268 if (!empty($contextpage) && $contextpage !=
$_SERVER[
"PHP_SELF"]) $param .=
'&contextpage='.urlencode($contextpage);
269 if ($limit > 0 && $limit != $conf->liste_limit) $param .=
'&limit='.urlencode($limit);
270 if ($search_account) $param .=
'&search_account='.urlencode($search_account);
271 if ($search_label) $param .=
'&search_label='.urlencode($search_label);
272 if ($search_labelshort) $param .=
'&search_labelshort='.urlencode($search_labelshort);
273 if ($search_accountparent > 0 || $search_accountparent ==
'0') $param .=
'&search_accountparent='.urlencode($search_accountparent);
274 if ($search_pcgtype) $param .=
'&search_pcgtype='.urlencode($search_pcgtype);
275 if ($optioncss !=
'') $param .=
'&optioncss='.urlencode($optioncss);
277 if (!empty($conf->use_javascript_ajax))
279 print '<!-- Add javascript to reload page when we click "Change plan" -->
280 <script type="text/javascript">
281 $(document).ready(function () {
282 $("#change_chart").on("click", function (e) {
283 console.log("chartofaccounts seleted = "+$("#chartofaccounts").val());
285 window.location.href = "'.$_SERVER[
"PHP_SELF"].
'?valid_change_chart=1&chartofaccounts="+$("#chartofaccounts").val();
291 print '<form method="POST" id="searchFormList" action="'.$_SERVER[
"PHP_SELF"].
'">';
292 if ($optioncss !=
'')
print '<input type="hidden" name="optioncss" value="'.$optioncss.
'">';
293 print '<input type="hidden" name="token" value="'.newToken().
'">';
294 print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
295 print '<input type="hidden" name="action" value="list">';
296 print '<input type="hidden" name="sortfield" value="'.$sortfield.
'">';
297 print '<input type="hidden" name="sortorder" value="'.$sortorder.
'">';
298 print '<input type="hidden" name="contextpage" value="'.$contextpage.
'">';
300 $newcardbutton .=
dolGetButtonTitle($langs->trans(
"New"), $langs->trans(
"Addanaccount"),
'fa fa-plus-circle',
'./card.php?action=create');
302 print_barre_liste($langs->trans(
'ListAccounts'), $page,
$_SERVER[
"PHP_SELF"], $param, $sortfield, $sortorder,
'', $num, $nbtotalofrecords,
'title_accountancy', 0, $newcardbutton,
'', $limit, 0, 0, 1);
305 print $langs->trans(
"Selectchartofaccounts").
" : ";
306 print '<select class="flat minwidth200" name="chartofaccounts" id="chartofaccounts">';
307 $sql =
"SELECT a.rowid, a.pcg_version, a.label, a.active, c.code as country_code";
308 $sql .=
" FROM ".MAIN_DB_PREFIX.
"accounting_system as a";
309 $sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.
"c_country as c ON a.fk_country = c.rowid AND c.active = 1";
310 $sql .=
" WHERE a.active = 1";
311 dol_syslog(
'accountancy/admin/account.php $sql='.$sql);
313 $resqlchart = $db->query($sql);
315 $numbis = $db->num_rows($resqlchart);
317 print '<option value="-1"> </option>';
318 while ($i < $numbis) {
319 $obj = $db->fetch_object($resqlchart);
321 print '<option value="'.$obj->rowid.
'"';
322 print ($pcgver == $obj->rowid) ?
' selected' :
'';
323 print '>'.$obj->pcg_version.
' - '.$obj->label.
' - ('.$obj->country_code.
')</option>';
330 print '<input type="'.(empty($conf->use_javascript_ajax) ?
'submit' :
'button').
'" class="button" name="change_chart" id="change_chart" value="'.
dol_escape_htmltag($langs->trans(
"ChangeAndLoad")).
'">';
335 $varpage = empty($contextpage) ? $_SERVER[
"PHP_SELF"] : $contextpage;
336 $selectedfields = $form->multiSelectArrayWithCheckbox(
'selectedfields', $arrayfields, $varpage);
339 $massactionbutton =
'';
341 print
'<div class="div-table-responsive">';
342 print
'<table class="tagtable liste'.($moreforfilter ?
" listwithfilterbefore" :
"").
'">'.
"\n";
345 print
'<tr class="liste_titre_filter">';
346 if (!empty($arrayfields[
'aa.account_number'][
'checked'])) print
'<td class="liste_titre"><input type="text" class="flat width100" name="search_account" value="'.$search_account.
'"></td>';
347 if (!empty($arrayfields[
'aa.label'][
'checked'])) print
'<td class="liste_titre"><input type="text" class="flat width150" name="search_label" value="'.$search_label.
'"></td>';
348 if (!empty($arrayfields[
'aa.labelshort'][
'checked'])) print
'<td class="liste_titre"><input type="text" class="flat width100" name="search_labelshort" value="'.$search_labelshort.
'"></td>';
349 if (!empty($arrayfields[
'aa.account_parent'][
'checked'])) {
350 print
'<td class="liste_titre">';
351 print $formaccounting->select_account($search_accountparent,
'search_accountparent', 2);
354 if (!empty($arrayfields[
'aa.pcg_type'][
'checked'])) print
'<td class="liste_titre"><input type="text" class="flat width100" name="search_pcgtype" value="'.$search_pcgtype.
'"></td>';
355 if ($conf->global->MAIN_FEATURES_LEVEL >= 2) {
if (!empty($arrayfields[
'aa.reconcilable'][
'checked'])) print
'<td class="liste_titre"> </td>'; }
356 if (!empty($arrayfields[
'aa.active'][
'checked'])) print
'<td class="liste_titre"> </td>';
357 print
'<td class="liste_titre maxwidthsearch">';
358 $searchpicto = $form->showFilterAndCheckAddButtons($massactionbutton ? 1 : 0,
'checkforselect', 1);
363 print
'<tr class="liste_titre">';
364 if (!empty($arrayfields[
'aa.account_number'][
'checked']))
print_liste_field_titre($arrayfields[
'aa.account_number'][
'label'], $_SERVER[
"PHP_SELF"],
"aa.account_number",
"", $param,
'', $sortfield, $sortorder);
365 if (!empty($arrayfields[
'aa.label'][
'checked']))
print_liste_field_titre($arrayfields[
'aa.label'][
'label'], $_SERVER[
"PHP_SELF"],
"aa.label",
"", $param,
'', $sortfield, $sortorder);
366 if (!empty($arrayfields[
'aa.labelshort'][
'checked']))
print_liste_field_titre($arrayfields[
'aa.labelshort'][
'label'], $_SERVER[
"PHP_SELF"],
"aa.labelshort",
"", $param,
'', $sortfield, $sortorder);
367 if (!empty($arrayfields[
'aa.account_parent'][
'checked']))
print_liste_field_titre($arrayfields[
'aa.account_parent'][
'label'], $_SERVER[
"PHP_SELF"],
"aa.account_parent",
"", $param,
'', $sortfield, $sortorder,
'left ');
368 if (!empty($arrayfields[
'aa.pcg_type'][
'checked']))
print_liste_field_titre($arrayfields[
'aa.pcg_type'][
'label'], $_SERVER[
"PHP_SELF"],
'aa.pcg_type',
'', $param,
'', $sortfield, $sortorder,
'', $arrayfields[
'aa.pcg_type'][
'help']);
369 if ($conf->global->MAIN_FEATURES_LEVEL >= 2) {
if (!empty($arrayfields[
'aa.reconcilable'][
'checked']))
print_liste_field_titre($arrayfields[
'aa.reconcilable'][
'label'], $_SERVER[
"PHP_SELF"],
'aa.reconcilable',
'', $param,
'', $sortfield, $sortorder); }
370 if (!empty($arrayfields[
'aa.active'][
'checked']))
print_liste_field_titre($arrayfields[
'aa.active'][
'label'], $_SERVER[
"PHP_SELF"],
'aa.active',
'', $param,
'', $sortfield, $sortorder);
371 print_liste_field_titre($selectedfields, $_SERVER[
"PHP_SELF"],
"",
'',
'',
'', $sortfield, $sortorder,
'center maxwidthsearch ');
377 $totalarray = array();
379 while ($i < min($num, $limit))
381 $obj = $db->fetch_object(
$resql);
383 $accountstatic->id = $obj->rowid;
384 $accountstatic->label = $obj->label;
385 $accountstatic->account_number = $obj->account_number;
387 print
'<tr class="oddeven">';
390 if (!empty($arrayfields[
'aa.account_number'][
'checked']))
393 print $accountstatic->getNomUrl(1, 0, 0,
'', 0, 1, 0,
'accountcard');
395 if (!$i) $totalarray[
'nbfield']++;
399 if (!empty($arrayfields[
'aa.label'][
'checked']))
404 if (!$i) $totalarray[
'nbfield']++;
408 if (!empty($arrayfields[
'aa.labelshort'][
'checked']))
411 print $obj->labelshort;
413 if (!$i) $totalarray[
'nbfield']++;
417 if (!empty($arrayfields[
'aa.account_parent'][
'checked']))
421 if (!empty($obj->account_parent) && !empty($obj->rowid2))
424 print
'<!-- obj->account_parent = '.$obj->account_parent.
' obj->rowid2 = '.$obj->rowid2.
' -->';
425 $accountparent->id = $obj->rowid2;
426 $accountparent->label = $obj->label2;
427 $accountparent->account_number = $obj->account_number2;
428 print $accountparent->getNomUrl(1);
430 if (!$i) $totalarray[
'nbfield']++;
433 if (!empty($obj->account_parent)) {
434 print
'<!-- Bad value for obj->account_parent = '.$obj->account_parent.
': is a rowid that does not exists -->';
437 if (!$i) $totalarray[
'nbfield']++;
442 if (!empty($arrayfields[
'aa.pcg_type'][
'checked']))
445 print $obj->pcg_type;
447 if (!$i) $totalarray[
'nbfield']++;
450 if ($conf->global->MAIN_FEATURES_LEVEL >= 2) {
452 if (!empty($arrayfields[
'aa.reconcilable'][
'checked'])) {
453 print
'<td class="center">';
454 if (empty($obj->reconcilable)) {
455 print
'<a class="reposition" href="'.$_SERVER[
"PHP_SELF"].
'?id='.$obj->rowid.
'&action=enable&mode=1">';
456 print
img_picto($langs->trans(
"Disabled"),
'switch_off');
459 print
'<a class="reposition" href="'.$_SERVER[
"PHP_SELF"].
'?id='.$obj->rowid.
'&action=disable&mode=1">';
460 print
img_picto($langs->trans(
"Activated"),
'switch_on');
465 $totalarray[
'nbfield']++;
471 if (!empty($arrayfields[
'aa.active'][
'checked']))
473 print
'<td class="center">';
474 if (empty($obj->active)) {
475 print
'<a class="reposition" href="'.$_SERVER[
"PHP_SELF"].
'?id='.$obj->rowid.
'&action=enable&mode=0">';
476 print
img_picto($langs->trans(
"Disabled"),
'switch_off');
479 print
'<a class="reposition" href="'.$_SERVER[
"PHP_SELF"].
'?id='.$obj->rowid.
'&action=disable&mode=0">';
480 print
img_picto($langs->trans(
"Activated"),
'switch_on');
484 if (!$i) $totalarray[
'nbfield']++;
488 print
'<td class="center">';
489 if ($user->rights->accounting->chartofaccount) {
490 print
'<a class="editfielda" href="./card.php?action=update&token='.newToken().
'&id='.$obj->rowid.
'&backtopage='.urlencode($_SERVER[
"PHP_SELF"].
'?'.$param).
'">';
494 print
'<a class="marginleftonly" href="./card.php?action=delete&token='.newToken().
'&id='.$obj->rowid.
'&backtopage='.urlencode($_SERVER[
"PHP_SELF"].
'?'.$param).
'">';
499 if (!$i) $totalarray[
'nbfield']++;
GETPOST($paramname, $check= 'alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
img_edit($titlealt= 'default', $float=0, $other= '')
Show logo editer/modifier fiche.
dolGetButtonTitle($label, $helpText= '', $iconClass= 'fa fa-file', $url= '', $id= '', $status=1, $params=array())
Function dolGetButtonTitle : this kind of buttons are used in title in list.
dolibarr_set_const($db, $name, $value, $type= 'chaine', $visible=0, $note= '', $entity=1)
Insert a parameter (key,value) into database (delete old key then insert it again).
ajax_combobox($htmlname, $events=array(), $minLengthToAutocomplete=0, $forcefocus=0, $widthTypeOfAutocomplete= 'resolve')
Convert a html select field into an ajax combobox.
setEventMessages($mesg, $mesgs, $style= 'mesgs', $messagekey= '')
Set event messages in dol_events session object.
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.
GETPOSTISSET($paramname)
Return true if we are in a context of submitting the parameter $paramname.
print_liste_field_titre($name, $file="", $field="", $begin="", $moreparam="", $moreattrib="", $sortfield="", $sortorder="", $prefix="", $tooltip="", $forcenowrapcolumntitle=0)
Show title line of an array.
img_picto($titlealt, $picto, $moreatt= '', $pictoisfullpath=false, $srconly=0, $notitle=0, $alt= '', $morecss= '', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename= '', $restricttologhandler= '', $logcontext=null)
Write log message into outputs.
accessforbidden($message= '', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program Calling this function terminate execution ...
natural_search($fields, $value, $mode=0, $nofirstand=0)
Generate natural SQL search string for a criteria (this criteria can be tested on one or several fiel...
run_sql($sqlfile, $silent=1, $entity= '', $usesavepoint=1, $handler= '', $okerror= 'default', $linelengthlimit=32768, $nocommentremoval=0, $offsetforchartofaccount=0)
Launch a sql file.
print $_SERVER["PHP_SELF"]
Edit parameters.
print
Draft customers invoices.
if(!empty($conf->facture->enabled)&&$user->rights->facture->lire) if((!empty($conf->fournisseur->enabled)&&empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)||!empty($conf->supplier_invoice->enabled))&&$user->rights->fournisseur->facture->lire) if(!empty($conf->don->enabled)&&$user->rights->don->lire) if(!empty($conf->tax->enabled)&&$user->rights->tax->charges->lire) if(!empty($conf->facture->enabled)&&!empty($conf->commande->enabled)&&$user->rights->commande->lire &&empty($conf->global->WORKFLOW_DISABLE_CREATE_INVOICE_FROM_ORDER)) if(!empty($conf->facture->enabled)&&$user->rights->facture->lire) if((!empty($conf->fournisseur->enabled)&&empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)||!empty($conf->supplier_invoice->enabled))&&$user->rights->fournisseur->facture->lire) $resql
Social contributions to pay.
dol_print_error($db= '', $error= '', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
Class to manage accounting accounts.
img_delete($titlealt= 'default', $other= 'class="pictodelete"', $morecss= '')
Show delete logo.
if(!defined('CSRFCHECK_WITH_TOKEN')) define('CSRFCHECK_WITH_TOKEN'
Draft customers invoices.
dol_escape_htmltag($stringtoescape, $keepb=0, $keepn=0, $keepmoretags= '', $escapeonlyhtmltags=0)
Returns text escaped for inclusion in HTML alt or title tags, or into values of HTML input fields...