APPENDIX A. Variables that can be used in an external invoice template

Link copied to clipboard

Variable name

Description

Environment for direct customers, Reseller for sub-customers

env.i_env

ID

env.name

Environment name

env.companyname

The conventional form for your company’s name

env.addr1

Company’s street address

env.addr2

env.addr3

env.addr4

env.contact_city

City where company is located

env.contact_email

Company contact person’s email address

env.contact_subdivision

Province/state where the company is located

env.contact_zip

Postal code for company’s location

env.contact_zip

Postal code for company’s location

env.country

Country name

env.description

Short description

env.email

Primary email contact

env.faxnum

Primary fax number

env.laddr1

Address where company name is legally registered

env.laddr1

Address where company name is legally registered

env.laddr2

env.lcountry

Country where company is legally registered

env.lcity

City where company is legally registered

env.lname

Legally recognized form of company’s name

env.lzip

Postal code for company’s registered location

env.iso_3166_2

Country subdivision code

env.iso_3166_1_a2

Country code

env.iso_4217

The internal currency

env.phone

Company’s primary telephone number

env.subdivision

Country subdivision name

env.tax_id

Locally designated tax number

env.tz

Time zone company operates in

env.web

Company’s web address

Customer information

customer.i_customer

Customer’s unique numeric number

customer.i_customer_class

Numeric ID for customer Class assigned to customer

customer.i_customer_type

1 (Retail), 2 (Reseller), 3 (Distributor)

customer.i_lang

Localization language, 2 characters ISO639-1 code (examples: en, es)

customer.iso_4217

Customer’s currency

customer.address

Full address line

customer.address_line_2

The 2nd line of the customer’s address that contains the values from baddr2, baddr3, baddr4 and baddr5 fields. The values are separated by the ‘\n’ delimiter.

customer.balance

Customer’s balance at time of PDF generation

customer.balance

Customer’s balance at time of PDF generation

customer.billing_period

Defines customer’s invoicing frequency

customer.bp_charge_cc

Y or N defines if customer’s credit card is charged when invoice is generated

customer.companyname

The conventional form of company’s name

customer.cont1

Primary contact

customer.cont2

Alternative contact

customer.city

City name

customer.country

Country name

customer.creation_date

Date when customer was added to PortaBilling system

customer.credit_limit

Customer’s current credit limit

customer.custom_field1

Value for first Custom Field

customer.custom_field2

Value for second Custom Field

customer.custom_field2

Value for second Custom Field

customer.custom_fieldN

Value for Nth Custom Field

customer.discount_rate

Amount of discount applied to all of customer’s subscriptions by default

customer.email

Primary email contact

customer.faxnum

Primary fax number

customer.firstname

First name

customer.midinit

Middle name

customer.lastname

Last name

customer.lname

Either company name or first name + last name

customer.login

Customer self-care login

customer.name

Customer ID, defines customer name as it appears in the PortaBilling system

customer.notepad

Text entered in Notepad field on the web

customer.opening_balance

Customer’s starting balance

customer.out_date_format

customer.out_date_format

customer.out_date_time_format

Preferable date-time format

customer.out_date_time_format

Preferable date-time format

customer.out_time_format

Preferable time format

customer.phone1

Primary telephone number

customer.phone2

Alternative telephone number

customer.salutation

Something like ‘Mr.,’ ‘Ms.’

customer.state

Province/state name

customer.zip

Postal code

customer.tax_id

Locally-designated tax number

customer.TZ

Time zone

Invoice information

invoice.i_env

Environment ID

invoice.i_customer

Reference to customer’s ID number

invoice.i_invoice

ID number

invoice.invoice_number

Visible invoice number

invoice.i_invoice_status

Invoice status, refer to value from Invoice_Status_Attribs table

invoice.i_invoice_type

Indicates the type of invoice: 1 – regular, 2 – out of turn, 3 – midterm

invoice.additional_invoices

Sum of out-of-turn invoices for a period

invoice.adjustments

Adjusted amount customer must pay for this period

invoice.amount_due

Current invoice’s due amount

invoice.amount_net

Invoice period’s total amount

invoice.amount_paid

Amount customer already paid

invoice.calls

Sum of charges for all other services

invoice.cust_name

Name of the customer for whom the invoice was issued

invoice.do_not_pay

This indicates that the invoice amount is too low to charge the customer, therefore the invoice amount is added to the next invoice.

invoice.due_date

Due date of the invoice in the format defined by the customer

invoice_due_date_orig

The invoice due date defined in the ISO format (YYYY-MM-DD)

invoice.closed

Indicates whether the invoice is closed (sent to the customer) or not.

invoice.issue_date

Date when an invoice was created, displayed in a format defined by the customer

invoice.issue_date_orig

Date when an invoice was created, displayed in ISO format (YYYY-MM-DD)

invoice.invoice_status_desc

Invoice status description

invoice.is_void

N for normal invoices; Y for voided ones

invoice.iso_4217

Currency

invoice.last_invoice

The amount due from the previous regular invoice

invoice.last_closing_date

Indicates the date the customer was closed after the invocie became overdue

invoice.last_notific_date

Indicates the date the invoice was first sent to the customer

invoice.last_recollect_date

Indicates the date the collection attempt was made (attempt to charge the customer’s credit card on file for the amount due).

invoice.last_resend_date

Indicates the date the invoice was resent to the customer

invoice.last_suspension_date

Indicates the date the customer was suspended after an invoice became overdue

invoice.last_warning_date

Indicates the date the notification email was sent to the customer informing about the service suspension

invoice.manual_charges

Su