diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index d8aed383905..b1503f540d8 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -1212,8 +1212,12 @@ class Commande extends CommonOrder $this->fk_delivery_address = $object->fk_delivery_address; $this->contact_id = $object->contactid; $this->ref_client = $object->ref_client; - $this->note_private = $object->note_private; - $this->note_public = $object->note_public; + + if (! empty($conf->global->MAIN_DISABLE_PROPAGATE_NOTES_FROM_ORIGIN)) + { + $this->note_private = $object->note_private; + $this->note_public = $object->note_public; + } $this->origin = $object->element; $this->origin_id = $object->id; diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 86ee5482261..77f3bd4450a 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -1081,7 +1081,7 @@ class Facture extends CommonInvoice */ function createFromOrder($object, User $user) { - global $hookmanager; + global $conf, $hookmanager; $error=0; @@ -1142,8 +1142,12 @@ class Facture extends CommonInvoice $this->fk_delivery_address = $object->fk_delivery_address; $this->contact_id = $object->contactid; $this->ref_client = $object->ref_client; - $this->note_private = $object->note_private; - $this->note_public = $object->note_public; + + if (! empty($conf->global->MAIN_DISABLE_PROPAGATE_NOTES_FROM_ORIGIN)) + { + $this->note_private = $object->note_private; + $this->note_public = $object->note_public; + } $this->origin = $object->element; $this->origin_id = $object->id; @@ -4402,10 +4406,6 @@ class FactureLigne extends CommonInvoiceLine public $date_start; public $date_end; - // Ne plus utiliser - //var $price; // P.U. HT apres remise % de ligne (exemple 80) - //var $remise; // Montant calcule de la remise % sur PU HT (exemple 20) - // From llx_product /** * @deprecated