# Cloning client ref or making client ref mandatory

**URL:** <https://www.dolibarr.org/forum/t/cloning-client-ref-or-making-client-ref-mandatory/31439>\
**Category:** Using my Dolibarr\
**Tags:** Issue, Invoices\
**Created:** [October 29, 2026, 4:17pm UTC](https://www.dolibarr.org/forum/t/cloning-client-ref-or-making-client-ref-mandatory/31439 "2026-10-29T16:17:14Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![dennis.u](https://www.dolibarr.org/forum/letter_avatar_proxy/v4/letter/d/f08c70/32.png) [@dennis.u](https://www.dolibarr.org/forum/u/dennis.u)\
**Post date:** [October 29, 2026, 4:17pm UTC](https://www.dolibarr.org/forum/t/cloning-client-ref-or-making-client-ref-mandatory/31439/1 "2026-10-29T16:17:14Z")

</div>

Hey there,

since ages, we clone previous invoices (interim invoices for a large engagement) and therefore we had annotations and client reference copied. Since one of the last updates, the client ref is not cloned anymore.

Is there a way to re-get this behavior OR to have client ref as a mandatory field OR to give at least a warning, if there is no client ref?

Some institutions deny invoices without their reference (understandable), which means, it takes longer to have a paid invoice…

---

<div class="post-metadata">

**Author:** ![jonbendtsen](https://www.dolibarr.org/forum/letter_avatar_proxy/v4/letter/j/977dab/32.png) [@jonbendtsen](https://www.dolibarr.org/forum/u/jonbendtsen)\
**Post date:** [October 29, 2026, 9:05pm UTC](https://www.dolibarr.org/forum/t/cloning-client-ref-or-making-client-ref-mandatory/31439/2 "2026-10-29T21:05:49Z")

</div>

which Dolibarr version @dennis.u ?

---

<div class="post-metadata">

**Author:** ![dennis.u](https://www.dolibarr.org/forum/letter_avatar_proxy/v4/letter/d/f08c70/32.png) [@dennis.u](https://www.dolibarr.org/forum/u/dennis.u)\
**Post date:** [October 29, 2026, 9:25pm UTC](https://www.dolibarr.org/forum/t/cloning-client-ref-or-making-client-ref-mandatory/31439/3 "2026-10-29T21:25:10Z")

</div>

Hey,

we have 24.0.1 in place.

---

<div class="post-metadata">

**Author:** ![Steph501](https://www.dolibarr.org/forum/user_avatar/www.dolibarr.org/steph501/32/9360_2.png) [@Steph501](https://www.dolibarr.org/forum/u/Steph501)\
**Post date:** [October 30, 2026, 8:58am UTC](https://www.dolibarr.org/forum/t/cloning-client-ref-or-making-client-ref-mandatory/31439/4 "2026-10-30T08:58:01Z")

</div>

Hi,

Dolibarr has never copied the customer reference when cloning an invoice, except by mistake between versions 17.0.4 and 21.0.1. This was fixed in 21.0.2.

I think each user should be able to choose whether the customer reference is kept, depending on their own use. I will propose a pull request to Dolibarr for this and post the link here.

Edit : Here is the pull request: [FIX Customer invoice clone ignores MAIN\_KEEP\_REF\_CUSTOMER\_ON\_CLONING by Steph501 · Pull Request #42409 · Dolibarr/dolibarr · GitHub](https://github.com/Dolibarr/dolibarr/pull/42409)  
Once it is accepted and your Dolibarr is updated, go to Setup \> Other Setup and add the constant MAIN\_KEEP\_REF\_CUSTOMER\_ON\_CLONING with value 1. Your cloned invoices will then keep the customer reference again.

I will also propose, for version 25, a “Customer reference?” checkbox in the clone window, so you can choose for each clone.

---

<div class="post-metadata">

**Author:** ![dennis.u](https://www.dolibarr.org/forum/letter_avatar_proxy/v4/letter/d/f08c70/32.png) [@dennis.u](https://www.dolibarr.org/forum/u/dennis.u)\
**Post date:** [November 3, 2026, 8:31pm UTC](https://www.dolibarr.org/forum/t/cloning-client-ref-or-making-client-ref-mandatory/31439/5 "2026-11-03T20:31:47Z")

</div>

Perfect solution.

Excuse me, we didn’t know, that this was indeed a bug, not a feature.

Honestly, we run Dolibarr for a large amount of time between these two releases and did a big jump due to XML invoice plugin installation needed recently.
