What is the purpose of the article?
This article outlines the different codes that can be used to include Invoice information in templates.
List of template codes for Invoices and a related description
Below is a list of template codes for Invoices and an associated description for each item.
Code |
Description |
{BillingItems} |
Creates a customisable table with billing items. More details below. |
{Payments} |
Creates a customisable table containing recorded payments. More details below. |
{CreditNotes} |
Creates a customisable table with credit notes issued for this invoice. More details below. |
{Debtor.FullName} |
Debtor's details |
{Creditor.Name}/ {Creditor.FullName} |
Creditor's details |
{Today} |
DD/Month/YYYY format |
{Appointment.X} |
X represents any code regarding appointment - please see the relevant article on article codes To use this code type, replace X with the code chosen from the linked article. |
{Appointment.Person.X} |
X represents any code regarding patient - please see the relevant article on patient codes To use this code type, replace X with the code chosen from the linked article. |
{Appointment.Doctor.X} |
X represents any code regarding doctor - please see the relevant article on doctor codes To use this code type, replace X with the code chosen from the linked article. |
AnaesthetistPrice, AuthCode, CompanyName, Date, DepartmentCode, Id, MemberNumber, NominalCode, NonPatientAttendees, Person.FullName, Price, ServiceCode, ServiceName, ServiceType, SurgeonPrice, Vat |
The complete list of columns for billing items - please scroll down for an explanation |
BillingItemId, BillingItemServiceName, Comments, CompanyName, Date, FkType, Id, Net, Total, Type, Vat |
The complete list of columns for credit notes - please scroll down for an explanation |
Amount, CompanyName, Date, Id, MatchedAmount, Method, MethodCode, Refund |
The complete list of columns for payments - please scroll down for an explanation |
Customising the Billing Items, Payments and Credit Notes Tables
Using just the code alone will produce a default table, and its columns will be:
- For {BillingItems}: Date, ServiceCode, ServiceName, NonPatientAttendees (medical attendees), Price, Person.FullName (patient name)
- For {Payments}: Id (payment number), Date, MethodCode, Method, MatchedAmount, Amount, Refund
- For {CreditNotes}: Id (credit note number), Date, Comments, Total (gross), Vat, Net, FkType, Type, BillingItemId (service id), BillingItemServiceName (service name)
Choosing Specific Columns
Of course, you don’t have to stick to the default table look. Add “.Columns:” when you use the billing items, payments or credit notes codes and write the name of the column you wish to display
(after a colon).
Examples: {BillingItems.Columns: Id, Price, CompanyName}
{Payments.Columns: Amount, Date, Id}
{CreditNotes.Columns: BillingItemId, Date, Total}
Changing Column Names
You may decide that some words are more descriptive than others. To change the column name, simply add the new name in brackets after you pick the columns in the code.
Examples: {BillingItems.Columns: Id (Number), Price (Cost), CompanyName (Creditor)}
{Payments.Columns: Amount (How much), Date (When), Id (How)}
{CreditNotes.Columns: BillingItemID (Service number), Date (When), Total (Value)}
Changing Column Width
On the picture above we can see that column width is not consistent. However, we can set it to make our tables look better. We just need to write a number (of pixels) after picking columns in the template code. You can also add custom column names.
Examples: {BillingItems.Columns: Id 400, Price (Cost) 400, CompanyName (Creditor) 400}
{Payments.Columns: Amount 700, Refund 200, Id 200}
{CreditNotes.Columns: BillingItemId 400, Date 400, Total (Value) 400}
More Than One Value in One Column
If you wish to present more than just one value in a column (for example net, vat and total value), simply write them under one ‘block’ divided by commas when you pick columns. Other modifications also apply; custom names, for example.
Example: {BillingItems.Columns: Date Id (Reference), Price ServiceName (Prices and services)}
Adding ‘Totals’ Row
Each of the tables can have an additional ‘Totals’ row added, which will calculate the combined amount of the services appearing on your invoice. This can be achieved when you add “.WithTotals” before “.Columns” in your template code.
Example: {BillingItems.WithTotals.Columns: Date, Price (Prices), ServiceName}
Reverse Order
By default, the table is sorted in descending order by date. You can reverse the order if you wish.
Add “.Reverse” before “.Columns”.
Example: {BillingItems.WithTotals.Reverse.Columns: Date, Price (Prices), ServiceName}
Review date
This article was last updated on 06 Sep 2023 in the context of Meddbase version 1.245.0.31390.