<H1><%= %variable_name% ></H1>You can also make function calls from templates and set your own template specific variables:
<% set rate [im_exchange_rate $invoice_date EUR USD] %>or
<%=[lc_time_fmt $calculated_due_date "%e. %B %Y" en_EN]%>
If the resulting string contains XML special characters, you want to make sure that you escape them.
Please note that in the lists below that invoice is meant to refer to all financial documents. Variables are presented alphabetically by variable name.
These variables are useful if you want to refer one or more projects that are related to the given invoice. Please note that you can have 0, 1 or multiple projects related to a single invoice (0 for a "stand-alone" invoice without project, 1 for the standard case of one project per invoice and multiple projects if you choose to do "cumulative invoicing", where you include several (small) projects in a single invoice).
A Financial Document is usually between the "internal company" (please see above) and either a Provider or a Customer, depending on the type of financial document. "Company" in this context refers to this 2nd party, independently of whether it's a customer or a provider.
The following fields contain information about the preferences/default values for the company's payment conditions and templates for different invoice types.
Information about the company's "Office" selected for this invoice. Please note that there can be several Offices per company, so this one refers to the particular office defined in the invoice.
These formats are used on the SQL level to format variables. The format depends on the locale parameter (see above). For further customization (modifying the decimal and thousand separators for a particular locale) you can modify the language definition files in the "catalog" folder of the acs-lang package. Please see the OpenACS documentation for more details.
These are pieces of HTML are already formatted to be included in the InvoiceViewPage and the template. You can customize these elements by using a StyleSheet.
Area |
Variable |
Explanation |
Type |
Example |
Available since Version |
Internal information |
internal_name |
Company name |
Text |
Foo Company |
3.4.0.7.x |
|
internal_address_line1 |
First address line |
Text |
Foo street 1 |
|
|
internal_address_line2 |
Second address line |
Text |
14th floor |
|
|
internal_postal_code |
Postal code |
Text |
D-82008 |
|
|
internal_city |
City |
Text |
Munich |
|
|
internal_country_code |
Country code |
Text |
D |
|
|
internal_phone |
Phone no. |
Text |
+12 123 12345678 |
|
|
internal_fax |
Fax no. |
Text |
+12 123 12345679 |
|
|
internal_primary_contact_email |
E-Mail address of your primary contact |
|
|
|
|
internal_vat_number |
VAT ID-Number |
|
DE1234567890 |
|
Customer information |
company_name |
Company name |
Text |
Big Customer Inc. |
|
|
salutation |
Salutation for contact person |
|
Mr. |
|
|
company_contact_name |
Contact person’s name |
|
Peter Jung
|
|
|
user_position |
Contact person’s position |
|
Manager |
|
|
address_line1 |
Address line 1 |
|
Rich Avenue 1 |
|
|
address_line2 |
Address line 2 |
|
1st – 3rd floor |
|
|
address_postal_code |
Postal code |
|
1500-RICH |
|
|
address_city |
City |
|
Richmond |
|
|
company_path |
Customer no. |
|
12345 |
|
Finance doc information |
invoice_date_pretty |
Invoice date (localized format) |
|
2010-12-31 |
|
|
invoice_nr |
Invoice No. |
|
I2010_0001 |
|
|
ctr |
Counter for invoiced positions |
|
1 |
|
|
item_units_pretty
|
No. of units (localized format)
|
|
1.000 |
|
|
item_uom |
Unit of measurement |
|
Lines, Words, Hours, etc. |
|
|
item_currency
|
Currency of invoice items
|
|
EUR, GBP, USD, etc.
|
|
|
item_name |
Item name |
|
Translation |
|
|
price_per_unit |
Price for one unit (localized format, no currency symbol added)
|
|
10,50 |
|
|
amount_pretty |
Summed amount for this line (localized format, no currency symbol added) |
|
10500,00 |
|
|
vat_perc_pretty |
VAT percentage rate (without %-symbol) |
|
19 |
|
|
vat_amount_pretty |
VAT amount (localized format, no currency symbol) |
|
1.995,00 |
|
|
total_due_pretty; |
Grand total of invoice (localized format, no currency symbol) |
|
12.495,00 |
|
Calle Aprestadora 19, 12o-2a
08902 Hospitalet de Llobregat (Barcelona)
Spain
Tel Europe: +34 609 953 751
Tel US: +1 415 200 2465
Mail: info@project-open.com