Invoice HTML to PDF template

This is the template for the conversion of an invoice from HTML to PDF. Available variables are:

  • <TMPL_VAR NAME=CUSTOMER> The id number of the customer that was invoiced
  • <TMPL_VAR NAME=PLAN> The id number of the rate plan of the customer that was invoiced
  • <TMPL_VAR NAME=PARENT> The id number of the parent of the customer that was invoiced
  • <TMPL_VAR NAME=CONTACT> The id number of the contact person of the customer that was invoiced
  • <TMPL_VAR NAME=FORMAT> The format of the invoice
  • <TMPL_VAR NAME=TYPE> The type of the invoice
  • <TMPL_VAR NAME=CALLSHOP> Boolean, takes the value of 1 if the invoice type is 'callshop'
  • <TMPL_VAR NAME=NOW> The date and time of the invoice in epoch format
  • <TMPL_VAR NAME=NUMBER> The number of the invoice
  • <TMPL_VAR NAME=NUMBER_PREFIX> The number prefix of the invoice
  • <TMPL_VAR NAME=CREATED> The date of creation of the invoice in epoch format
  • <TMPL_VAR NAME=CREATED_DATE> The date of creation of the invoice in human-readable format
  • <TMPL_VAR NAME=DUE> The due date of the invoice in epoch format
  • <TMPL_VAR NAME=DUE_DATE> The due date of the invoice in human-readable format
  • <TMPL_VAR NAME=START> The start date of the invoice in epoch format
  • <TMPL_VAR NAME=START_DATE> The start date of the invoice in human-readable format
  • <TMPL_VAR NAME=END> The end date of the invoice in epoch format
  • <TMPL_VAR NAME=END_DATE> The end date of the invoice in human-readable format
  • <TMPL_VAR NAME=START_PAGE> The start page of the invoice
  • <TMPL_VAR NAME=PAGES> The number of pages of the invoice
  • <TMPL_VAR NAME=LANGUAGE> The language of the invoice
  • <TMPL_VAR NAME=CURRENCY> The currency of the invoice
  • <TMPL_VAR NAME=CURRENCY_SYMBOL> The symbol of the currency of the invoice
  • <TMPL_VAR NAME=CUSTOMER_CURRENCY> The currency of the customer of the invoice
  • <TMPL_VAR NAME=DETAIL> The invoice detail level as shown in the rate plan of the invoiced customer
  • <TMPL_VAR NAME=SHOW_TRANSACTIONS> Boolean, takes the value of 1 if the invoice detail level as shown in the rate plan of the invoiced customer is set to any of the show transactions options
  • <TMPL_VAR NAME=SHOW_CDRS> Boolean, takes the value of 1 if the invoice detail level as shown in the rate plan of the invoiced customer is set to any of the show calls options
  • <TMPL_VAR NAME=GROUP_CDRS> Boolean, takes the value of 1 if the invoice detail level as shown in the rate plan of the invoiced customer is set to 'Show calls grouped by destination'
  • <TMPL_VAR NAME=DIRECTION_CDRS> Boolean, takes the value of 1 if the invoice detail level as shown in the rate plan of the invoiced customer is set to 'Show calls sorted by direction'
  • <TMPL_VAR NAME=SOURCE_CDRS> Boolean, takes the value of 1 if the invoice detail level as shown in the rate plan of the invoiced customer is set to 'Show calls grouped by source'
  • <TMPL_VAR NAME=SUPERCEDES> Array of invoices that are brought forward & superseded by this invoice
  • <TMPL_VAR NAME=TAXES_TOTAL> The total amount of taxes of the invoice
  • <TMPL_VAR NAME=MINIMUM> The minimum amount of the invoice
  • <TMPL_VAR NAME=CDRS_IN_NUMBER> The total number of inbound calls of the invoice
  • <TMPL_VAR NAME=CDRS_IN_TOTALTIME> The total time of inbound calls of the invoice
  • <TMPL_VAR NAME=CDRS_IN_TALKTIME> The total answered (talk) time of inbound calls of the invoice
  • <TMPL_VAR NAME=CDRS_IN_TOTAL_EX_TAX> The total charges for inbound calls excluding taxes
  • <TMPL_VAR NAME=CDRS_IN_TOTAL_INC_TAX> The total charges for inbound calls including taxes
  • <TMPL_VAR NAME=CDRS_OUT_NUMBER> The total number of outbound calls of the invoice
  • <TMPL_VAR NAME=CDRS_OUT_TOTALTIME> The total time of outbound calls of the invoice
  • <TMPL_VAR NAME=CDRS_OUT_TALKTIME> The total answered (talk) time of outbound calls of the invoice
  • <TMPL_VAR NAME=CDRS_OUT_TOTAL_EX_TAX> The total charges for outbound calls excluding taxes
  • <TMPL_VAR NAME=CDRS_OUT_TOTAL_INC_TAX> The total charges for outbound calls including taxes
  • <TMPL_VAR NAME=CDRS_INTERNAL_NUMBER> The total number of internal calls of the invoice
  • <TMPL_VAR NAME=CDRS_INTERNAL_TOTALTIME> The total time of internal calls of the invoice
  • <TMPL_VAR NAME=CDRS_INTERNAL_TALKTIME> The total answered (talk) time of internal calls of the invoice
  • <TMPL_VAR NAME=CDRS_INTERNAL_TOTAL_EX_TAX> The total charges for internal calls excluding taxes
  • <TMPL_VAR NAME=CDRS_INTERNAL_TOTAL_INC_TAX> The total charges for internal calls including taxes
  • <TMPL_VAR NAME=AMOUNT_DUE> The total due amount of the invoice
  • <TMPL_VAR NAME=AMOUNT_DUE_ROUNDED> The rounded total due amount of the invoice
  • <TMPL_VAR NAME=CDRS_NUMBER> The total number of the CDRs of the invoice
  • <TMPL_VAR NAME=CDRS_TOTALTIME> The total call time of the invoice
  • <TMPL_VAR NAME=CDRS_TALKTIME> The total answered (talk) time of the invoice
  • <TMPL_VAR NAME=CDRS_TOTAL_EX_TAX> The total call charges excluding taxes
  • <TMPL_VAR NAME=CDRS_TOTAL_INC_TAX> The total call charges including taxes
  • <TMPL_VAR NAME=SHOW_BALANCE> Boolean, takes the value of 1 if the balance of the customer is to be shown on the invoice
  • <TMPL_VAR NAME=SHOW_MINIMUM> Boolean, takes the value of 1 if a minimum amount of payment is to be shown on the invoice
  • <TMPL_VAR NAME=SHOW_SUMMARY>Boolean, takes the value of 1 if a summary of the subtotals and taxes is to be shown on the invoice
  • <TMPL_VAR NAME=TOTAL_EX_TAX> The total sum of the invoice excluding taxes
  • <TMPL_VAR NAME=TOTAL_INC_TAX> The total sum of the invoice including taxes
  • <TMPL_VAR NAME=TRANSACTIONS_TOTAL_EX_TAX> The total amount of the transactions of the invoice excluding taxes
  • <TMPL_VAR NAME=TRANSACTIONS_TOTAL_INC_TAX> The total amount of the transactions of the invoice including taxes
  • <TMPL_VAR NAME=BILL_TYPE> The billing type of the customer of the invoice
  • <TMPL_VAR NAME=BALANCE_ROUNDED> The rounded balance of the customer of the invoice
  • <TMPL_VAR NAME=CUSTOMER_COUNTRY_DISPLAY> The ISO country code of the customer of the invoice
  • <TMPL_VAR NAME=CUSTOMER_XXX> Name of any column xxx from table 'customers', prefixed by 'CUSTOMER_', referring to the customer that was invoiced
  • <TMPL_VAR NAME=PLAN_YYY> Name of any column yyy from table 'plans', prefixed by 'PLAN_', referring to the customer that was invoiced
  • <TMPL_VAR NAME=PARENT_ZZZ> Name of any column zzz from table 'customers', prefixed by 'PARENT_', referring to the parent of the customer that was invoiced
  • <TMPL_VAR NAME=CONTACT_VVV> Name of any column vvv from table 'people', prefixed by 'CONTACT_', referring to the contact person of the customer that was invoiced.