diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index ec28157ee25..ce1758e7591 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -1641,7 +1641,6 @@ class Propal extends CommonObject $this->status = (int) $obj->fk_statut; $this->statut = $this->status; // deprecated - $this->statut_libelle = $obj->statut_label; $this->datec = $this->db->jdate($obj->datec); // TODO deprecated $this->datev = $this->db->jdate($obj->datev); // TODO deprecated diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index c32772380df..d9a7648251c 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -45,6 +45,12 @@ abstract class CommonObject { const TRIGGER_PREFIX = ''; // to be overriden in child class implementations, i.e. 'BILL', 'TASK', 'PROPAL', etc. + + /** + * @var string ID of module. + */ + public $module; + /** * @var DoliDb Database handler (result of a new DoliDB) */ diff --git a/htdocs/core/tpl/objectline_view.tpl.php b/htdocs/core/tpl/objectline_view.tpl.php index 8f81d15cffc..6ef5e3bfb2a 100644 --- a/htdocs/core/tpl/objectline_view.tpl.php +++ b/htdocs/core/tpl/objectline_view.tpl.php @@ -249,7 +249,7 @@ if ($user->hasRight('fournisseur', 'lire') && isset($line->fk_fournprice) && $li } } -if (isModEnabled('accounting') && $line->fk_accounting_account > 0) { +if (isModEnabled('accounting') && !empty($line->fk_accounting_account) && $line->fk_accounting_account > 0) { $accountingaccount = new AccountingAccount($this->db); $accountingaccount->fetch($line->fk_accounting_account); print '

'.$langs->trans('AccountingAffectation').' : '.$accountingaccount->getNomUrl(0, 1, 1); diff --git a/htdocs/supplier_proposal/class/supplier_proposal.class.php b/htdocs/supplier_proposal/class/supplier_proposal.class.php index 4fec294aeaa..47514bb4b2f 100644 --- a/htdocs/supplier_proposal/class/supplier_proposal.class.php +++ b/htdocs/supplier_proposal/class/supplier_proposal.class.php @@ -1259,7 +1259,6 @@ class SupplierProposal extends CommonObject $this->note_public = $obj->note_public; $this->statut = (int) $obj->fk_statut; $this->status = (int) $obj->fk_statut; - $this->statut_libelle = $obj->statut_label; $this->datec = $this->db->jdate($obj->datec); // TODO deprecated $this->datev = $this->db->jdate($obj->datev); // TODO deprecated $this->date_creation = $this->db->jdate($obj->datec); // Creation date