Files
wekan/client/components
Lauri Ojansivu ac7c3d93fe Budget and billing: a Product kind of invoice line, and the Shop's invoices use it.
An invoice line was time, a fee or an expense; an order of Board View /
Shop was invoiced as fees. Product is now a kind of its own: a quantity at a
unit price, naming the product card.

- The kinds are one list, INVOICE_LINE_KINDS in models/lib/billing.js, with
  a label key for each kind a line names (LINE_KIND_LABEL_KEYS) and
  isInvoiceLineKind; the invoice schema takes exactly these kinds and the new
  optional quantity and unitMinor of a product line. An unknown kind is
  still refused, by the schema and by the Shop's invoice before it is
  written.
- The Budget and billing page labels a line by that table, so a product
  line reads Product; the draft list styles it like a fee or an expense.
- The e-invoice (UBL 2.1, Peppol BIS 3.0) writes a product as its quantity
  in pieces (UN/ECE H87) at its unit price, and - when the net does not
  divide into a whole unit price - as one unit (C62) at its amount, as a fee
  and an expense are written. Time lines are unchanged.
- The Shop's invoice lines are products, and they add up to the invoice's
  NET: with prices that include VAT the net is shared over the lines in
  proportion to their prices, the rounding remainder on the last line, so
  the lines, net, VAT and total agree on the invoice and in the e-invoice.
  Before, those lines carried the prices with the VAT in them.

Existing fee lines are unchanged, and nothing is migrated: the PDF, SVG,
Excel and CSV write a line by its amount whatever its kind, as before.

Thanks to xet7 !
2026-11-22 21:18:28 +02:00
..