don't reset ref_client if same customer and MAIN_KEEP_REF_CUSTOMER_ON_CLONING

This commit is contained in:
Christophe Battarel 2014-01-16 11:48:48 +01:00
parent 687fc1798b
commit 7d04944ca7

View File

@ -939,6 +939,9 @@ class Propal extends CommonObject
$this->fk_delivery_address = '';
}
// reset ref_client
$this->ref_client = '';
// TODO Change product price if multi-prices
}
else
@ -961,7 +964,7 @@ class Propal extends CommonObject
$this->date = $now;
$this->datep = $now; // deprecated
$this->fin_validite = $this->date + ($this->duree_validite * 24 * 3600);
$this->ref_client = '';
if (empty(MAIN_KEEP_REF_CUSTOMER_ON_CLONING)) $this->ref_client = '';
// Set ref
require_once DOL_DOCUMENT_ROOT ."/core/modules/propale/".$conf->global->PROPALE_ADDON.'.php';