Browse Source

fix: hidden option MAIN_KEEP_REF_CUSTOMER_ON_CLONING always win on pr… (#30340)

* 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 <eldy@destailleur.fr>
HENRY Florian 11 months ago
parent
commit
32aaab75b5
1 changed files with 3 additions and 1 deletions
  1. 3 1
      htdocs/comm/propal/class/propal.class.php

+ 3 - 1
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 {