# Pdf\_aurore.modules.php seems to loose track of supplier references

**URL:** <https://www.dolibarr.org/forum/t/pdf-aurore-modules-php-seems-to-loose-track-of-supplier-references/22856>\
**Category:** Using my Dolibarr\
**Created:** [September 29, 2022, 4:00pm UTC](https://www.dolibarr.org/forum/t/pdf-aurore-modules-php-seems-to-loose-track-of-supplier-references/22856 "2022-09-29T16:00:36Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Peterromao](https://www.dolibarr.org/forum/letter_avatar_proxy/v4/letter/p/e0b2c6/32.png) [@Peterromao](https://www.dolibarr.org/forum/u/Peterromao)\
**Post date:** [September 29, 2022, 4:00pm UTC](https://www.dolibarr.org/forum/t/pdf-aurore-modules-php-seems-to-loose-track-of-supplier-references/22856/1 "2022-09-29T16:00:36Z")

</div>

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?

 ![image](https://www.dolibarr.org/forum/uploads/dolibarrorg/original/2X/e/e4dcf6eafa0c5201c17df0cbf7ba20dbbca1df28.png)

---

<div class="post-metadata">

**Author:** ![Peterromao](https://www.dolibarr.org/forum/letter_avatar_proxy/v4/letter/p/e0b2c6/32.png) [@Peterromao](https://www.dolibarr.org/forum/u/Peterromao)\
**Post date:** [September 29, 2022, 4:37pm UTC](https://www.dolibarr.org/forum/t/pdf-aurore-modules-php-seems-to-loose-track-of-supplier-references/22856/2 "2022-09-29T16:37:11Z")

</div>

OK guys. Just discovered.

Around line 478 where it reads:

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

```

it should have a 1 as the closing argument to pdf\_writelinedesc:

```auto
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,

---

<div class="post-metadata">

**Author:** ![ksar](https://www.dolibarr.org/forum/user_avatar/www.dolibarr.org/ksar/32/514_2.png) [@ksar](https://www.dolibarr.org/forum/u/ksar)\
**Post date:** [September 29, 2022, 8:21pm UTC](https://www.dolibarr.org/forum/t/pdf-aurore-modules-php-seems-to-loose-track-of-supplier-references/22856/3 "2022-09-29T20:21:13Z")

</div>

Hello,

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

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

---

<div class="post-metadata">

**Author:** ![Peterromao](https://www.dolibarr.org/forum/letter_avatar_proxy/v4/letter/p/e0b2c6/32.png) [@Peterromao](https://www.dolibarr.org/forum/u/Peterromao)\
**Post date:** [September 29, 2022, 8:36pm UTC](https://www.dolibarr.org/forum/t/pdf-aurore-modules-php-seems-to-loose-track-of-supplier-references/22856/4 "2022-09-29T20:36:49Z")

</div>

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](https://github.com/Dolibarr/dolibarr/blob/develop/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php)

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.

 ![image](https://www.dolibarr.org/forum/uploads/dolibarrorg/original/2X/4/4b198b21511de0934405879b3322d186983fed67.png)

How did you do that highlighting in your post?

Cheers

---

<div class="post-metadata">

**Author:** ![ksar](https://www.dolibarr.org/forum/user_avatar/www.dolibarr.org/ksar/32/514_2.png) [@ksar](https://www.dolibarr.org/forum/u/ksar)\
**Post date:** [September 29, 2022, 8:54pm UTC](https://www.dolibarr.org/forum/t/pdf-aurore-modules-php-seems-to-loose-track-of-supplier-references/22856/5 "2022-09-29T20:54:42Z")

</div>

> [@Peterromao](#):
>
> How did you do that highlighting in your post?

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**

> <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](https://github.com/Dolibarr/dolibarr/pull/22461)

---

<div class="post-metadata">

**Author:** ![Peterromao](https://www.dolibarr.org/forum/letter_avatar_proxy/v4/letter/p/e0b2c6/32.png) [@Peterromao](https://www.dolibarr.org/forum/u/Peterromao)\
**Post date:** [September 29, 2022, 9:11pm UTC](https://www.dolibarr.org/forum/t/pdf-aurore-modules-php-seems-to-loose-track-of-supplier-references/22856/6 "2022-09-29T21:11:52Z")

</div>

Thanks Ksar for the PR!
