Template Codes - Invoices

Article author
Kacper Gladys
  • Updated

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.Name}
{Debtor.Primary.Contact.Name}
{Debtor.Address}
{Debtor.AddressOneLine}
{Debtor.BillingAddress}
{Debtor.BillingAddressOneLine}
{Debtor.Logo}
{Debtor.LogoSmall}
{Debtor.LogoMedium}
{Debtor.LogoLarge}
{Debtor.LogoMax}

Debtor's details
(either patient or company)

{Creditor.Name}
{Creditor.Address}
{Creditor.AddressOneLine}
{Creditor.BillingAddress}
{Creditor.BillingAddressOneLine}
{Creditor.Logo}
{Creditor.LogoSmall}
{Creditor.LogoMedium}
{Creditor.LogoLarge}
{Creditor.LogoMax}

Creditor's details

{Today}
{Date Created}
{DateSent}
{Number}
{PageNumber}
{Comments}
{Balance}
{Paid}
{Total}
{TotalIncVat}
{Doctor}

DD/Month/YYYY format
Invoice - date created
Invoice - date sent
Invoice number
Current page number
Notes section of an invoice
Balance regarding this invoice
Amount paid
Net value
Gross Value
Medical attendee's ID

{Appointment.X}

X represents any code regarding appointment - please see the relevant article on article codes

{Appointment.Person.X}

X represents any code regarding patient - please see the relevant article on patient codes

{Appointment.Doctor.X}

X represents any code regarding doctor - please see the relevant article on doctor codes

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:

  1. For {BillingItems}: Date, ServiceCode, ServiceName, NonPatientAttendees (medical attendees), Price, Person.FullName (patient name)
  2. For {Payments}: Id (payment number), Date, MethodCode, Method, MatchedAmount, Amount, Refund
  3. For {CreditNotes}: Id (credit note number), Date, Comments, Total (gross), Vat, Net, FkType, Type, BillingItemId (service id), BillingItemServiceName (service name)

1_-_Example_of_default_table_in_invoice_doc_containing_billing_items_-_payments_and_credit_notes.png

 

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}

2_-_Example_of_specific_table_in_invoice_doc_with_defined_column_header_names.png

 

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)}

3_-_Example_of_specific_table_in_invoice_doc_with_new_column_header_names.png

 

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}

4_-_Example_of_specific_table_in_invoice_doc_with_changed_column_widths.png

 

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)}

5_-_Example_of_specific_table_in_invoice_doc_with_more_than_1_value_in_1_column.png

 

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}

6_-_Example_of_specific_table_in_invoice_doc_with_total_row.png

 

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}

7_-_Example_of_specific_table_in_invoice_doc_with_items_in_reverse_order.png

 

Review date


This article was last updated on 27 June 2021 in the context of Meddbase version 1.245.0.31390.