Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Page break detection during PDF generation for client invoice module using the Crabe model. #32465

Open
max-ipdev opened this issue Dec 24, 2024 · 0 comments
Labels
Bug This is a bug (something does not work as expected)

Comments

@max-ipdev
Copy link

Bug

When generating invoices with a large number of lines, the last line sometimes extends out of the table and overlaps the footer.

Dolibarr Version

19.0.1

Environment PHP

8.1.30

Environment Database

10.5.26-MariaDB-0+deb11u2

Steps to reproduce the behavior and expected behavior

Generate multiple lines in an invoice to create 10 pages of invoices with line items.
The services should include dates and two lines of descriptions.

We have identified the bug in the Crabe model at line 653 :
image

Fix we are submitting and that works on our end:

	$beforbreakpage = ($this->page_hauteur - $curY - $heightforfooter);
	if (getDolGlobalString('MAIN_PDF_DATA_ON_FIRST_PAGE') && $beforbreakpage > 5) {
		$showpricebeforepagebreak = 1;
	} else {
		$showpricebeforepagebreak = 0;
	}

Attached files

image
image

@max-ipdev max-ipdev added the Bug This is a bug (something does not work as expected) label Dec 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug This is a bug (something does not work as expected)
Projects
None yet
Development

No branches or pull requests

1 participant