ADD option MAIN_DONT_KEEP_NOTE_ON_CLONING to remove note on cloning
This commit is contained in:
parent
060452ecf2
commit
2149b155d1
@ -1287,7 +1287,11 @@ class Propal extends CommonObject
|
||||
$object->datep = $now; // deprecated
|
||||
$object->fin_validite = $object->date + ($object->duree_validite * 24 * 3600);
|
||||
if (empty($conf->global->MAIN_KEEP_REF_CUSTOMER_ON_CLONING)) $object->ref_client = '';
|
||||
|
||||
if ($conf->global->MAIN_DONT_KEEP_NOTE_ON_CLONING==1)
|
||||
{
|
||||
$object->note_private = '';
|
||||
$object->note_public = '';
|
||||
}
|
||||
// Create clone
|
||||
$object->context['createfromclone']='createfromclone';
|
||||
$result=$object->create($user);
|
||||
|
||||
@ -1046,6 +1046,11 @@ class Facture extends CommonInvoice
|
||||
$object->close_code = '';
|
||||
$object->close_note = '';
|
||||
$object->products = $object->lines; // For backward compatibility
|
||||
if ($conf->global->MAIN_DONT_KEEP_NOTE_ON_CLONING==1)
|
||||
{
|
||||
$object->note_private = '';
|
||||
$object->note_public = '';
|
||||
}
|
||||
|
||||
// Loop on each line of new invoice
|
||||
foreach($object->lines as $i => $line)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user