A basic core is
{% assign gst_10 = "8cf9d117-3142-4d9c-82ee-b57a0e22c809" %}
{% assign gst_free = "14f63584-be71-40ca-9028-1a60e2e2cc90" %}
{% assign period = transactions | between: report.From, report.To %}
{% assign GST_Purchases = period | taxcode: gst_10, gst_free %}
{% assign GST_PurchaseInvoices = GST_Purchases | group_by: "PurchaseInvoice" %}
{% for e in GST_PurchaseInvoices %}
Purchase invoice level information (Note the Key in this group_by: references a PurchaseInvoice)
{{ e.Key.IssueDate }} {{ e.Key.Description }}
(Assign subtotal counters = 0 here)
Purchase invoice line item information
{% for f in e.Value %}
{{ f.GeneralLedgerAccount.Name }} {{ f.AccountAmount }} {{ f.TaxComponent }}
(add line items to subtotals here)
{% endfor %}
{% endfor %}
A test business for which is Test Localisation (2020-10-15) Group_by.manager (164 KB)