|
dolibarr 21.0.0-beta
|
Class to manage Receipt Printers. More...


Public Member Functions | |
| __construct ($db) | |
| Constructor. | |
| listPrinters () | |
| List printers into the array ->listprinters. | |
| listPrintersTemplates () | |
| List printers templates. | |
| selectTypePrinter ($selected='', $htmlname='printertypeid') | |
| Form to Select type printer. | |
| selectProfilePrinter ($selected='', $htmlname='printerprofileid') | |
| Form to Select Profile printer. | |
| addPrinter ($name, $type, $profile, $parameter) | |
| Function to Add a printer in db. | |
| updatePrinter ($name, $type, $profile, $parameter, $printerid) | |
| Function to Update a printer in db. | |
| deletePrinter ($printerid) | |
| Function to Delete a printer from db. | |
| addTemplate ($name, $template) | |
| Function to add a printer template in db. | |
| deleteTemplate ($templateid) | |
| Function to delete a printer template in db. | |
| updateTemplate ($name, $template, $templateid) | |
| Function to Update a printer template in db. | |
| sendTestToPrinter ($printerid, $addimgandbarcode=0) | |
| Function to Send Test page to Printer. | |
| sendToPrinter ($object, $templateid, $printerid) | |
| Function to Print Receipt Ticket. | |
| loadTemplate ($templateid) | |
| Function to load Template into $this->template. | |
| initPrinter ($printerid) | |
| Function Init Printer into $this->printer. | |
Class to manage Receipt Printers.
Definition at line 121 of file dolreceiptprinter.class.php.
| dolReceiptPrinter::__construct | ( | $db | ) |
Constructor.
| DoliDB | $db | database |
Definition at line 191 of file dolreceiptprinter.class.php.
| dolReceiptPrinter::addPrinter | ( | $name, | |
| $type, | |||
| $profile, | |||
| $parameter ) |
Function to Add a printer in db.
| string | $name | Printer name |
| int | $type | Printer type |
| int | $profile | Printer profile |
| string | $parameter | Printer parameter |
Definition at line 449 of file dolreceiptprinter.class.php.
References $conf.
| dolReceiptPrinter::addTemplate | ( | $name, | |
| $template ) |
Function to add a printer template in db.
| string | $name | Template name |
| int | $template | Template |
Definition at line 520 of file dolreceiptprinter.class.php.
References $conf.
| dolReceiptPrinter::deletePrinter | ( | $printerid | ) |
Function to Delete a printer from db.
| int | $printerid | Printer id |
Definition at line 499 of file dolreceiptprinter.class.php.
References $conf.
| dolReceiptPrinter::deleteTemplate | ( | $templateid | ) |
Function to delete a printer template in db.
| int | $templateid | Template ID |
Definition at line 541 of file dolreceiptprinter.class.php.
References $conf.
| dolReceiptPrinter::initPrinter | ( | $printerid | ) |
Function Init Printer into $this->printer.
| int | $printerid | Printer id |
Definition at line 1031 of file dolreceiptprinter.class.php.
References dol_sanitizePathName(), dol_syslog(), and getDolGlobalString().
Referenced by sendTestToPrinter(), and sendToPrinter().
| dolReceiptPrinter::listPrinters | ( | ) |
List printers into the array ->listprinters.
Definition at line 281 of file dolreceiptprinter.class.php.
References $conf.
| dolReceiptPrinter::listPrintersTemplates | ( | ) |
List printers templates.
Definition at line 357 of file dolreceiptprinter.class.php.
References $conf.
| dolReceiptPrinter::loadTemplate | ( | $templateid | ) |
Function to load Template into $this->template.
| int | $templateid | Template id |
Definition at line 998 of file dolreceiptprinter.class.php.
Referenced by sendToPrinter().
| dolReceiptPrinter::selectProfilePrinter | ( | $selected = '', | |
| $htmlname = 'printerprofileid' ) |
Form to Select Profile printer.
| string | $selected | Id printer profile pre-selected |
| string | $htmlname | select html name |
Definition at line 423 of file dolreceiptprinter.class.php.
References Form\selectarray().
| dolReceiptPrinter::selectTypePrinter | ( | $selected = '', | |
| $htmlname = 'printertypeid' ) |
Form to Select type printer.
| string | $selected | Id printer type pre-selected |
| string | $htmlname | select html name |
Definition at line 398 of file dolreceiptprinter.class.php.
References Form\selectarray().
| dolReceiptPrinter::sendTestToPrinter | ( | $printerid, | |
| $addimgandbarcode = 0 ) |
Function to Send Test page to Printer.
| int | $printerid | Printer id |
| int | $addimgandbarcode | Add image and barcode into the test |
Definition at line 589 of file dolreceiptprinter.class.php.
References dol_syslog(), initPrinter(), and setEventMessages().
| dolReceiptPrinter::sendToPrinter | ( | $object, | |
| $templateid, | |||
| $printerid ) |
Function to Print Receipt Ticket.
| Facture | Commande | $object | Order or invoice object |
| int | $templateid | Template id |
| int | $printerid | Printer id |
Definition at line 637 of file dolreceiptprinter.class.php.
References $object, dol_now(), dol_print_date(), dol_syslog(), getDolGlobalInt(), getDolGlobalString(), initPrinter(), loadTemplate(), price(), and setEventMessages().
| dolReceiptPrinter::updatePrinter | ( | $name, | |
| $type, | |||
| $profile, | |||
| $parameter, | |||
| $printerid ) |
Function to Update a printer in db.
| string | $name | Printer name |
| int | $type | Printer type |
| int | $profile | Printer profile |
| string | $parameter | Printer parameter |
| int | $printerid | Printer id |
Definition at line 474 of file dolreceiptprinter.class.php.
| dolReceiptPrinter::updateTemplate | ( | $name, | |
| $template, | |||
| $templateid ) |
Function to Update a printer template in db.
| string | $name | Template name |
| int | $template | Template |
| int | $templateid | Template id |
Definition at line 564 of file dolreceiptprinter.class.php.
References $conf.