Pdf_aurore.modules.php seems to loose track of supplier references

As you may see from the highlighted section, at a certain point aurore started to fetch my internal reference instead of the supplier’s reference although it exists.

Where you see 1000105, 1000108 and 1000073_85_S Dolibarr should have used the product’s supplier reference.

I checked if these references exist with this supplier and they are defined in the buying prices.

After this page in page 2 after 10 references it reverts to using the supplier’s references.

Any ideas?

OK guys. Just discovered.

Around line 478 where it reads:

pdf_writelinedesc($pdf, $object, $i, $outputlangs, $descWidth, 3, $curX, $curY, $hideref, $hidedesc);

it should have a 1 as the closing argument to pdf_writelinedesc:

pdf_writelinedesc($pdf, $object, $i, $outputlangs, $descWidth, 3, $curX, $curY, $hideref, $hidedesc, 1);

Can anyone put this into github?
I am using Dolibarr 15.0.1 but this seems to be present in v16 still. I just checked the aurore php there.

Thanks,

Hello,

It’s strange because there is the 1 at the end on the V15 branch :

Sorry, I should have been more precise.
It is in line 478 (which is line 486 of your 15.0 repo I guess) of the latest version I am getting it from: dolibarr/pdf_aurore.modules.php at develop · Dolibarr/dolibarr · GitHub

If you put the “, 1” as the last argument of the pdf_writelinedesc in the if, the function will get the right references even if it gets near the end of page. I tried and it is working correctly now.

How did you do that highlighting in your post?

Cheers

Need to add #Lnumber at the end of the link :

https://github.com/Dolibarr/dolibarr/blob/develop/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php#L478

PR is created : FIX : Supplier Reference is lost when page breaks by ksar-ksar · Pull Request #22461 · Dolibarr/dolibarr · GitHub

1 Like

Thanks Ksar for the PR!