Skip to content

fix: octopus PDF model with public note and subtotal - #39527

Open
thomastraversierpro-alt wants to merge 6 commits into
Dolibarr:23.0from
thomastraversierpro-alt:23_fix_octopus
Open

fix: octopus PDF model with public note and subtotal#39527
thomastraversierpro-alt wants to merge 6 commits into
Dolibarr:23.0from
thomastraversierpro-alt:23_fix_octopus

Conversation

@thomastraversierpro-alt

@thomastraversierpro-alt thomastraversierpro-alt commented Aug 14, 2026

Copy link
Copy Markdown

FIX Octopus invoice PDF model: public note position, page break and Subtotals support

Three issues fixed in pdf_octopus.modules.php:

  • The public note was printed in the middle of the page instead of its standard position, above the invoice lines table.
  • On multi-page invoices, the first line of each new page overlapped the column headers of the table.
  • The model was not compatible with the Subtotals module: title lines printed meaningless 0 values in the amount columns, and subtotal lines were neither displayed nor computed.
  • The VAT-by-rate table in the Octopus PDF template always displayed "VAT 0%" instead of the actual rate/amount, due to a locally rebuilt VAT array (plain floats) being read afterwards as an associative array.
  • The "Reste à payer HT" label in the situation recap was misleading, as the displayed value is actually the TTC amount net of retained warranty. Renamed to "Reste à payer" (FR) / "Remainder to pay".

Before

image image image

After

image image image

// blanks the standard columns through its hooks (pdf_getlineqty, pdf_getlineprogress, ...),
// but it knows nothing about the BTP situation columns added below. Its title, subtotal and
// free text lines carry no amount either, so they must be detected here too.
$usecustomsubtotal = isModEnabled('subtotal');

@frederic34 frederic34 Aug 14, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it a fix for an external module (subtotal) ?

perhaps make separate PR for each problem's fix

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR now only covers the standard subtotals module, the custom one has been
removed from it.

@thomastraversierpro-alt
thomastraversierpro-alt marked this pull request as ready for review August 17, 2026 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants