Fix $conf not defined
This commit is contained in:
parent
c02cd80b75
commit
3430a88c72
@ -1301,9 +1301,9 @@ class Propal extends CommonObject
|
|||||||
if (empty($conf->global->MAIN_KEEP_REF_CUSTOMER_ON_CLONING)) $object->ref_client = '';
|
if (empty($conf->global->MAIN_KEEP_REF_CUSTOMER_ON_CLONING)) $object->ref_client = '';
|
||||||
if ($conf->global->MAIN_DONT_KEEP_NOTE_ON_CLONING == 1)
|
if ($conf->global->MAIN_DONT_KEEP_NOTE_ON_CLONING == 1)
|
||||||
{
|
{
|
||||||
$object->note_private = '';
|
$object->note_private = '';
|
||||||
$object->note_public = '';
|
$object->note_public = '';
|
||||||
}
|
}
|
||||||
// Create clone
|
// Create clone
|
||||||
$object->context['createfromclone'] = 'createfromclone';
|
$object->context['createfromclone'] = 'createfromclone';
|
||||||
$result = $object->create($user);
|
$result = $object->create($user);
|
||||||
|
|||||||
@ -1006,7 +1006,7 @@ class Facture extends CommonInvoice
|
|||||||
*/
|
*/
|
||||||
public function createFromClone(User $user, $fromid = 0)
|
public function createFromClone(User $user, $fromid = 0)
|
||||||
{
|
{
|
||||||
global $hookmanager;
|
global $conf, $hookmanager;
|
||||||
|
|
||||||
$error = 0;
|
$error = 0;
|
||||||
|
|
||||||
@ -1048,11 +1048,10 @@ class Facture extends CommonInvoice
|
|||||||
$object->close_code = '';
|
$object->close_code = '';
|
||||||
$object->close_note = '';
|
$object->close_note = '';
|
||||||
$object->products = $object->lines; // For backward compatibility
|
$object->products = $object->lines; // For backward compatibility
|
||||||
if ($conf->global->MAIN_DONT_KEEP_NOTE_ON_CLONING == 1)
|
if ($conf->global->MAIN_DONT_KEEP_NOTE_ON_CLONING == 1) {
|
||||||
{
|
$object->note_private = '';
|
||||||
$object->note_private = '';
|
$object->note_public = '';
|
||||||
$object->note_public = '';
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Loop on each line of new invoice
|
// Loop on each line of new invoice
|
||||||
foreach ($object->lines as $i => $line)
|
foreach ($object->lines as $i => $line)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user