2
0
forked from Wavyzz/dolibarr

Fix warning

This commit is contained in:
Laurent Destailleur
2023-07-01 13:07:14 +02:00
parent 0397211a93
commit 15b7f736a7
4 changed files with 7 additions and 3 deletions

View File

@@ -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

View File

@@ -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)
*/

View File

@@ -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 '<div class="clearboth"></div><br><span class="opacitymedium">'.$langs->trans('AccountingAffectation').' : </span>'.$accountingaccount->getNomUrl(0, 1, 1);

View File

@@ -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