dolibarr  7.0.0-beta
Public Member Functions | List of all members
dolReceiptPrinter Class Reference

Class to manage Receipt Printers. More...

+ Inheritance diagram for dolReceiptPrinter:
+ Collaboration diagram for dolReceiptPrinter:

Public Member Functions

 __construct ($db)
 Constructor. More...
 
 listPrinters ()
 list printers More...
 
 listPrintersTemplates ()
 List printers templates. More...
 
 selectTypePrinter ($selected='', $htmlname='printertypeid')
 Form to Select type printer. More...
 
 selectProfilePrinter ($selected='', $htmlname='printerprofileid')
 Form to Select Profile printer. More...
 
 AddPrinter ($name, $type, $profile, $parameter)
 Function to Add a printer in db. More...
 
 UpdatePrinter ($name, $type, $profile, $parameter, $printerid)
 Function to Update a printer in db. More...
 
 DeletePrinter ($printerid)
 Function to Delete a printer from db. More...
 
 UpdateTemplate ($name, $template, $templateid)
 Function to Update a printer template in db. More...
 
 SendTestToPrinter ($printerid)
 Function to Send Test page to Printer. More...
 
 SendToPrinter ($object, $templateid, $printerid)
 Function to Print Receipt Ticket. More...
 
 loadTemplate ($templateid)
 Function to load Template. More...
 
 InitPrinter ($printerid)
 Function Init Printer. More...
 

Detailed Description

Class to manage Receipt Printers.

Definition at line 101 of file dolreceiptprinter.class.php.

Constructor & Destructor Documentation

dolReceiptPrinter::__construct (   $db)

Constructor.

Parameters
DoliDB$dbdatabase

Definition at line 122 of file dolreceiptprinter.class.php.

Member Function Documentation

dolReceiptPrinter::AddPrinter (   $name,
  $type,
  $profile,
  $parameter 
)

Function to Add a printer in db.

Parameters
string$namePrinter name
int$typePrinter type
int$profilePrinter profile
string$parameterPrinter parameter
Returns
int 0 if OK; >0 if KO

Definition at line 350 of file dolreceiptprinter.class.php.

References $resql.

dolReceiptPrinter::DeletePrinter (   $printerid)

Function to Delete a printer from db.

Parameters
int$printeridPrinter id
Returns
int 0 if OK; >0 if KO

Definition at line 399 of file dolreceiptprinter.class.php.

References $resql.

dolReceiptPrinter::InitPrinter (   $printerid)

Function Init Printer.

Parameters
int$printeridPrinter id
Returns
int 0 if OK; >0 if KO

Definition at line 641 of file dolreceiptprinter.class.php.

References $resql.

Referenced by SendTestToPrinter(), and SendToPrinter().

dolReceiptPrinter::listPrinters ( )

list printers

Returns
int 0 if OK; >0 if KO

Definition at line 202 of file dolreceiptprinter.class.php.

References $resql.

dolReceiptPrinter::listPrintersTemplates ( )

List printers templates.

Returns
int 0 if OK; >0 if KO

Definition at line 269 of file dolreceiptprinter.class.php.

References $resql.

dolReceiptPrinter::loadTemplate (   $templateid)

Function to load Template.

Parameters
int$templateidTemplate id
Returns
int 0 if OK; >0 if KO

Definition at line 609 of file dolreceiptprinter.class.php.

References $resql.

Referenced by SendToPrinter().

dolReceiptPrinter::selectProfilePrinter (   $selected = '',
  $htmlname = 'printerprofileid' 
)

Form to Select Profile printer.

Parameters
string$selectedId printer profile pre-selected
string$htmlnameselect html name
Returns
int 0 if OK; >0 if KO

Definition at line 324 of file dolreceiptprinter.class.php.

References Form\selectarray().

dolReceiptPrinter::selectTypePrinter (   $selected = '',
  $htmlname = 'printertypeid' 
)

Form to Select type printer.

Parameters
string$selectedId printer type pre-selected
string$htmlnameselect html name
Returns
int 0 if OK; >0 if KO

Definition at line 300 of file dolreceiptprinter.class.php.

References Form\selectarray().

dolReceiptPrinter::SendTestToPrinter (   $printerid)

Function to Send Test page to Printer.

Parameters
int$printeridPrinter id
Returns
int 0 if OK; >0 if KO

Definition at line 444 of file dolreceiptprinter.class.php.

References InitPrinter(), and setEventMessages().

dolReceiptPrinter::SendToPrinter (   $object,
  $templateid,
  $printerid 
)

Function to Print Receipt Ticket.

Parameters
object$objectorder or invoice object
int$templateidTemplate id
int$printeridPrinter id
Returns
int 0 if OK; >0 if KO

Definition at line 480 of file dolreceiptprinter.class.php.

References InitPrinter(), loadTemplate(), print, and setEventMessages().

dolReceiptPrinter::UpdatePrinter (   $name,
  $type,
  $profile,
  $parameter,
  $printerid 
)

Function to Update a printer in db.

Parameters
string$namePrinter name
int$typePrinter type
int$profilePrinter profile
string$parameterPrinter parameter
int$printeridPrinter id
Returns
int 0 if OK; >0 if KO

Definition at line 375 of file dolreceiptprinter.class.php.

References $resql.

dolReceiptPrinter::UpdateTemplate (   $name,
  $template,
  $templateid 
)

Function to Update a printer template in db.

Parameters
string$nameTemplate name
int$templateTemplate
int$templateidTemplate id
Returns
int 0 if OK; >0 if KO

Definition at line 421 of file dolreceiptprinter.class.php.

References $resql.


The documentation for this class was generated from the following file: