# How to implement country-specific report in Manager

**URL:** <https://forum.manager.io/t/how-to-implement-country-specific-report-in-manager/30543>\
**Category:** Uncategorized\
**Created:** [September 13, 2020, 4:13am UTC](https://forum.manager.io/t/how-to-implement-country-specific-report-in-manager/30543 "2020-09-13T04:13:01Z")\
**Posts on this page:** 1\
**Showing post:** 75

<div class="post-metadata">

**Author:** ![Patch](https://avatars.discourse-cdn.com/v4/letter/p/a183cd/32.png) [@Patch](https://forum.manager.io/u/Patch)\
**Post date:** [October 14, 2020, 10:32pm UTC](https://forum.manager.io/t/how-to-implement-country-specific-report-in-manager/30543/75 "2020-10-14T22:32:49Z")

</div>

> [@GrahamvdR](#):
>
> I want the right amounts as per the headers, and I want to see only a single row for each purchase invoice, not for each line item. Is there a way to group by purchase invoice?

`taxcode:`  
In custom report terminology provides a “Where …” search term  
`between:`  
provides “From Until” functionally (which is actually also a database search so analogous to a “Where …” search term)

Managers accounting is all done at the line item level. That is where rounding to smallest legal tender occurs. Invoices, receipts/payments and all other larger entities are all collections of line items.

Any calculations in Manager are done at the line item level, so could be done within your for loop.

To get sub totals use  
`group_by "salesInvoices" `  
Then a for loop to cycle through the sales invoices  
And a for loop within it to cycle through the line items

Repeat the above for `purchaseInvoices` and `receiptsAndPayments`  
I had posted an example of doing this with [an explanation and figures but it got deleted](https://forum.manager.io/t/jobkeeper-topup-and-stp/27902/15).

I don’t believe it is currently possible to re assemble line items into invoices directly as while all the following are accessible, the `lines` database table is not

- Sales invoices `salesInvoices`
- Purchase invoices `purchaseInvoices`
- Receipts/payments `receiptsAndPayments`

My attempts to display them are in the test system in [this post above](https://forum.manager.io/t/how-to-implement-country-specific-report-in-manager/30543/70)

> [@GrahamvdR](#):
>
> Or should I be selecting something other than `tax_inclusive_purchases` from `transactions`

That type of filter is really a data display filter with the prior filters determining what is displayed when drilling down.  
The data display you want I think will require some minor calculations and is not a standard display.

---

_[View the full topic](https://forum.manager.io/t/how-to-implement-country-specific-report-in-manager/30543)._
