dolibarr  13.0.2
setup.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (C) 2008-2011 Laurent Destailleur <eldy@users.sourceforge.net>
3  * Copyright (C) 2011-2017 Juanjo Menent <jmenent@2byte.es>
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 3 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program. If not, see <https://www.gnu.org/licenses/>.
17  */
18 
25 require '../../main.inc.php'; // Load $user and permissions
26 require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
27 require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php';
28 require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
29 require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
30 require_once DOL_DOCUMENT_ROOT."/core/lib/takepos.lib.php";
31 require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
32 
33 // If socid provided by ajax company selector
34 if (!empty($_REQUEST['CASHDESK_ID_THIRDPARTY_id']))
35 {
36  $_GET['CASHDESK_ID_THIRDPARTY'] = GETPOST('CASHDESK_ID_THIRDPARTY_id', 'alpha');
37  $_POST['CASHDESK_ID_THIRDPARTY'] = GETPOST('CASHDESK_ID_THIRDPARTY_id', 'alpha');
38  $_REQUEST['CASHDESK_ID_THIRDPARTY'] = GETPOST('CASHDESK_ID_THIRDPARTY_id', 'alpha');
39 }
40 
41 // Security check
42 if (!$user->admin) accessforbidden();
43 
44 $langs->loadLangs(array("admin", "cashdesk"));
45 
46 global $db, $mysoc;
47 
48 $sql = "SELECT code, libelle FROM ".MAIN_DB_PREFIX."c_paiement";
49 $sql .= " WHERE entity IN (".getEntity('c_paiement').")";
50 $sql .= " AND active = 1";
51 $sql .= " ORDER BY libelle";
52 $resql = $db->query($sql);
53 $paiements = array();
54 if ($resql) {
55  while ($obj = $db->fetch_object($resql)) {
56  array_push($paiements, $obj);
57  }
58 }
59 
60 $action = GETPOST('action', 'aZ09');
61 
62 
63 /*
64  * Actions
65  */
66 
67 $error = 0;
68 
69 if ($action == 'set')
70 {
71  $db->begin();
72  if (GETPOST('socid', 'int') < 0) $_POST["socid"] = '';
73 
74  $res = dolibarr_set_const($db, "TAKEPOS_ROOT_CATEGORY_ID", GETPOST('TAKEPOS_ROOT_CATEGORY_ID', 'alpha'), 'chaine', 0, '', $conf->entity);
75  $res = dolibarr_set_const($db, "TAKEPOS_SUPPLEMENTS_CATEGORY", GETPOST('TAKEPOS_SUPPLEMENTS_CATEGORY', 'alpha'), 'chaine', 0, '', $conf->entity);
76  $res = dolibarr_set_const($db, "TAKEPOS_NUMPAD", GETPOST('TAKEPOS_NUMPAD', 'alpha'), 'chaine', 0, '', $conf->entity);
77  $res = dolibarr_set_const($db, "TAKEPOS_SORTPRODUCTFIELD", GETPOST('TAKEPOS_SORTPRODUCTFIELD', 'alpha'), 'chaine', 0, '', $conf->entity);
78  $res = dolibarr_set_const($db, "TAKEPOS_NUM_TERMINALS", GETPOST('TAKEPOS_NUM_TERMINALS', 'alpha'), 'chaine', 0, '', $conf->entity);
79  $res = dolibarr_set_const($db, "TAKEPOS_ADDON", GETPOST('TAKEPOS_ADDON', 'alpha'), 'int', 0, '', $conf->entity);
80  $res = dolibarr_set_const($db, "TAKEPOS_EMAIL_TEMPLATE_INVOICE", GETPOST('TAKEPOS_EMAIL_TEMPLATE_INVOICE', 'alpha'), 'chaine', 0, '', $conf->entity);
81  if (!empty($conf->global->TAKEPOS_ENABLE_SUMUP)) {
82  $res = dolibarr_set_const($db, "TAKEPOS_SUMUP_AFFILIATE", GETPOST('TAKEPOS_SUMUP_AFFILIATE', 'alpha'), 'chaine', 0, '', $conf->entity);
83  $res = dolibarr_set_const($db, "TAKEPOS_SUMUP_APPID", GETPOST('TAKEPOS_SUMUP_APPID', 'alpha'), 'chaine', 0, '', $conf->entity);
84  }
85 
86  dol_syslog("admin/cashdesk: level ".GETPOST('level', 'alpha'));
87 
88  if (!($res > 0)) $error++;
89 
90  if (!$error)
91  {
92  $db->commit();
93  } else {
94  $db->rollback();
95  }
96 } elseif ($action == 'updateMask') {
97  $maskconst = GETPOST('maskconst', 'alpha');
98  $maskvalue = GETPOST('maskvalue', 'alpha');
99  if ($maskconst) $res = dolibarr_set_const($db, $maskconst, $maskvalue, 'chaine', 0, '', $conf->entity);
100  if (!($res > 0)) {
101  $error++;
102  }
103 } elseif ($action == 'setrefmod') {
104  $value = GETPOST('value', 'alpha');
105  dolibarr_set_const($db, "TAKEPOS_REF_ADDON", $value, 'chaine', 0, '', $conf->entity);
106 }
107 
108 if ($action != '') {
109  if (!$error) {
110  setEventMessage($langs->trans('SetupSaved'));
111  } else {
112  setEventMessages($langs->trans('Error'), null, 'errors');
113  }
114 }
115 
116 
117 /*
118  * View
119  */
120 
121 $form = new Form($db);
122 $formproduct = new FormProduct($db);
123 
124 llxHeader('', $langs->trans("CashDeskSetup"));
125 
126 $linkback = '<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
127 print load_fiche_titre($langs->trans("CashDeskSetup").' (TakePOS)', $linkback, 'title_setup');
129 print dol_get_fiche_head($head, 'setup', 'TakePOS', -1, 'cash-register');
130 
131 // Numbering modules
132 $now = dol_now();
133 $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
134 
135 print load_fiche_titre($langs->trans('CashDeskRefNumberingModules'), '', '');
136 
137 print '<table class="noborder" width="100%">';
138 print '<tr class="liste_titre">';
139 print '<td>'.$langs->trans("Name")."</td>\n";
140 print '<td>'.$langs->trans("Description")."</td>\n";
141 print '<td class="nowrap">'.$langs->trans("Example")."</td>\n";
142 print '<td align="center" width="60">'.$langs->trans("Status").'</td>';
143 print '<td align="center" width="16">'.$langs->trans("ShortInfo").'</td>';
144 print '</tr>'."\n";
145 
146 clearstatcache();
147 
148 foreach ($dirmodels as $reldir)
149 {
150  $dir = dol_buildpath($reldir."core/modules/takepos/");
151 
152  if (is_dir($dir))
153  {
154  $handle = opendir($dir);
155  if (is_resource($handle))
156  {
157  $var = true;
158 
159  while (($file = readdir($handle)) !== false)
160  {
161  if (substr($file, 0, 16) == 'mod_takepos_ref_' && substr($file, dol_strlen($file) - 3, 3) == 'php')
162  {
163  $file = substr($file, 0, dol_strlen($file) - 4);
164 
165  require_once $dir.$file.'.php';
166 
167  $module = new $file;
168 
169  // Show modules according to features level
170  if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) continue;
171  if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) continue;
172 
173  if ($module->isEnabled())
174  {
175  print '<tr class="oddeven"><td>'.$module->nom."</td><td>\n";
176  print $module->info();
177  print '</td>';
178 
179  // Show example of numbering module
180  print '<td class="nowrap">';
181  $tmp = $module->getExample();
182  if (preg_match('/^Error/', $tmp)) {
183  $langs->load("errors");
184  print '<div class="error">'.$langs->trans($tmp).'</div>';
185  } elseif ($tmp == 'NotConfigured') print $langs->trans($tmp);
186  else print $tmp;
187  print '</td>'."\n";
188 
189  print '<td align="center">';
190  if ($conf->global->TAKEPOS_REF_ADDON == "$file")
191  {
192  print img_picto($langs->trans("Activated"), 'switch_on');
193  } else {
194  print '<a href="'.$_SERVER["PHP_SELF"].'?action=setrefmod&amp;token='.newToken().'&amp;value='.urlencode($file).'">';
195  print img_picto($langs->trans("Disabled"), 'switch_off');
196  print '</a>';
197  }
198  print '</td>';
199 
200  // example for next value
201  $invoice = new Facture($db);
202  $invoice->date = $now;
203  $invoice->module_source = 'takepos';
204  $invoice->pos_source = 1;
205 
206  // Info
207  $htmltooltip = '';
208  $htmltooltip .= ''.$langs->trans("Version").': <b>'.$module->getVersion().'</b><br>';
209  $nextval = $module->getNextValue($mysoc, $invoice);
210  if ("$nextval" != $langs->trans("NotAvailable")) { // Keep " on nextval
211  $htmltooltip .= ''.$langs->trans("NextValue").': ';
212  if ($nextval) {
213  if (preg_match('/^Error/', $nextval) || $nextval == 'NotConfigured')
214  $nextval = $langs->trans($nextval);
215  $htmltooltip .= $nextval.'<br>';
216  } else {
217  $htmltooltip .= $langs->trans($module->error).'<br>';
218  }
219  }
220 
221  print '<td align="center">';
222  print $form->textwithpicto('', $htmltooltip, 1, 0);
223  print '</td>';
224 
225  print "</tr>\n";
226  }
227  }
228  }
229  closedir($handle);
230  }
231  }
232 }
233 print "</table><br>\n";
234 
235 print '<br>';
236 
237 // Mode
238 print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
239 print '<input type="hidden" name="token" value="'.newToken().'">';
240 print '<input type="hidden" name="action" value="set">';
241 
242 print '<div class="div-table-responsive-no-min">';
243 print '<table class="noborder centpercent">';
244 
245 print '<tr class="liste_titre">';
246 print '<td class="notitlefield">'.$langs->trans("Parameters").'</td><td>'.$langs->trans("Value").'</td>';
247 print "</tr>\n";
248 
249 // Terminals
250 print '<tr class="oddeven"><td>';
251 print $langs->trans("NumberOfTerminals");
252 print '<td colspan="2">';
253 $array = array(1=>"1", 2=>"2", 3=>"3", 4=>"4", 5=>"5", 6=>"6", 7=>"7", 8=>"8", 9=>"9");
254 print $form->selectarray('TAKEPOS_NUM_TERMINALS', $array, (empty($conf->global->TAKEPOS_NUM_TERMINALS) ? '0' : $conf->global->TAKEPOS_NUM_TERMINALS), 0);
255 print "</td></tr>\n";
256 
257 // Services
258 if (!empty($conf->service->enabled))
259 {
260  print '<tr class="oddeven"><td>';
261  print $langs->trans("CashdeskShowServices");
262  print '<td colspan="2">';
263  print ajax_constantonoff("CASHDESK_SERVICES", array(), $conf->entity, 0, 0, 1, 0);
264  //print $form->selectyesno("CASHDESK_SERVICES", $conf->global->CASHDESK_SERVICES, 1);
265  print "</td></tr>\n";
266 }
267 
268 // Root category for products
269 print '<tr class="oddeven"><td>';
270 print $form->textwithpicto($langs->trans("RootCategoryForProductsToSell"), $langs->trans("RootCategoryForProductsToSellDesc"));
271 print '<td colspan="2">';
272 print img_object('', 'category', 'class="paddingright"').$form->select_all_categories(Categorie::TYPE_PRODUCT, $conf->global->TAKEPOS_ROOT_CATEGORY_ID, 'TAKEPOS_ROOT_CATEGORY_ID', 64, 0, 0);
273 print ajax_combobox('TAKEPOS_ROOT_CATEGORY_ID');
274 print "</td></tr>\n";
275 
276 // Sort product
277 print '<tr class="oddeven"><td>';
278 print $langs->trans("SortProductField");
279 print '<td colspan="2">';
280 $prod = new Product($db);
281 $array = array('rowid' => 'ID', 'ref' => 'Ref', 'label' => 'Label', 'datec' => 'DateCreation', 'tms' => 'DateModification');
282 print $form->selectarray('TAKEPOS_SORTPRODUCTFIELD', $array, (empty($conf->global->TAKEPOS_SORTPRODUCTFIELD) ? 'rowid' : $conf->global->TAKEPOS_SORTPRODUCTFIELD), 0, 0, 0, '', 1);
283 print "</td></tr>\n";
284 
285 print '<tr class="oddeven"><td>';
286 print $langs->trans('TakeposGroupSameProduct');
287 print '<td colspan="2">';
288 print ajax_constantonoff("TAKEPOS_GROUP_SAME_PRODUCT", array(), $conf->entity, 0, 0, 1, 0);
289 print "</td></tr>\n";
290 
291 $substitutionarray = pdf_getSubstitutionArray($langs, null, null, 2);
292 $substitutionarray['__(AnyTranslationKey)__'] = $langs->trans("Translation");
293 $htmltext = '<i>'.$langs->trans("AvailableVariables").':<br>';
294 foreach ($substitutionarray as $key => $val) $htmltext .= $key.'<br>';
295 $htmltext .= '</i>';
296 
297 // Payment numpad
298 print '<tr class="oddeven"><td>';
299 print $langs->trans("Paymentnumpad");
300 print '<td colspan="2">';
301 $array = array(0=>$langs->trans("Numberspad"), 1=>$langs->trans("BillsCoinsPad"));
302 print $form->selectarray('TAKEPOS_NUMPAD', $array, (empty($conf->global->TAKEPOS_NUMPAD) ? '0' : $conf->global->TAKEPOS_NUMPAD), 0);
303 print "</td></tr>\n";
304 
305 // Numpad use payment icons
306 /*print '<tr class="oddeven"><td>';
307 print $langs->trans('TakeposNumpadUsePaymentIcon');
308 print '<td colspan="2">';
309 print ajax_constantonoff("TAKEPOS_NUMPAD_USE_PAYMENT_ICON", array(), $conf->entity, 0, 0, 1, 0);
310 print "</td></tr>\n";
311 */
312 
313 // Direct Payment
314 print '<tr class="oddeven"><td>';
315 print $langs->trans('DirectPaymentButton');
316 print '<td colspan="2">';
317 print ajax_constantonoff("TAKEPOS_DIRECT_PAYMENT", array(), $conf->entity, 0, 0, 1, 0);
318 //print $form->selectyesno("TAKEPOS_DIRECT_PAYMENT", $conf->global->TAKEPOS_DIRECT_PAYMENT, 1);
319 print "</td></tr>\n";
320 
321 // Head Bar
322 /*print '<tr class="oddeven"><td>';
323 print $langs->trans('HeadBar');
324 print '<td colspan="2">';
325 print $form->selectyesno("TAKEPOS_HEAD_BAR", $conf->global->TAKEPOS_HEAD_BAR, 1);
326 print "</td></tr>\n";
327 */
328 
329 // Email template for send invoice
330 print '<tr class="oddeven"><td>';
331 print $langs->trans('EmailTemplate');
332 print '<td colspan="2">';
333 include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php';
334 $formmail = new FormMail($db);
335 $nboftemplates = $formmail->fetchAllEMailTemplate('facture_send', $user, null, -1); // We set lang=null to get in priority record with no lang
336 //$arraydefaultmessage = $formmail->getEMailTemplate($db, $tmp[1], $user, null, 0, 1, '');
337 $arrayofmessagename = array();
338 if (is_array($formmail->lines_model)) {
339  foreach ($formmail->lines_model as $modelmail) {
340  //var_dump($modelmail);
341  $moreonlabel = '';
342  if (!empty($arrayofmessagename[$modelmail->label])) {
343  $moreonlabel = ' <span class="opacitymedium">('.$langs->trans("SeveralLangugeVariatFound").')</span>';
344  }
345  $arrayofmessagename[$modelmail->id] = $langs->trans(preg_replace('/\(|\)/', '', $modelmail->topic)).$moreonlabel;
346  }
347 }
348 //var_dump($arraydefaultmessage);
349 //var_dump($arrayofmessagename);
350 print $form->selectarray('TAKEPOS_EMAIL_TEMPLATE_INVOICE', $arrayofmessagename, $conf->global->TAKEPOS_EMAIL_TEMPLATE_INVOICE, 'None', 1, 0, '', 0, 0, 0, '', '', 1);
351 print "</td></tr>\n";
352 
353 // Control cash box at opening pos
354 print '<tr class="oddeven"><td>';
355 print $langs->trans('ControlCashOpening');
356 print '<td colspan="2">';
357 print ajax_constantonoff("TAKEPOS_CONTROL_CASH_OPENING", array(), $conf->entity, 0, 0, 1, 0);
358 print "</td></tr>\n";
359 
360 // Gift receipt
361 print '<tr class="oddeven"><td>';
362 print $langs->trans('GiftReceiptButton');
363 print '<td colspan="2">';
364 print ajax_constantonoff("TAKEPOS_GIFT_RECEIPT", array(), $conf->entity, 0, 0, 1, 0);
365 print "</td></tr>\n";
366 
367 // Delayed Pay Button
368 print '<tr class="oddeven"><td>';
369 print $langs->trans('AllowDelayedPayment');
370 print '<td colspan="2">';
371 print ajax_constantonoff("TAKEPOS_DELAYED_PAYMENT", array(), $conf->entity, 0, 0, 1, 0);
372 print "</td></tr>\n";
373 
374 // Numbering module
375 //print '<tr class="oddeven"><td>';
376 //print $langs->trans("BillsNumberingModule");
377 //print '<td colspan="2">';
378 //$array = array(0=>$langs->trans("Default"), "terminal"=>$langs->trans("ByTerminal"));
379 //$dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
380 //foreach ($dirmodels as $reldir)
381 //{
382 // $dir = dol_buildpath($reldir."core/modules/facture/");
383 // if (is_dir($dir))
384 // {
385 // $handle = opendir($dir);
386 // if (is_resource($handle))
387 // {
388 // while (($file = readdir($handle)) !== false)
389 // {
390 // if (!is_dir($dir.$file) || (substr($file, 0, 1) <> '.' && substr($file, 0, 3) <> 'CVS'))
391 // {
392 // $filebis = $file;
393 // $classname = preg_replace('/\.php$/', '', $file);
394 // // For compatibility
395 // if (!is_file($dir.$filebis))
396 // {
397 // $filebis = $file."/".$file.".modules.php";
398 // $classname = "mod_facture_".$file;
399 // }
400 // // Check if there is a filter on country
401 // preg_match('/\-(.*)_(.*)$/', $classname, $reg);
402 // if (!empty($reg[2]) && $reg[2] != strtoupper($mysoc->country_code)) continue;
403 //
404 // $classname = preg_replace('/\-.*$/', '', $classname);
405 // if (!class_exists($classname) && is_readable($dir.$filebis) && (preg_match('/mod_/', $filebis) || preg_match('/mod_/', $classname)) && substr($filebis, dol_strlen($filebis) - 3, 3) == 'php')
406 // {
407 // // Charging the numbering class
408 // require_once $dir.$filebis;
409 //
410 // $module = new $classname($db);
411 //
412 // // Show modules according to features level
413 // if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) continue;
414 // if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) continue;
415 //
416 // if ($module->isEnabled())
417 // {
418 // $array[preg_replace('/\-.*$/', '', preg_replace('/\.php$/', '', $file))] = preg_replace('/\-.*$/', '', preg_replace('/mod_facture_/', '', preg_replace('/\.php$/', '', $file)));
419 // }
420 // }
421 // }
422 // }
423 // closedir($handle);
424 // }
425 // }
426 //}
427 //
428 //print $form->selectarray('TAKEPOS_ADDON', $array, (empty($conf->global->TAKEPOS_ADDON) ? '0' : $conf->global->TAKEPOS_ADDON), 0);
429 //print "</td></tr>\n";
430 
431 print '</table>';
432 print '</div>';
433 
434 
435 // Sumup options
436 if ($conf->global->TAKEPOS_ENABLE_SUMUP) {
437  print '<br>';
438 
439  print '<div class="div-table-responsive-no-min">';
440  print '<table class="noborder centpercent">';
441 
442  print '<tr class="liste_titre">';
443  print '<td class="titlefield">'.$langs->trans("Sumup").'</td><td>'.$langs->trans("Value").'</td>';
444  print "</tr>\n";
445 
446  print '<tr class="oddeven"><td>';
447  print $langs->trans("SumupAffiliate");
448  print '<td colspan="2">';
449  print '<input type="text" name="TAKEPOS_SUMUP_AFFILIATE" value="'.$conf->global->TAKEPOS_SUMUP_AFFILIATE.'"></input>';
450  print "</td></tr>\n";
451  print '<tr class="oddeven"><td>';
452  print $langs->trans("SumupAppId");
453  print '<td colspan="2">';
454  print '<input type="text" name="TAKEPOS_SUMUP_APPID" value="'.$conf->global->TAKEPOS_SUMUP_APPID.'"></input>';
455  print "</td></tr>\n";
456 
457  print '</table>';
458  print '</div>';
459 }
460 
461 print '<br>';
462 
463 print '<div class="center"><input type="submit" class="button button-save" value="'.$langs->trans("Save").'"></div>';
464 
465 print "</form>\n";
466 
467 llxFooter();
468 $db->close();
GETPOST($paramname, $check= 'alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
Classe permettant la generation du formulaire html d&#39;envoi de mail unitaire Usage: $formail = new For...
Class to manage products or services.
dol_now($mode= 'auto')
Return date for now.
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).
Definition: admin.lib.php:575
setEventMessage($mesgs, $style= 'mesgs')
Set event message in dol_events session object.
ajax_combobox($htmlname, $events=array(), $minLengthToAutocomplete=0, $forcefocus=0, $widthTypeOfAutocomplete= 'resolve')
Convert a html select field into an ajax combobox.
Definition: ajax.lib.php:391
dol_buildpath($path, $type=0, $returnemptyifnotfound=0)
Return path of url or filesystem.
Class with static methods for building HTML components related to products Only components common to ...
llxHeader()
Empty header.
Definition: wrapper.php:45
setEventMessages($mesg, $mesgs, $style= 'mesgs', $messagekey= '')
Set event messages in dol_events session object.
Class to manage generation of HTML components Only common components must be here.
load_fiche_titre($titre, $morehtmlright= '', $picto= 'generic', $pictoisfullpath=0, $id= '', $morecssontable= '', $morehtmlcenter= '')
Load a title with picto.
dol_strlen($string, $stringencoding= 'UTF-8')
Make a strlen call.
takepos_admin_prepare_head()
Prepare array with list of tabs.
Definition: takepos.lib.php:29
img_picto($titlealt, $picto, $moreatt= '', $pictoisfullpath=false, $srconly=0, $notitle=0, $alt= '', $morecss= '', $marginleftonlyshort=2)
Show picto whatever it&#39;s its name (generic function)
ajax_constantonoff($code, $input=array(), $entity=null, $revertonoff=0, $strict=0, $forcereload=0, $marginleftonlyshort=2, $forcenoajax=0)
On/off button for constant.
Definition: ajax.lib.php:503
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename= '', $restricttologhandler= '', $logcontext=null)
Write log message into outputs.
if(!GETPOST('transkey', 'alphanohtml')&&!GETPOST('transphrase', 'alphanohtml')) else
View.
Definition: notice.php:44
img_object($titlealt, $picto, $moreatt= '', $pictoisfullpath=false, $srconly=0, $notitle=0)
Show a picto called object_picto (generic function)
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 ...
pdf_getSubstitutionArray($outputlangs, $exclude=null, $object=null, $onlykey=0)
Return array of possible substitutions for PDF content (without external module substitutions).
Definition: pdf.lib.php:643
dol_get_fiche_head($links=array(), $active= '', $title= '', $notab=0, $picto= '', $pictoisfullpath=0, $morehtmlright= '', $morecss= '', $limittoshow=0, $moretabssuffix= '')
Show tabs of a record.
print
Draft customers invoices.
Definition: index.php:89
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.
Definition: index.php:1232
newToken()
Return the value of token currently saved into session with name &#39;newtoken&#39;.
print $_SERVER["PHP_SELF"] n
Edit parameters.
Definition: categories.php:101
Class to manage invoices.
llxFooter()
Empty footer.
Definition: wrapper.php:59
if(!defined('CSRFCHECK_WITH_TOKEN')) define('CSRFCHECK_WITH_TOKEN'
Draft customers invoices.