Navigation:  »No topics above this level«

Macros (Variables)

Previous pageReturn to chapter overviewNext page

Macros are bits of text you can include in the various text files kBilling® deals with that are replaced with "real" values.

If you're using recurring invoices be sure to check out the Recurring Invoices chapter for additional macros that are supported for recurring invoices.

The Bill To and Ship To default format boxes are the two most important areas where these macros play a role. The default format for billing/shipping addresses is the US format (shown in the screenshot below).

 

* don't click on this - it's just an image!

 

To open the address formatting options, click the Edit menu, then Settings, then click the Invoice Templates tab.

 

As you can see, the Bill To and Ship To formats use these variables. When an invoice is saved, the variables in that format are replaced with the "real" values from the invoice.

 

The following variables are available:

<customer_name> - The name of the customer as entered on the Customer Name box.
<bill_name> - The name of the customer as entered on the Bill To tab, name box.
<ship_name> - The name in the "Ship To Name" box
<invoice_number> - The invoice number
<bill_street1> - The billing address street 1 portion
<bill_street2> - The billing address street 2 portion
<bill_city> - The billing address city portion
<bill_state> - The billing address state portion
<bill_zip> - The billing address zip (or postal code) portion
<bill_country> - The billing address country portion
<ship_name> - The shipping address country portion
<ship_street1> - The shipping address street 1 portion
<ship_street2> - The shipping address street 2 portion
<ship_city> - The shipping address city portion
<ship_state> - The shipping address state portion
<ship_zip> - The shipping address zip (or postal code) portion
<ship_country> - The shipping address country portion
<invoice_date> - The invoice date (as selected)
<invoice_due_date> - The invoice's due date
<invoice_payment_terms> - The invoice's payment terms
<invoice_subtotal> - The invoice's subtotal
<invoice_total> - The invoice's total
<invoice_balance_due> - The invoice's balance due
<invoice_shipping> - The invoice's shipping cost
<invoice_tax1> - The invoice's tax 1
<invoice_tax2> - The invoice's tax 2
<past_due_notice> - Include in the invoice email body or subject, and if the invoice is past due it will contain the text "PAST DUE". Blank if the invoice is not past due.

 

If you selected the customer from the drop-down menu on the invoice then these additional variables are available:

<contact_name> - The contact name of the associated customer.
<cc_name>- The name on the credit card on file of the associated customer.
<cc_number>- The The last 4 digits of the credit card on file.
<cc_exp_month>- The expiration month of the customer's credit card.
<cc_exp_year>- The expiration year of the customer's credit card.
<contact_title> - The contact title of the customer.
<contact_email> - The contact email of the customer.
<contact_ph1> - The contact phone 1 of the customer.
<contact_ph2> - The contact phone 2 of the customer.
<contact_fax> - The contact fax of the customer.
<customer_notes> - Customer notes.
<credit> - The amount of credit on a customer's account.
<customer_balance> - Total balance of the customer's account.
<customer_number> - The customer number of the customer's account.
<current_eng_short_month> - Nov, Oct, Dec, etc..
<current_eng_long_month> - November, October, December, etc...
<current_num_month> - 01, 02, 03, etc
<current_eng_short_day> - Mon, Tues, Wed, etc...
<current_eng_long_day> - Monday, Tuesday, Wednesday, etc...
<current_num_day> - 1,2,3,4,5,6,7...
<current_year> - 2009 (which changes automatically of course!)

 

An additional example of using these variables is in the default email text: