It's possible to issue invoices in either automatic or manual way. Manual invoices creation is possible in 'New Invoice' module from 'Finances' menu. Automatic issue might be helpful while you have legal contracts with your users. In this case invoices are created by lms-payments script or lmsd daemon.
For proper work of printouts you need to setup custom options in [invoices] section of lms.ini:
number_template
Invoice numbering pattern. Available variables: '%N' - successive number in year/month format, '%M' - month number, '%Y' - year number (four digits). Default: %N/LMS/%Y
Example: number_template = %N/%Y
monthly_numbering
Enable this option when you need to reset invoice numbering on start of every month. Default: disabled
Example: monthly_numbering = 1
header
Seller. Can use string "\n" for lines separation. Default: empty.
Example: header = "SuperNet ISP\nNew Street 15\n12-000 City\n"
footer
Invoice footer - e.g. contact information about seller. Footer will be placed at bottom of an invoice, using small font. Like in header option use "\n" to separate lines. Default: empty
Example: footer = "Internet Service Provider K-27, phone 555-23-23, etc."
default_author
Invoice issuer name. Default: empty
Example: default_author = "invoicing expert"
cplace
Invoice issue location (city). Default: empty.
Example: cplace = Warsaw
Invoices are printed in html format by default using provided template. In [invoices] section you can also configure:
template_file
Invoice template, which should be placed in templates directory. Default: invoice.html.
Example: template_file = invoice-mynet.html
content_type
Invoice content-type. If you enter here 'application/octet-stream' then browser will ask to save file on disk, instead of displaying it. It's useful if you use your own template which generate eg. rtf or xls file. Default: 'text/html'
Example: content_type = application/octet-stream
attachment_name
File name for saving finished invoice printout. WARNING: Setting attachment_name with default content_type will (in case of MSIE) print invoice + prompt for save on disk + bonus browser crash (6.0SP1 on WInXP). Default: empty.
Example: attachment_name = invoice.xls
![]() | Almost every internet browser has printing configuration, where functions like header and footer or URL printing can be disabled. |
It's possible to create invoices as PDF files. Setting option type in [invoices] section to 'pdf' will force invoice being created in PDF instead of html. Option template_file has the same meaning, with one difference, that it might take predefined values: 'standard' - basic invoice (invoice.html equivalent) and 'FT-0100' - invoice adjusted for printing on FT-0100 paper including payment form. You can set template_file option for php file name, but this feature is meant for advanced users as it requires you to create more complicated php file than the one used with html invoices Smarty template.
Data for payment form printouts is stored in [finances] section of lms.ini file. That is:
name - seller name |
shortname - short seller name |
address - seller address |
zip - seller postal code |
city - seller city |
account - banking account number |