Manager includes programming framework which allows to create variety of highly-customizable reports. This framework is primarily used to implement country-specific reports.
Currently, Manager includes 9 country-specific reports but there are almost 200 countries and every country has several country-specific reports which businesses require.
The goal of this framework is to allow community from around the world to author and submit these reports so they can be merged with the program (just like translations are at the moment) and can benefit everyone using the program.
This topic serves as a reference guide how to author country-specific report.
Getting Started
Go to Settings
tab, then Report Transformations
and create New Report Transformation
.
Name it Test
and put something into Script
field such as Testing 123
.
After you create this report transformation, go to Reports
tab and you will see Test
report in the list of reports.
You can create the report under Test
and view it.
You will get:
The report doesnât do anything. It just prints what you have entered into Script
field. This is not very useful but itâs a good start.
Script
Typically, you want your report to pull some figures from general ledger and show them (e.g. tax totals)
Script
field accepts Liquid markup
The most important variable is {{ transactions }}
which represents general ledger. Go ahead and edit Report transformation
and put {{ transactions }}
into Script
field.
Then view your report under Reports
tab.
You will see zero which is clickable.
Clicking on zero will show you all general ledger transactions in your business and the number is zero because sum of all general ledger transactions is zero (double-entry accounting principle)
This is still not very useful but we are getting somewhereâŚ
Letâs say we do not want all transactions, we want only transactions for specific tax code. This is where liquid filters come into picture.
First we need to get GUID
identifier of the tax code. Go to Tax Codes
and click Edit
on tax code you are interested in. Look into top-right corner to find its GUID
.
Copy and paste it to avoid typo. Now that we have the tax code identifier, we can use it in our script like this:
Or we can make the code more readable by assigning tax code identifier to a variable and then using the variable like this:
Now when I view my report, I will see:
This is because the balance of all transactions with tax code VAT 20%
is credit 2,000.
You can click on the amount to see which transactions are behind the balance.
You will notice there is a problem. It shows transactions with your tax code for entire history of the business but we typically only want transactions for the period of time.
This is where new variables called {{ report.From }}
and {{ report.To }}
come into picture. You can apply another filter to get transactions only between those two dates like this:
Notice between: report.From, report.To
filter.
This will give us tax inclusive total of transactions subject to VAT 20%
.
If you want only tax amounts on sales subject to VAT 20%
, then youâd write something like this:
Notice tax_on_sales
filter.
There are more filters you can use such as:
- tax_amount
- tax_exclusive_amount
- tax_on_purchases
- tax_exclusive_sales
- tax_exclusive_purchases
- tax_inclusive_sales
- tax_inclusive_purchases
- group_by_supplier
- group_by_employee
- where_payslip_earnings_item
- where_payslip_deduction_item
- where_payslip_contribution_item
- reverse_sign
More filters will be implemented, these are currently supported as they were needed for already implemented country-specific reports.
Real-world examples
The report should not just display the figures, it should be also professionally presented. For example, this is how real-world example would look like for Australian Business Activity Statement
where tax office requires:
- Total sales including any GST 10%
- Tax on GST 10% on sales
- Tax on GST 10% on purchases
- Total salary & wages
- Payroll tax withheld
Notice how script will define variables which are then used in Layout
section.
You can have a look at more real-world examples by importing report transformations for various countries which have been already implemented.
Submissions
Would you like to implement country-specific report for your country and make it part of Manager?
Great! Iâm still working on submission system where you will be able to submit your demo file with country-specific report. For the time being, feel free to experiment with the framework and see what you can create.