- <li>To enable billing, you <b>must</b> create an <a href="config.html#invoice_template">invoice_template</a> configuration file. An example file is available in the <i>conf/</i> directory of the distribution. You also need to create an <a href="config.html#lpr">lpr</a> configuration file to enable postal invoices.
- <ul>
- <li>Optional: Invoice template customization
- <ul>
- <li>See the <a href="http://search.cpan.org/doc/MJD/Text-Template-1.42/Template.pm">Text::Template</a> documentation for details on the substitution language.
- <li>You <b>must</b> call the invoice_lines() function at least once - pass it a number of lines, and it returns a list of array references, each of two elements: a service description column, and a price column.
- <li>In addition, the following variables are available:
- <ul>
- <li>$invnum - invoice number
- <li>$date - as a UNIX timestamp (see <a href="http://search.cpan.org/doc/GBARR/TimeDate-1.09/lib/Date/Format.pm">Date::Format</a> for conversion functions).
- <li>$page - current page
- <li>$total_pages - total pages
- <li>@address - A six-element array containing the customer name, company, and address.
- <li>$overdue - true if this invoice is overdue
- </ul>
- </ul>
- </ul>