Difference between revisions of "Freeside:1.7:Documentation:Administration"

From Freeside
Jump to: navigation, search
(Exports (provisioning))
(Billing)
Line 23: Line 23:
  
 
== Billing ==
 
== Billing ==
 +
 +
=== Invoice events ===
 +
 +
* Use invoice events to implement your business rules for re-sending invoices and late notices, retrying cards, suspending, etc.
 +
<code>Configuration -> Billing -> View/Edit invoice events</code>
 +
* The freeside-daily script should be run daily to bill customers and run invoice collection events.
 +
* If any monthly events are enabled, the freeside-monthly script should be run monthly.
 +
* Invoice events can also be used to implement agent-virtualized invoices. (add more info)
 +
 +
=== Invoice templates ===
 +
 +
==== Typeset (LaTeX) invoice templates ====
 +
 +
===== Prerequisites =====
 +
 +
* Install teTex and Ghostscript (included with most distributions)
 +
 +
===== Content setup =====
 +
 +
* Edit the invoice_latexreturnaddress, invoice_latexfooter, invoice_latexnotes, and invoice_latexsmallfooter configuration options. If you are adventurous, edit invoice_latex as well.
 +
 +
===== Logo setup =====
 +
 +
* Save a vector format logo in EPS (Encapsulated PostScript) format.
 +
* Resize the logo to 90pt X 36pt: <code>epsffit -c 0 0 90 36 yourlogo.eps >logo.eps</code>
 +
* Copy the resized logo to <code>/usr/local/etc/freeside/conf.''your_datasrc/logo.eps''</code>
 +
* Problems?  Try <code>bin/strip-eps <oldlogo.eps >trynewlogo.eps</code>
 +
 +
==== HTML invoice templates ====
 +
 +
* Place your logo in PNG format at <code>/usr/local/etc/freeside/conf.''your_datasrc''/logo.png</code>
 +
* Edit the invoice_html configuration option or the <code>/usr/local/etc/freeside/conf.''your_datasrc''/invoice_html</code> file.  HTML invoices use Text::Template with <%= and %> delimiters.
 +
* The following configuration options can be set to override the default behaviour of using the invoice_latex* data transformed to HTML: invoice_htmlreturnaddress, and invoice_htmlfooter, invoice_htmlnotes.
 +
 +
==== Plaintext invoice templates ====
 +
 +
* See the Text::Template documentation for details on the substitution language.
 +
* You must 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. Alternatively, call invoice_lines() with no arguments, and pagination will be disabled - all invoice line items will print on one page, with no padding (recommended for email invoices).
 +
* In addition, the following variables are available:
 +
** $invnum - invoice number
 +
** $date - as a UNIX timestamp (see Date::Format for conversion functions).
 +
** $page - current page
 +
** $total_pages - total pages
 +
** @address - A six-element array containing the customer name, company, and address.
 +
 +
=== Credit cards and Electronic checks ===
 
* [[Freeside:1.7:Documentation:Administration:Real-time_Processing | Real-time credit card and electronic check processing]]
 
* [[Freeside:1.7:Documentation:Administration:Real-time_Processing | Real-time credit card and electronic check processing]]
 
* [[Freeside:1.7:Documentation:Administration:Batch_Processing | Batch credit card and electronic check processing]]
 
* [[Freeside:1.7:Documentation:Administration:Batch_Processing | Batch credit card and electronic check processing]]
 +
* Credit card expiration alerts: Customize the ''alerter_template'' configuration option and run <code>freeside-expiration-alerter</code> daily.
 +
* Credit card decline alerts: Customize the ''declinetemplate'' configuration option and set the ''emaildecline'' configuration option.
  
 
== Misc ==
 
== Misc ==

Revision as of 05:39, 18 October 2006

Exports (provisioning)

Exports allow you to provision services to remote machines, databases and APIs. Some exports, such as sqlradius and sqlradius_withdomain, enable a feed for retreiving rating/usage data.

Exports can be added and edited under

Configuration -> Provisioning, services and packages -> View/edit exports

Click on Add a new export to create a new export. Select exports from the dropdown to show more information on each export, including available options, setup and usage.

Exports are activated by associating them with one or more service definitions.

Services

Packages

Resellers

Employees

Billing

Invoice events

  • Use invoice events to implement your business rules for re-sending invoices and late notices, retrying cards, suspending, etc.

Configuration -> Billing -> View/Edit invoice events

  • The freeside-daily script should be run daily to bill customers and run invoice collection events.
  • If any monthly events are enabled, the freeside-monthly script should be run monthly.
  • Invoice events can also be used to implement agent-virtualized invoices. (add more info)

Invoice templates

Typeset (LaTeX) invoice templates

Prerequisites
  • Install teTex and Ghostscript (included with most distributions)
Content setup
  • Edit the invoice_latexreturnaddress, invoice_latexfooter, invoice_latexnotes, and invoice_latexsmallfooter configuration options. If you are adventurous, edit invoice_latex as well.
Logo setup
  • Save a vector format logo in EPS (Encapsulated PostScript) format.
  • Resize the logo to 90pt X 36pt: epsffit -c 0 0 90 36 yourlogo.eps >logo.eps
  • Copy the resized logo to /usr/local/etc/freeside/conf.your_datasrc/logo.eps
  • Problems? Try bin/strip-eps <oldlogo.eps >trynewlogo.eps

HTML invoice templates

  • Place your logo in PNG format at /usr/local/etc/freeside/conf.your_datasrc/logo.png
  • Edit the invoice_html configuration option or the /usr/local/etc/freeside/conf.your_datasrc/invoice_html file. HTML invoices use Text::Template with <%= and %> delimiters.
  • The following configuration options can be set to override the default behaviour of using the invoice_latex* data transformed to HTML: invoice_htmlreturnaddress, and invoice_htmlfooter, invoice_htmlnotes.

Plaintext invoice templates

  • See the Text::Template documentation for details on the substitution language.
  • You must 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. Alternatively, call invoice_lines() with no arguments, and pagination will be disabled - all invoice line items will print on one page, with no padding (recommended for email invoices).
  • In addition, the following variables are available:
    • $invnum - invoice number
    • $date - as a UNIX timestamp (see Date::Format for conversion functions).
    • $page - current page
    • $total_pages - total pages
    • @address - A six-element array containing the customer name, company, and address.

Credit cards and Electronic checks

Misc