search-icon

This article contains all the MailMerge tables for the financials module. Each table contains MailMerge fields that can be used to edit financial document templates. Please see Template editing for a video tutorial of the template editing process and familiarise yourself with how to Manage Document and Email Templates before editing your templates. Financial document templates can be downloaded from Settings → Document and email templates → Financial


Financial MailMerge fields are used in the following template types: Expense Claims, Expense Claim Receipts.


NOTE: DEAR have a dedicated support team for resolving template issues, don't hesitate to contact DEAR Support for help.


Prerequisites


Table of Contents


Important table structure information

[back to top]


All sections in a template must be contained within TableStart and TableEnd tags. This defines which table the mail merge fields data will be pulled from. 

  • Templates will start and end with the parent TableStart and TableEnd tags, e.g. «TableStart:Purchase» and «TableEnd:Purchase». Child TableStart and TableEnd tags can be placed within the parent tags. 
  • Tables that may have multiple lines generated in them, for example, tables with sale order lines, purchase order lines, or additional Charges, will have TableStart and TableEnd tags within the table itself. e.g. «TableStart:POLines» and «TableEnd:POLines». These are child tags that will be found within the parent tags. 
  • TableStart and TableEnd tags that end in Details (POLineDetails, InvoiceDetails etc.) are for matrix documents, e.g. Purchase Order Matrix, Invoice Matrix. 


If you need to customise standard templates, make sure that the opening tag for any table «TableStart:NAME» has the matching closing tag «TableEnd:NAME», or your template will not work. Try to change the structure as little as possible to preserve the template functionality. 


Parent table fields can be used in child tables but child table fields can only be used within the child table. In the sample table, Purchase is the parent table and POLines is the child table. 


Sample Structure:


«TableStart:Purchase» 

«Company» 

Purchase Order: «PONumber»


#CodeProduct DescriptionSupplier CodeUnitQuantityPriceDiscountAmount
«TableStart:POLines»«ID»«ItemCode»«ItemDescription »«SupplierItemCode »«Unit »«Quantity »«Price »«Discount»%«Total»«TableEnd:POLines »

«TableEnd:Purchase»


The most important thing to remember when making changes to templates is to change the FIELD CODE, not the FIELD NAME


Right-click any <<field name>> and click Toggle Field Codes to show the field code (displayed as {MERGEFIELD field code}). 




Windows users can toggle all field codes by holding down ALT + F9.

Mac users can toggle all field codes by pressing OPTION + F9.


FIELD NAMES: Don't change these.



FIELD CODES: Change these.



Once you have made your changes to the field code, right-click and click Update Field for the changes to take effect. 


Financial MailMerge fields

[back to top]


Financial process MailMerge fields are used in the following template types: Expense Claims, Expense Claim Receipts


Expense Claims

[back to top]


These field codes can be used between the «TableStart:ExpenseClaim» and «TableEnd:ExpenseClaim» tags. This is the parent MailMerge table for expense claim templates. Parent fields can be used anywhere between the parent start and end tags. 


Expense Claim field codes can be used in the Expense Claim document templates.

Field Code

Description

EmployeeName

Employee name for the expense claim.

DueDateExpense claim due date.
EffectiveDateExpense claim effective date.
NotesExpense claim text note.
ClaimTotalSum of cost for all receipts included in expense claim.
ApprovedTotalExpense claim approved amount.
CreatedByUser name who create the expense claim.



Expense Claims Items

[back to top]


These field codes can be used between the «TableStart:Items» and «TableEnd:Items» tags. This is the child MailMerge table for the expense claim template Child fields can only be used between the child table start and end tags. 


Claim Items TableStart tags, TableEnd tags and field codes are used to generate tables where expense claim item lines are displayed. The field codes can be used in the Expense Claim document template.

Field Code

Description

ReceiptNumberReceipt number included in expense claim.
ReceiptDateDate of the receipt.
ReceiptsStatusReceipt status included in expense claim.
ReferenceReceipt reference included in expense claim.
PaidToEmployee name to whom paid to.
ItemNoQuantity of items in receipt items table.

ItemCost

Sum of items cost in receipt items table.



Expense Claim Receipt

[back to top]


These field codes can be used between the «TableStart:ExpenseClaimReceipt» and «TableEnd:ExpenseClaimReceipt» tags. This is the parent MailMerge table for expense claim receipt templates. Parent fields can be used anywhere between the parent start and end tags. 


ExpenseClaimReceipt field codes can be used in the Expense Claim Receipt document templates.

Field Code

Description

ReceiptNumber

Receipt number.

SupplierNameSupplier name for the receipt items.
EmployeeNameEmployee submitting the receipt.
ReceiptDateDate of the receipt.
CurrencyCurrency of the receipt.
TaxRuleTax rule of the receipt.
AccountNameAccount name for the receipt.
AccountCodeAccount code for the receipt.
ReferenceReceipt reference.
CompanyCompany name.
BeforeTax  
Before Tax  Total Amount
TaxTotal  
Tax  Total Amount
TotalAmount  
Total Amount of expense claim



Items

[back to top]


These field codes can be used between the «TableStart:Items» and «TableEnd:Items» tags. This is the child MailMerge table for the expense claim receipt template. This is the child MailMerge table for expense claim receipt templates. Child fields can only be used between the child table start and end tags. 


Receipt Items TableStart tags, TableEnd tags and field codes are used to generate tables where receipt item lines are displayed. The field codes can be used in the Expense Claim Receipt document template.

Field Code

Description

TaxRuleTax rule of the receipt.
AccountNameAccount name for the receipt item.
AccountCodeAccount code for the receipt item.
ReceiptItemDescriptionReceipt item description.

ReceiptItemQuantity

Quantity of receipt item.

ReceiptItemPricePrice of receipt item.
TotalTotal  or receipt item (ItemPrice x ItemQuantity).


Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.