Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

print: a .print template cannot group rows or sum over a group - a per-VAT-rate totals block is not expressible

Open
#7,924 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
java
Domain
backend

Research direction

Read modules/parsers/document/README.md lines 200–224 to understand the current table and for syntax. Then trace how document print templates receive document lines and how their bindings are evaluated; the issue does not name implementation files or tests. Done means a unit test in parsers/document renders three VAT-rate groups with exact sums, plus a document integration test prints a mixed-rate invoice.

Written by the indexing model from the issue text.

Description

Problem

A .print template cannot group rows or sum over them. table / for expand per row and accept filter= / match= (modules/parsers/document/README.md:200-224), but there is no group-by and no aggregate. The data a print receives is the document plus its lines, so nothing derives figures per group.

The case that needs it: a Bulgarian (and generally EU) invoice with lines at different VAT rates must show the tax base and the VAT per rate in its totals (e.g. Данъчна основа 20%: 20.58 / ДДС 20%: 4.12 / Данъчна основа 9%: 4.60 / ДДС 9%: 0.41 / Общо: 29.71). Today every document print shows one tax base and one VAT total.

The model-side workaround — one filtered sum roll-up per rate — hard-codes the rates and is currently broken by #7905 (roll-ups sharing (entity, via) coalesce and drop all but one where:).

Proposal

A grouping loop in the print DSL, e.g.

<for source="items" groupBy="VatRate">
  Данъчна основа {{VatRate}}%: {{sum(Net)}}
  ДДС {{VatRate}}%: {{sum(Vat)}}
</for>
  • groupBy= names a row field; one iteration per distinct value, ordered by the value (or orderBy=).
  • Inside, the group key is addressable as itself, sum(<field>) / count() aggregate over the group's rows; plain {{field}} reads the first row of the group.
  • Composes with filter= (applied before grouping).
  • Decimal sums are exact (BigDecimal), formatted like any other number binding.

Verify

A unit test in parsers/document over lines at 20/9/0 % rendering three groups with exact sums, and one document IT printing a mixed-rate invoice.

Dominant language
Java
Stars
278
Forks
97
Avg merge
18h 53m
Merged PRs (30d)
228

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from eclipse-dirigible/dirigible

All issues in eclipse-dirigible/dirigible

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.