Download as zip, pdf, or txt
Download as zip, pdf, or txt
You are on page 1of 3

TEMPLATE DOCUMENT FOR INVOICE

This is an ODT template document used to generate personalized documents for your customers or
suppliers.

My information:
This is a list of tags that will be replaced with your informations:
mycompany_logo = {mycompany_logo}
mycompany_name = {mycompany_name}
mycompany_address = {mycompany_address}
mycompany_zip = {mycompany_zip}
mycompany_town = {mycompany_town}
mycompany_country = {mycompany_country}
mycompany_country_code = {mycompany_country_code}
mycompany_state = {mycompany_state}
mycompany_state_code = {mycompany_state_code}
mycompany_phone = {mycompany_phone}
mycompany_fax = {mycompany_fax}
mycompany_email = {mycompany_email}
mycompany_web = {mycompany_web}
mycompany_barcode = {mycompany_barcode}
mycompany_capital= {mycompany_capital}
mycompany_juridicalstatus= {mycompany_juridicalstatus}
mycompany_idprof1 = {mycompany_idprof1}
mycompany_idprof2 = {mycompany_idprof2}
mycompany_idprof3 = {mycompany_idprof3}
mycompany_idprof4 = {mycompany_idprof4}
mycompany_idprof5 = {mycompany_idprof5}
mycompany_idprof6 = {mycompany_idprof6}
mycompany_vatnumber = {mycompany_vatnumber}
mycompany_note = {mycompany_note}
...

Customers, prospects or suppliers information:


This is a list of other tags that will be replaced with correct values (tags between {}) :
company_name = {company_name}
company_address = {company_address}
company_zip = {company_zip}
company_town = {company_town}
company_country = {company_country}
company_country_code = {company_country_code}
company_state = {company_state}
company_state_code = {company_state_code}
company_phone = {company_phone}
company_fax = {company_fax}
company_email = {company_email}
company_web = {company_web}
company_barcode = {company_barcode}
company_customercode = {company_customercode}
company_suppliercode = {company_suppliercode}
company_capital = {company_capital}
company_juridicalstatus = {company_juridicalstatus}
company_idprof1 = {company_idprof1}
company_idprof2 = {company_idprof2}
company_idprof3 = {company_idprof3}
company_idprof4 = {company_idprof4}
company_idprof5 = {company_idprof5}
company_idprof6 = {company_idprof6}
company_vatnumber = {company_vatnumber}
company_note = {company_note}

User information:
myuser_lastname = {myuser_lastname}
myuser_firstname = {myuser_firstname}
myuser_login = {myuser_login}
myuser_email = {myuser_email}
...

Object information:
This is a list of other tags that will be replaced with correct values (tags between {}) :
object_id = {object_id}
object_ref = {object_ref}
object_source_invoice_ref = {object_source_invoice_ref}
object_ref_customer = {object_ref_customer}
object_ref_supplier = {object_ref_supplier}
object_date = {object_date}
object_date_limit = {object_date_limit}
object_date_creation = {object_date_creation}
object_date_validation = {object_date_validation}
object_total_ht = {object_total_ht}
object_total_vat = {object_total_vat}
object_total_vat_x = {object_total_vat_x} (x is vat rate, for example 20, 8.5 or 5.99)
object_total_ttc = {object_total_ttc}
object_total_discount_ht = {object_total_discount_ht}
object_payment_mode = {object_payment_mode}
object_payment_mode_code = {object_payment_mode_code}
object_payment_term = {object_payment_term}
object_payment_term_code = {object_payment_term_code}
object_note_private = {object_note_private}
object_note = {object_note}
object_already_payed = {object_already_payed}
object_remain_to_pay = {object_remain_to_pay}
free_text = {free_text}
...

Lines of object:
This is how to use arrays for lines of objects (invoices, commercial proposal, orders, etc...). You
must create your array in the document and fill it with following tags:
[!-- BEGIN row.lines --]
{line_fulldesc}
{line_vatrate}
{line_up}
{line_qty}
{line_discount_percent}
{line_price_ht}
{line_price_vat}
{line_price_ttc}
[!-- END row.lines --]
__Description__ __VatRate__ __UP__ __Q __Discount__ __TotalHT__
ty__
[!-- BEGIN row.lines --] {line_vatrate} {line_up} {lin {line_discount_pe {line_price_ht}
{line_fulldesc} e_qt rcent} [!-- END
y} row.lines --]

For complete list of available tags, see on user documentation about using ODT templates on wiki:
http://wiki.dolibarr.org/index.php/Create_an_ODT_document_template

Example on how to use conditional


[!-- IF {my_var} --]Content we see if my_var is defined[!-- ELSE {my_var} --]Content we see if my_var not
defined[!-- ENDIF {my_var} --]

[!-- IF {object_total_vat_20} --]Content we see if vat 20 is defined[!-- ELSE {object_total_vat_20} --]Content we see if
vat 20 not defined[!-- ENDIF {object_total_vat_20} --]

You might also like