dolibarr  7.0.0-beta
dolreceiptprinter.class.php
Go to the documentation of this file.
1 <?php
2 /*
3  * Copyright (C) 2015 Frederic France <frederic.france@free.fr>
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 <http://www.gnu.org/licenses/>.
17  * or see http://www.gnu.org/
18  */
19 
25 /*
26  * Tags for ticket template
27  *
28  * <dol_align_left> Left align text
29  * <dol_align_center> Center text
30  * <dol_align_right> Right align text
31  * <dol_use_font_a> Use font A of printer
32  * <dol_use_font_b> Use font B of printer
33  * <dol_use_font_c> Use font C of printer
34  * <dol_bold> </dol_bold> Text Bold
35  * <dol_double_height> </dol_double_height> Text double height
36  * <dol_double_width> </dol_double_width> Text double width
37  * <dol_underline> </dol_underline> Underline text
38  * <dol_underline_2dots> </dol_underline_2dots> Underline with double line
39  * <dol_emphasized> </dol_emphasized> Emphasized text
40  * <dol_switch_colors> </dol_switch_colors> Print in white on black
41  * <dol_print_barcode> Print barcode
42  * <dol_print_barcode_customer_id> Print barcode customer id
43  * <dol_set_print_width_57> Ticket print width of 57mm
44  * <dol_cut_paper_full> Cut ticket completely
45  * <dol_cut_paper_partial> Cut ticket partially
46  * <dol_open_drawer> Open cash drawer
47  * <dol_activate_buzzer> Activate buzzer
48  *
49  * Code which can be placed everywhere
50  * <dol_print_qrcode> Print QR Code
51  * <dol_print_date> Print date AAAA-MM-DD
52  * <dol_print_date_time> Print date and time AAAA-MM-DD HH:MM:SS
53  * <dol_print_year> Print Year
54  * <dol_print_month_letters> Print month in letters (example : november)
55  * <dol_print_month> Print month number
56  * <dol_print_day> Print day number
57  * <dol_print_day_letters> Print day number
58  * <dol_print_table> Print table number (for restaurant, bar...)
59  * <dol_print_cutlery> Print number of cutlery (for restaurant)
60  * <dol_print_payment> Print payment method
61  * <dol_print_logo> Print logo stored on printer. Example : <print_logo>32|32
62  * <dol_print_logo_old> Print logo stored on printer. Must be followed by logo code. For old printers.
63  * <dol_print_order_lines> Print order lines
64  * <dol_print_order_tax> Print order total tax
65  * <dol_print_order_local_tax> Print order local tax
66  * <dol_print_order_total> Print order total
67  * <dol_print_order_number> Print order number
68  * <dol_print_order_number_unique> Print order number after validation
69  * <dol_print_customer_firstname> Print customer firstname
70  * <dol_print_customer_lastname> Print customer name
71  * <dol_print_customer_mail> Print customer mail
72  * <dol_print_customer_phone> Print customer phone
73  * <dol_print_customer_mobile> Print customer mobile
74  * <dol_print_customer_skype> Print customer skype
75  * <dol_print_customer_tax_number> Print customer VAT number
76  * <dol_print_customer_account_balance> Print customer account balance
77  * <dol_print_vendor_lastname> Print vendor name
78  * <dol_print_vendor_firstname> Print vendor firstname
79  * <dol_print_vendor_mail> Print vendor mail
80  * <dol_print_customer_points> Print customer points
81  * <dol_print_order_points> Print number of points for this order
82  *
83  * Conditional code at line start (if�then Print)
84  * <dol_print_if_customer> Print the line IF a customer is affected to the order
85  * <dol_print_if_vendor> Print the line IF a vendor is affected to the order
86  * <dol_print_if_happy_hour> Print the line IF Happy Hour
87  * <dol_print_if_num_order_unique> Print the line IF order is validated
88  * <dol_print_if_customer_points> Print the line IF customer points > 0
89  * <dol_print_if_order_points> Print the line IF points of the order > 0
90  * <dol_print_if_customer_tax_number> Print the line IF customer has vat number
91  * <dol_print_if_customer_account_balance_positive> Print the line IF customer balance > 0
92  *
93  */
94 
95 require_once DOL_DOCUMENT_ROOT .'/includes/mike42/escpos-php/Escpos.php';
96 
97 
102 {
103  const CONNECTOR_DUMMY = 1;
104  const CONNECTOR_FILE_PRINT = 2;
105  const CONNECTOR_NETWORK_PRINT = 3;
106  const CONNECTOR_WINDOWS_PRINT = 4;
107  //const CONNECTOR_JAVA = 5;
108  var $db;
109  var $tags;
110  var $printer;
111  var $template;
112  var $error;
113  var $errors;
114 
115 
116 
122  function __construct($db)
123  {
124  $this->db=$db;
125  $this->tags = array(
126  'dol_align_left',
127  'dol_align_center',
128  'dol_align_right',
129  'dol_use_font_a',
130  'dol_use_font_b',
131  'dol_use_font_c',
132  'dol_bold',
133  '/dol_bold',
134  'dol_double_height',
135  '/dol_double_height',
136  'dol_double_width',
137  '/dol_double_width',
138  'dol_underline',
139  '/dol_underline',
140  'dol_underline_2dots',
141  '/dol_underline',
142  'dol_emphasized',
143  '/dol_emphasized',
144  'dol_switch_colors',
145  '/dol_switch_colors',
146  'dol_print_barcode',
147  'dol_print_barcode_customer_id',
148  'dol_set_print_width_57',
149  'dol_cut_paper_full',
150  'dol_cut_paper_partial',
151  'dol_open_drawer',
152  'dol_activate_buzzer',
153  'dol_print_qrcode',
154  'dol_print_date',
155  'dol_print_date_time',
156  'dol_print_year',
157  'dol_print_month_letters',
158  'dol_print_month',
159  'dol_print_day',
160  'dol_print_day_letters',
161  'dol_print_table',
162  'dol_print_cutlery',
163  'dol_print_payment',
164  'dol_print_logo',
165  'dol_print_logo_old',
166  'dol_print_order_lines',
167  'dol_print_order_tax',
168  'dol_print_order_local_tax',
169  'dol_print_order_total',
170  'dol_print_order_number',
171  'dol_print_order_number_unique',
172  'dol_print_customer_firstname',
173  'dol_print_customer_lastname',
174  'dol_print_customer_mail',
175  'dol_print_customer_phone',
176  'dol_print_customer_mobile',
177  'dol_print_customer_skype',
178  'dol_print_customer_tax_number',
179  'dol_print_customer_account_balance',
180  'dol_print_vendor_lastname',
181  'dol_print_vendor_firstname',
182  'dol_print_vendor_mail',
183  'dol_print_customer_points',
184  'dol_print_order_points',
185  'dol_print_if_customer',
186  'dol_print_if_vendor',
187  'dol_print_if_happy_hour',
188  'dol_print_if_num_order_unique',
189  'dol_print_if_customer_points',
190  'dol_print_if_order_points',
191  'dol_print_if_customer_tax_number',
192  'dol_print_if_customer_account_balance_positive',
193  );
194 
195  }
196 
202  function listPrinters()
203  {
204  global $conf;
205  $error = 0;
206  $line = 0;
207  $sql = 'SELECT rowid, name, fk_type, fk_profile, parameter';
208  $sql.= ' FROM '.MAIN_DB_PREFIX.'printer_receipt';
209  $sql.= ' WHERE entity = '.$conf->entity;
210  $resql = $this->db->query($sql);
211  if ($resql) {
212  $num = $this->db->num_rows($resql);
213  while ($line < $num) {
214  $row = $this->db->fetch_array($resql);
215  switch ($row['fk_type']) {
216  case 1:
217  $row['fk_type_name'] = 'CONNECTOR_DUMMY';
218  break;
219  case 2:
220  $row['fk_type_name'] = 'CONNECTOR_FILE_PRINT';
221  break;
222  case 3:
223  $row['fk_type_name'] = 'CONNECTOR_NETWORK_PRINT';
224  break;
225  case 4:
226  $row['fk_type_name'] = 'CONNECTOR_WINDOWS_PRINT';
227  break;
228  case 5:
229  $row['fk_type_name'] = 'CONNECTOR_JAVA';
230  break;
231  default:
232  $row['fk_type_name'] = 'CONNECTOR_UNKNOWN';
233  break;
234  }
235  switch ($row['fk_profile']) {
236  case 0:
237  $row['fk_profile_name'] = 'PROFILE_DEFAULT';
238  break;
239  case 1:
240  $row['fk_profile_name'] = 'PROFILE_SIMPLE';
241  break;
242  case 2:
243  $row['fk_profile_name'] = 'PROFILE_EPOSTEP';
244  break;
245  case 3:
246  $row['fk_profile_name'] = 'PROFILE_P822D';
247  break;
248  default:
249  $row['fk_profile_name'] = 'PROFILE_STAR';
250  break;
251  }
252  $obj[] = $row;
253  $line++;
254  }
255  } else {
256  $error++;
257  $this->errors[] = $this->db->lasterror;
258  }
259  $this->listprinters = $obj;
260  return $error;
261  }
262 
263 
270  {
271  global $conf;
272  $error = 0;
273  $line = 0;
274  $sql = 'SELECT rowid, name, template';
275  $sql.= ' FROM '.MAIN_DB_PREFIX.'printer_receipt_template';
276  $sql.= ' WHERE entity = '.$conf->entity;
277  $resql = $this->db->query($sql);
278  if ($resql) {
279  $num = $this->db->num_rows($resql);
280  while ($line < $num) {
281  $obj[] = $this->db->fetch_array($resql);
282  $line++;
283  }
284  } else {
285  $error++;
286  $this->errors[] = $this->db->lasterror;
287  }
288  $this->listprinterstemplates = $obj;
289  return $error;
290  }
291 
292 
300  function selectTypePrinter($selected='', $htmlname='printertypeid')
301  {
302  global $langs;
303 
304  $options = array(
305  1 => $langs->trans('CONNECTOR_DUMMY'),
306  2 => $langs->trans('CONNECTOR_FILE_PRINT'),
307  3 => $langs->trans('CONNECTOR_NETWORK_PRINT'),
308  4 => $langs->trans('CONNECTOR_WINDOWS_PRINT')
309  );
310 
311  $this->resprint = Form::selectarray($htmlname, $options, $selected);
312 
313  return 0;
314  }
315 
316 
324  function selectProfilePrinter($selected='', $htmlname='printerprofileid')
325  {
326  global $langs;
327 
328  $options = array(
329  0 => $langs->trans('PROFILE_DEFAULT'),
330  1 => $langs->trans('PROFILE_SIMPLE'),
331  2 => $langs->trans('PROFILE_EPOSTEP'),
332  3 => $langs->trans('PROFILE_P822D'),
333  4 => $langs->trans('PROFILE_STAR')
334  );
335 
336  $this->profileresprint = Form::selectarray($htmlname, $options, $selected);
337  return 0;
338  }
339 
340 
350  function AddPrinter($name, $type, $profile, $parameter)
351  {
352  global $conf;
353  $error = 0;
354  $sql = 'INSERT INTO '.MAIN_DB_PREFIX.'printer_receipt';
355  $sql.= ' (name, fk_type, fk_profile, parameter, entity)';
356  $sql.= ' VALUES ("'.$this->db->escape($name).'", '.$type.', '.$profile.', "'.$this->db->escape($parameter).'", '.$conf->entity.')';
357  $resql = $this->db->query($sql);
358  if (! $resql) {
359  $error++;
360  $this->errors[] = $this->db->lasterror;
361  }
362  return $error;
363  }
364 
375  function UpdatePrinter($name, $type, $profile, $parameter, $printerid)
376  {
377  global $conf;
378  $error = 0;
379  $sql = 'UPDATE '.MAIN_DB_PREFIX.'printer_receipt';
380  $sql.= ' SET name="'.$this->db->escape($name).'"';
381  $sql.= ', fk_type='.$type;
382  $sql.= ', fk_profile='.$profile;
383  $sql.= ', parameter="'.$this->db->escape($parameter).'"';
384  $sql.= ' WHERE rowid='.$printerid;
385  $resql = $this->db->query($sql);
386  if (! $resql) {
387  $error++;
388  $this->errors[] = $this->db->lasterror;
389  }
390  return $error;
391  }
392 
399  function DeletePrinter($printerid)
400  {
401  global $conf;
402  $error = 0;
403  $sql = 'DELETE FROM '.MAIN_DB_PREFIX.'printer_receipt';
404  $sql.= ' WHERE rowid='.$printerid;
405  $resql = $this->db->query($sql);
406  if (! $resql) {
407  $error++;
408  $this->errors[] = $this->db->lasterror;
409  }
410  return $error;
411  }
412 
421  function UpdateTemplate($name, $template, $templateid)
422  {
423  global $conf;
424  $error = 0;
425  $sql = 'UPDATE '.MAIN_DB_PREFIX.'printer_receipt_template';
426  $sql.= ' SET name="'.$this->db->escape($name).'"';
427  $sql.= ', template="'.$this->db->escape($template).'"';
428  $sql.= ' WHERE rowid='.$templateid;
429  $resql = $this->db->query($sql);
430  if (! $resql) {
431  $error++;
432  $this->errors[] = $this->db->lasterror;
433  }
434  return $error;
435  }
436 
437 
444  function SendTestToPrinter($printerid)
445  {
446  global $conf;
447  $error = 0;
448  $img = new EscposImage(DOL_DOCUMENT_ROOT .'/theme/common/dolibarr_logo_bw.png');
449  $ret = $this->InitPrinter($printerid);
450  if ($ret>0) {
451  setEventMessages($this->error, $this->errors, 'errors');
452  } else {
453  try {
454  $this->printer->graphics($img);
455  $this->printer->text("Hello World!\n");
456  $testStr = "Testing 123";
457  $this->printer->qrCode($testStr);
458  $this->printer->text("Most simple example\n");
459  $this->printer->feed();
460  $this->printer->cut();
461  //print '<pre>'.print_r($this->connector, true).'</pre>';
462  $this->printer->close();
463 
464  } catch (Exception $e) {
465  $this->errors[] = $e->getMessage();
466  $error++;
467  }
468  }
469  return $error;
470  }
471 
480  function SendToPrinter($object, $templateid, $printerid)
481  {
482  global $conf;
483  $error = 0;
484  $ret = $this->loadTemplate($templateid);
485 
486  // tags a remplacer par leur valeur avant de parser
487  $this->template = str_replace('<dol_print_num_order>', $object->id, $this->template);
488  $this->template = str_replace('<dol_print_customer_firstname>', $object->customer_firstname, $this->template);
489  $this->template = str_replace('<dol_print_customer_lastname>', $object->customer_lastname, $this->template);
490  $this->template = str_replace('<dol_print_customer_mail>', $object->customer_mail, $this->template);
491  $this->template = str_replace('<dol_print_customer_phone>', $object->customer_phone, $this->template);
492  $this->template = str_replace('<dol_print_customer_mobile>', $object->customer_mobile, $this->template);
493  $this->template = str_replace('<dol_print_customer_skype>', $object->customer_skype, $this->template);
494  $this->template = str_replace('<dol_print_customer_tax_number>', $object->customer_tax_number, $this->template);
495  $this->template = str_replace('<dol_print_customer_account_balance>', $object->customer_account_balance, $this->template);
496  $this->template = str_replace('<dol_print_customer_points>', $object->customer_points, $this->template);
497  $this->template = str_replace('<dol_print_order_points>', $object->order_points, $this->template);
498  $this->template = str_replace('<dol_print_vendor_firstname>', $object->vendor_firstname, $this->template);
499  $this->template = str_replace('<dol_print_vendor_lastname>', $object->vendor_lastname, $this->template);
500  $this->template = str_replace('<dol_print_vendor_mail>', $object->vendor_mail, $this->template);
501  $this->template = str_replace('<dol_print_date>', $object->date, $this->template);
502  $this->template = str_replace('<dol_print_date_time>', $object->date_time, $this->template);
503  $this->template = str_replace('<dol_print_year>', $object->date_time, $this->template);
504  $this->template = str_replace('<dol_print_month_letters>', $object->date_time, $this->template);
505  $this->template = str_replace('<dol_print_month>', $object->date_time, $this->template);
506  $this->template = str_replace('<dol_print_day>', $object->date_time, $this->template);
507  $this->template = str_replace('<dol_print_day_letters>', $object->date_time, $this->template);
508  $this->template = str_replace('<dol_print_table>', $object->table, $this->template);
509  $this->template = str_replace('<dol_print_cutlery>', $object->cutlery, $this->template);
510 
511  // parse template
512  $p = xml_parser_create();
513  xml_parse_into_struct($p, $this->template, $vals, $index);
514  xml_parser_free($p);
515  //print '<pre>'.print_r($index, true).'</pre>';
516  //print '<pre>'.print_r($vals, true).'</pre>';
517  // print ticket
518  $level = 0;
519  $html = '<table border="1" style="width:210px"><pre>';
520  $ret = $this->InitPrinter($printerid);
521  if ($ret>0) {
522  setEventMessages($this->error, $this->errors, 'errors');
523  }
524  else
525  {
526  $nboflines = count($vals);
527  for ($line=0; $line < $nboflines; $line++)
528  {
529  switch ($vals[$line]['tag']) {
530  case 'DOL_ALIGN_CENTER':
531  $this->printer->setJustification(Escpos::JUSTIFY_CENTER);
532  $html.='<center>';
533  $this->printer->text($vals[$line]['value']);
534  break;
535  case 'DOL_ALIGN_RIGHT':
536  $this->printer->setJustification(Escpos::JUSTIFY_RIGHT);
537  $html.='<right>';
538  break;
539  case 'DOL_ALIGN_LEFT':
540  $this->printer->setJustification(Escpos::JUSTIFY_LEFT);
541  $html.='<left>';
542  break;
543  case 'DOL_OPEN_DRAWER':
544  $this->printer->pulse();
545  $html.= ' &#991;'.nl2br($vals[$line]['value']);
546  break;
547  case 'DOL_ACTIVATE_BUZZER':
548  //$this->printer->buzzer();
549  $html.= ' &#x266b;'.nl2br($vals[$line]['value']);
550  break;
551  case 'DOL_PRINT_BARCODE':
552  // $vals[$line]['value'] -> barcode($content, $type)
553  $this->printer->barcode($object->barcode);
554  break;
555  case 'DOL_PRINT_BARCODE_CUSTOMER_ID':
556  // $vals[$line]['value'] -> barcode($content, $type)
557  $this->printer->barcode($object->customer_id);
558  break;
559  case 'DOL_PRINT_QRCODE':
560  // $vals[$line]['value'] -> qrCode($content, $ec, $size, $model)
561  $this->printer->qrcode($vals[$line]['value']);
562  $html.='QRCODE: '.$vals[$line]['value'];
563  break;
564  case 'DOL_CUT_PAPER_FULL':
565  $this->printer->cut(Escpos::CUT_FULL);
566  $html.= ' &#9986;'.nl2br($vals[$line]['value']);
567  break;
568  case 'DOL_CUT_PAPER_PARTIAL':
569  $this->printer->cut(Escpos::CUT_PARTIAL);
570  $html.= ' &#9986;'.nl2br($vals[$line]['value']);
571  break;
572  case 'DOL_USE_FONT_A':
573  $this->printer->setFont(Escpos::FONT_A);
574  $this->printer->text($vals[$line]['value']);
575  break;
576  case 'DOL_USE_FONT_B':
577  $this->printer->setFont(Escpos::FONT_B);
578  $this->printer->text($vals[$line]['value']);
579  break;
580  case 'DOL_USE_FONT_C':
581  $this->printer->setFont(Escpos::FONT_C);
582  $this->printer->text($vals[$line]['value']);
583  break;
584  default:
585  $this->printer->text($vals[$line]['value']);
586  $html.= nl2br($vals[$line]['value']);
587  $this->errors[] = 'UnknowTag: &lt;'.strtolower($vals[$line]['tag']).'&gt;';
588  $error++;
589  break;
590  }
591  }
592  $html.= '</pre></table>';
593  print $html;
594  // Close and print
595  // uncomment next line to see content sent to printer
596  //print '<pre>'.print_r($this->connector, true).'</pre>';
597  $this->printer->close();
598 
599  }
600  return $error;
601  }
602 
609  function loadTemplate($templateid)
610  {
611  global $conf;
612  $error = 0;
613  $sql = 'SELECT template';
614  $sql.= ' FROM '.MAIN_DB_PREFIX.'printer_receipt_template';
615  $sql.= ' WHERE rowid='.$templateid;
616  $sql.= ' AND entity = '.$conf->entity;
617  $resql = $this->db->query($sql);
618  if ($resql) {
619  $obj = $this->db->fetch_array($resql);
620  } else {
621  $error++;
622  $this->errors[] = $this->db->lasterror;
623  }
624  if (empty($obj)) {
625  $error++;
626  $this->errors[] = 'TemplateDontExist';
627  } else {
628  $this->template = $obj['0'];
629  }
630 
631  return $error;
632  }
633 
634 
641  function InitPrinter($printerid)
642  {
643  global $conf;
644  $error=0;
645  $sql = 'SELECT rowid, name, fk_type, fk_profile, parameter';
646  $sql.= ' FROM '.MAIN_DB_PREFIX.'printer_receipt';
647  $sql.= ' WHERE rowid = '.$printerid;
648  $sql.= ' AND entity = '.$conf->entity;
649  $resql = $this->db->query($sql);
650  if ($resql) {
651  $obj = $this->db->fetch_array($resql);
652  } else {
653  $error++;
654  $this->errors[] = $this->db->lasterror;
655  }
656  if (empty($obj)) {
657  $error++;
658  $this->errors[] = 'PrinterDontExist';
659  }
660  if (! $error) {
661  $parameter = $obj['parameter'];
662  try {
663  switch ($obj['fk_type']) {
664  case 1:
665  require_once DOL_DOCUMENT_ROOT .'/includes/mike42/escpos-php/src/DummyPrintConnector.php';
666  $this->connector = new DummyPrintConnector();
667  break;
668  case 2:
669  $this->connector = new FilePrintConnector($parameter);
670  break;
671  case 3:
672  $parameters = explode(':', $parameter);
673  $this->connector = new NetworkPrintConnector($parameters[0], $parameters[1]);
674  break;
675  case 4:
676  $this->connector = new WindowsPrintConnector($parameter);
677  break;
678  default:
679  $this->connector = 'CONNECTOR_UNKNOWN';
680  break;
681  }
682  $this->printer = new Escpos($this->connector);
683  } catch (Exception $e) {
684  $this->errors[] = $e->getMessage();
685  $error++;
686  }
687  }
688  return $error;
689  }
690 }
DeletePrinter($printerid)
Function to Delete a printer from db.
UpdateTemplate($name, $template, $templateid)
Function to Update a printer template in db.
setEventMessages($mesg, $mesgs, $style='mesgs')
Set event messages in dol_events session object.
listPrintersTemplates()
List printers templates.
selectTypePrinter($selected='', $htmlname='printertypeid')
Form to Select type printer.
loadTemplate($templateid)
Function to load Template.
AddPrinter($name, $type, $profile, $parameter)
Function to Add a printer in db.
static selectarray($htmlname, $array, $id='', $show_empty=0, $key_in_label=0, $value_as_key=0, $moreparam='', $translate=0, $maxlen=0, $disabled=0, $sort='', $morecss='', $addjscombo=0, $moreparamonempty='', $disablebademail=0, $nohtmlescape=0)
Return a HTML select string, built from an array of key+value.
InitPrinter($printerid)
Function Init Printer.
Class to manage Receipt Printers.
SendTestToPrinter($printerid)
Function to Send Test page to Printer.
UpdatePrinter($name, $type, $profile, $parameter, $printerid)
Function to Update a printer in db.
selectProfilePrinter($selected='', $htmlname='printerprofileid')
Form to Select Profile printer.
print
Draft customers invoices.
Definition: index.php:91
__construct($db)
Constructor.
if(!empty($conf->facture->enabled)&&$user->rights->facture->lire) if(!empty($conf->fournisseur->enabled)&&$user->rights->fournisseur->facture->lire) if(!empty($conf->don->enabled)&&$user->rights->societe->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)&&$user->rights->fournisseur->facture->lire) $resql
Social contributions to pay.
Definition: index.php:1013
SendToPrinter($object, $templateid, $printerid)
Function to Print Receipt Ticket.