Fix remove warning

This commit is contained in:
Laurent Destailleur 2020-11-08 00:18:41 +01:00
parent e2f5a302be
commit a9fbe9dd6c
13 changed files with 20 additions and 19 deletions

View File

@ -1613,7 +1613,6 @@ class Propal extends CommonObject
// Update request
$sql = "UPDATE ".MAIN_DB_PREFIX."propal SET";
$sql .= " ref=".(isset($this->ref) ? "'".$this->db->escape($this->ref)."'" : "null").",";
$sql .= " ref_client=".(isset($this->ref_client) ? "'".$this->db->escape($this->ref_client)."'" : "null").",";
$sql .= " ref_ext=".(isset($this->ref_ext) ? "'".$this->db->escape($this->ref_ext)."'" : "null").",";
@ -1637,7 +1636,6 @@ class Propal extends CommonObject
$sql .= " note_public=".(isset($this->note_public) ? "'".$this->db->escape($this->note_public)."'" : "null").",";
$sql .= " model_pdf=".(isset($this->modelpdf) ? "'".$this->db->escape($this->modelpdf)."'" : "null").",";
$sql .= " import_key=".(isset($this->import_key) ? "'".$this->db->escape($this->import_key)."'" : "null")."";
$sql .= " WHERE rowid=".$this->id;
$this->db->begin();

View File

@ -3918,7 +3918,7 @@ class Commande extends CommonOrder
if (!dol_strlen($modele)) {
$modele = 'einstein';
if ($this->modelpdf) {
if (! empty($this->modelpdf)) {
$modele = $this->modelpdf;
} elseif (!empty($conf->global->COMMANDE_ADDON_PDF)) {
$modele = $conf->global->COMMANDE_ADDON_PDF;

View File

@ -498,7 +498,7 @@ class FactureRec extends CommonInvoice
$sql .= ', f.remise_percent, f.remise_absolue, f.remise';
$sql .= ', f.date_lim_reglement as dlr';
$sql .= ', f.note_private, f.note_public, f.fk_user_author';
$sql .= ', f.modelpdf';
$sql .= ', f.modelpdf as model_pdf';
$sql .= ', f.fk_mode_reglement, f.fk_cond_reglement, f.fk_projet as fk_project';
$sql .= ', f.fk_account';
$sql .= ', f.frequency, f.unit_frequency, f.date_when, f.date_last_gen, f.nb_gen_done, f.nb_gen_max, f.usenewprice, f.auto_validate';
@ -562,7 +562,8 @@ class FactureRec extends CommonInvoice
$this->note_private = $obj->note_private;
$this->note_public = $obj->note_public;
$this->user_author = $obj->fk_user_author;
$this->modelpdf = $obj->modelpdf;
$this->modelpdf = $obj->model_pdf; // deprecatd
$this->model_pdf = $obj->model_pdf;
$this->rang = $obj->rang;
$this->special_code = $obj->special_code;
$this->frequency = $obj->frequency;

View File

@ -641,7 +641,8 @@ class Facture extends CommonInvoice
$sql .= ", ".($this->fk_project ? $this->fk_project : "null");
$sql .= ", ".$this->cond_reglement_id;
$sql .= ", ".$this->mode_reglement_id;
$sql .= ", '".$this->db->idate($this->date_lim_reglement)."', '".$this->db->escape($this->modelpdf)."'";
$sql .= ", '".$this->db->idate($this->date_lim_reglement)."'";
$sql .= " ".(isset($this->modelpdf) ? "'".$this->db->escape($this->modelpdf)."'" : "null");
$sql .= ", ".($this->situation_cycle_ref ? "'".$this->db->escape($this->situation_cycle_ref)."'" : "null");
$sql .= ", ".($this->situation_counter ? "'".$this->db->escape($this->situation_counter)."'" : "null");
$sql .= ", ".($this->situation_final ? $this->situation_final : 0);
@ -1056,7 +1057,8 @@ class Facture extends CommonInvoice
$facture->note_public = $this->note_public;
$facture->note_private = $this->note_private;
$facture->ref_client = $this->ref_client;
$facture->modelpdf = $this->modelpdf;
$facture->modelpdf = $this->modelpdf; // deprecated
$facture->model_pdf = $this->modelpdf;
$facture->fk_project = $this->fk_project;
$facture->cond_reglement_id = $this->cond_reglement_id;
$facture->mode_reglement_id = $this->mode_reglement_id;
@ -4336,7 +4338,7 @@ class Facture extends CommonInvoice
$modele = 'crabe';
$thisTypeConfName = 'FACTURE_ADDON_PDF_'.$this->type;
if ($this->modelpdf) {
if (! empty($this->modelpdf)) {
$modele = $this->modelpdf;
} elseif (!empty($conf->global->$thisTypeConfName)) {
$modele = $conf->global->$thisTypeConfName;

View File

@ -727,7 +727,7 @@ class Contrat extends CommonObject
$this->note_private = $obj->note_private;
$this->note_public = $obj->note_public;
$this->model_pdf = $obj->model_pdf;
$this->modelpdf = $obj->model_pdf;
$this->modelpdf = $obj->model_pdf; // deprecated
$this->fk_projet = $obj->fk_project; // deprecated
$this->fk_project = $obj->fk_project;
@ -2419,7 +2419,7 @@ class Contrat extends CommonObject
if (!dol_strlen($modele)) {
$modele = 'strato';
if ($this->modelpdf) {
if (! empty($this->modelpdf)) {
$modele = $this->modelpdf;
} elseif (!empty($conf->global->CONTRACT_ADDON_PDF)) {
$modele = $conf->global->CONTRACT_ADDON_PDF;

View File

@ -2495,7 +2495,7 @@ class Expedition extends CommonObject
if (!dol_strlen($modele)) {
$modele = 'rouget';
if ($this->modelpdf) {
if (! empty($this->modelpdf)) {
$modele = $this->modelpdf;
} elseif (!empty($conf->global->EXPEDITION_ADDON_PDF)) {
$modele = $conf->global->EXPEDITION_ADDON_PDF;

View File

@ -2207,7 +2207,7 @@ class ExpenseReport extends CommonObject
$langs->load("trips");
if (!dol_strlen($modele)) {
if ($this->modelpdf) {
if (! empty($this->modelpdf)) {
$modele = $this->modelpdf;
} elseif (!empty($conf->global->EXPENSEREPORT_ADDON_PDF)) {
$modele = $conf->global->EXPENSEREPORT_ADDON_PDF;

View File

@ -689,7 +689,7 @@ class Fichinter extends CommonObject
if (!dol_strlen($modele)) {
$modele = 'soleil';
if ($this->modelpdf) {
if (! empty($this->modelpdf)) {
$modele = $this->modelpdf;
} elseif (!empty($conf->global->FICHEINTER_ADDON_PDF)) {
$modele = $conf->global->FICHEINTER_ADDON_PDF;

View File

@ -281,7 +281,7 @@ class FichinterRec extends Fichinter
$this->note_public = $obj->note_public;
$this->user_author = $obj->fk_user_author;
$this->model_pdf = $obj->model_pdf;
$this->modelpdf = $obj->model_pdf;
$this->modelpdf = $obj->model_pdf; // deprecated
$this->rang = $obj->rang;
$this->special_code = $obj->special_code;
$this->frequency = $obj->frequency;

View File

@ -1900,7 +1900,7 @@ class Task extends CommonObject
if (!dol_strlen($modele)) {
$modele = 'nodefault';
if ($this->modelpdf) {
if (! empty($this->modelpdf)) {
$modele = $this->modelpdf;
} elseif (!empty($conf->global->PROJECT_TASK_ADDON_PDF)) {
$modele = $conf->global->PROJECT_TASK_ADDON_PDF;

View File

@ -1008,7 +1008,7 @@ class RecruitmentCandidature extends CommonObject
if (!dol_strlen($modele)) {
$modele = 'standard_recruitmentcandidature';
if ($this->modelpdf) {
if (!empty($this->modelpdf)) {
$modele = $this->modelpdf;
} elseif (!empty($conf->global->RECRUITMENTCANDIDATURE_ADDON_PDF)) {
$modele = $conf->global->RECRUITMENTCANDIDATURE_ADDON_PDF;

View File

@ -1660,7 +1660,7 @@ class Societe extends CommonObject
$this->note_private = $obj->note_private;
$this->note_public = $obj->note_public;
$this->model_pdf = $obj->model_pdf;
$this->modelpdf = $obj->model_pdf;
$this->modelpdf = $obj->model_pdf; // deprecated
$this->default_lang = $obj->default_lang;
$this->logo = $obj->logo;
$this->logo_squarred = $obj->logo_squarred;

View File

@ -1699,13 +1699,13 @@ class SupplierProposal extends CommonObject
$resql = $this->db->query($sql);
if ($resql)
{
$modelpdf = $conf->global->SUPPLIER_PROPOSAL_ADDON_PDF_ODT_CLOSED ? $conf->global->SUPPLIER_PROPOSAL_ADDON_PDF_ODT_CLOSED : $this->modelpdf;
$modelpdf = $conf->global->SUPPLIER_PROPOSAL_ADDON_PDF_ODT_CLOSED ? $conf->global->SUPPLIER_PROPOSAL_ADDON_PDF_ODT_CLOSED : (empty($this->modelpdf) ? '' : $this->modelpdf);
$triggerName = 'PROPOSAL_SUPPLIER_CLOSE_REFUSED';
if ($status == 2)
{
$triggerName = 'PROPOSAL_SUPPLIER_CLOSE_SIGNED';
$modelpdf = $conf->global->SUPPLIER_PROPOSAL_ADDON_PDF_ODT_TOBILL ? $conf->global->SUPPLIER_PROPOSAL_ADDON_PDF_ODT_TOBILL : $this->modelpdf;
$modelpdf = $conf->global->SUPPLIER_PROPOSAL_ADDON_PDF_ODT_TOBILL ? $conf->global->SUPPLIER_PROPOSAL_ADDON_PDF_ODT_TOBILL : (empty($this->modelpdf) ? '' : $this->modelpdf);
if (!empty($conf->global->SUPPLIER_PROPOSAL_UPDATE_PRICE_ON_SUPPlIER_PROPOSAL)) // TODO This option was not tested correctly. Error if product ref does not exists
{