Skip to content

anafpy 0.13.2 — the goods table keeps to its columns

Latest

Choose a tag to compare

@github-actions github-actions released this 31 Aug 12:21
· 1 commit to main since this release

Reported from an actual filing (issue #13): a goods line described as
"Rafturi metalice paleti STOW (uzate, demontate) - 12 stalpi, 120 traverse"
printed straight over the Scop and Cod NC columns of the A4 detail
document, and the tariff code underneath it came out unreadable. That is the
column a customs officer reads, on the document that travels to the partner
company.

The cause was not the data. fpdf2's cell neither wraps nor clips — it draws
text past the column edge and keeps going — and every cell in the goods table
was one. A short description hid it; 70 characters is an ordinary way to name a
pallet of dismantled racking.

Each column is now typeset by what it carries:

  • Denumire marfă and Scop wrap. They hold the caller's (and ANAF's) prose,
    of no bounded length, so they break inside their own width and the row takes
    the depth of the deeper one. A single unbroken 60-character token breaks by
    character rather than escaping the column.
  • The codes and figures fit-shrink. They have no word to break on, so an
    over-wide quantity steps down in size — to 5.5pt at worst — instead of
    printing over Net (kg). A quantity is one reading and belongs on one line.
  • A row that would cross the bottom margin moves to the next page whole, and
    takes the column strip with it. The table previously continued overleaf with
    no headings above it, which left a page of eight bare numbers.

A short description renders exactly as before — same row height, same rules,
same positions. The columns beside the description keep their places whatever
is in it, which is the whole of the fix.

The driver card is unaffected; it has no columns.

Also in this release

design/ gains uit-details-long-goods, the state that was missing: a goods
table pushed along both of its unbounded axes, with descriptions wider than
their column over enough lines to break the page. The gallery renders from the
shipped renderer, so it is where this class of bug is meant to be seen before it
is reported.

Full changelog: v0.13.1...v0.13.2