From 32aaab75b57e3d976e93452b1c532e4e29d0a1ff Mon Sep 17 00:00:00 2001 From: HENRY Florian Date: Wed, 10 Jul 2024 18:53:57 +0200 Subject: [PATCH] =?UTF-8?q?fix:=20hidden=20option=20MAIN=5FKEEP=5FREF=5FCU?= =?UTF-8?q?STOMER=5FON=5FCLONING=20always=20win=20on=20pr=E2=80=A6=20(#303?= =?UTF-8?q?40)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: hidden option MAIN_KEEP_REF_CUSTOMER_ON_CLONING always win on propal clone even if it's for enother customer * Update propal.class.php --------- Co-authored-by: Laurent Destailleur --- htdocs/comm/propal/class/propal.class.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index 6daca0f1c99..699ade8172a 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -1415,7 +1415,9 @@ class Propal extends CommonObject } // reset ref_client - $object->ref_client = ''; + if (!getDolGlobalString('MAIN_KEEP_REF_CUSTOMER_ON_CLONING')) { + $object->ref_client = ''; + } // TODO Change product price if multi-prices } else {