2.9. Documents

LMS makes possible to generate and to store various documents i.e. invoices, receipts and non-financial documents i.e. contracts, protocols and others. Documents can be numbered with numbering plans (patterns) defined in menu Configuration - Numbering Plans.

2.9.1. Invoices

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:

Generated invoices can be viewed in two ways: by clicking on printer icon, in balance sheet page or by clicking 'Invoices List' in 'Finances' menu. In second case, is also possible to filter invoices for printing.

2.9.1.1. HTML

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

Generated invoice in HTML format consist of originals and copies, which are separated by CSS page-break markups, so every modern browser that supports CSS should print many-page invoices correctly. This behavior was tested on Microsoft Internet Explorer 6.0, Opera 7.02 and Mozilla 1.3.

Note

Almost every internet browser has printing configuration, where functions like header and footer or URL printing can be disabled.

2.9.1.2. PDF

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

2.9.2. Cash Receipts

2.9.2.1. HTML

Receipts are printed in html format by default using provided template. In [receipts] section you can also configure:

  • template_file

    Cash receipt template, which should be placed in templates directory. Default: receipt.html.

    Example: template_file = /mytemplates/receipt.html

  • content_type

    Printout 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 receipt printout. WARNING: Setting attachment_name with default content_type will (in case of MSIE) print document + prompt for save on disk + bonus browser crash (6.0SP1 on WinXP). Default: empty.

    Example: attachment_name = receipt.xls

2.9.3. Other documents

Documents support is not limited to invoices. You might store virtually any documents you want in LMS, such as contracts, protocols, annexes and others. You can assign any number of documents to each customer in 'Customer documents' tab in 'Customer information' panel. Each document should have defined title, type and additionally you might define it's time span (time until when it's valid) and description. Document files are being stored outside of database (which should be kept in mind while doing backups!) in directory defined with doc_dir in [directories] section of config file.