Skip to content

Invoicing

FlySIP issues invoices to accounts at the end of each billing cycle of their service plan: the billing daemon renders an HTML template to PDF, stores it, and e-mails it to the account’s address. The panel shows the stored invoices, lets you design templates, and can produce an invoice for any period on demand. There are no customer-level invoices; resellers are billed through their balance and the sales reports.

Open Payments → Invoices for the list and Payments → Invoice Templates for the templates. The URLs are /invoices.php and /invoice_templates.php. Both are available to every admin and reseller login that is not restricted by an access level. Generate Invoice is in the Billing submenu of an account’s Actions menu.

Screenshot "admin-panel/invoices" has not been generated yet — see scripts/screenshots/screens.yml.
  1. Open the account and switch to the Advanced tab.
  2. Check Invoicing Enabled and select an Invoice Template.
  3. Make sure the E-mail on the Address tab is filled in; invoices are sent there, with Cc and Bcc as extra recipients.
  4. Click Save & Close.
  5. Check System Parameters → SMTP Server once per environment; without a working mail server the PDFs are stored but never sent.

From then on each service-plan charge queues an invoice. Postpaid plans invoice the period just charged, prepaid plans the previous one. The invoice is issued after the period ends plus the account’s Max Credit Time, so that calls still running at midnight are included.

Column Meaning
Account Acct. name, linking to the account
Issued On Date the PDF was created
Action View opens the PDF in a new window, Download saves it as invoice-<id>.pdf

The filter bar has the date presets, an account box and under Filters the Start Date/Time, End Date/Time and Account. The default period is the current month. A row without icons is an invoice whose PDF failed to render; fix the template and generate it again on demand.

Invoices are immutable: there is no void, no status and no resend from this screen. The number printed on the PDF is the invoice’s internal id, which is global for the switch. Old invoices are deleted after the period set in System Parameters → Data Retention → Purge Old Invoices in.

  1. Open My Customers → Accounts, then Actions → Billing → Generate Invoice for the account.
  2. Set Start Date/Time and End Date/Time. The defaults cover the last billing cycle of the account’s plan.
  3. Click Generate. The PDF opens in the browser, rendered with the account’s template.

A template is HTML with a separate CSS block, edited in the panel under Payments → Invoice Templates and rendered to PDF by the backend. Macros such as ${AMOUNT_DUE}, ${BALANCE} or ${TOTAL_CHARGES} are filled in per invoice, and table macros list the calls and charges of the period. The system template Default Account Invoice is read-only; copy it with Add Based on Existing and edit the copy. The full list of macros, tables and calculations is in Invoice Templates.

${AMOUNT_DUE} is non-zero only when the balance is below zero at the end of the period, which is what a postpaid customer owes. The template is validated on save; a layout the renderer cannot process is refused with Wrong Invoice Template parameters.