Fix $conf not defined

This commit is contained in:
Laurent Destailleur 2019-11-12 10:13:22 +01:00
parent c02cd80b75
commit 3430a88c72
2 changed files with 8 additions and 9 deletions

View File

@ -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,8 +1048,7 @@ 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 = '';
} }