diff --git a/dev/setup/codesniffer/ruleset.xml b/dev/setup/codesniffer/ruleset.xml
index b5c1ae5b6a9..2ce66d75739 100644
--- a/dev/setup/codesniffer/ruleset.xml
+++ b/dev/setup/codesniffer/ruleset.xml
@@ -432,5 +432,5 @@
-
+
diff --git a/htdocs/accountancy/journal/purchasesjournal.php b/htdocs/accountancy/journal/purchasesjournal.php
index 54024fe6471..804ccd90a04 100644
--- a/htdocs/accountancy/journal/purchasesjournal.php
+++ b/htdocs/accountancy/journal/purchasesjournal.php
@@ -94,7 +94,7 @@ if (! GETPOSTISSET('date_startmonth') && (empty($date_start) || empty($date_end)
$idpays = $mysoc->country_id;
-$sql = "SELECT f.rowid, f.ref, f.type, f.datef as df, f.libelle,f.ref_supplier, f.date_lim_reglement as dlf, f.close_code,";
+$sql = "SELECT f.rowid, f.ref as ref, f.type, f.datef as df, f.libelle,f.ref_supplier, f.date_lim_reglement as dlf, f.close_code,";
$sql .= " fd.rowid as fdid, fd.description, fd.product_type, fd.total_ht, fd.tva as total_tva, fd.total_localtax1, fd.total_localtax2, fd.tva_tx, fd.total_ttc, fd.vat_src_code,";
$sql .= " s.rowid as socid, s.nom as name, s.fournisseur, s.code_client, s.code_fournisseur, s.code_compta, s.code_compta_fournisseur,";
$sql .= " p.accountancy_code_buy , aa.rowid as fk_compte, aa.account_number as compte, aa.label as label_compte";
diff --git a/htdocs/admin/perms.php b/htdocs/admin/perms.php
index e7cf64d768e..e3ef8417dca 100644
--- a/htdocs/admin/perms.php
+++ b/htdocs/admin/perms.php
@@ -220,4 +220,4 @@ dol_fiche_end();
// End of page
llxFooter();
-$db->close();
\ No newline at end of file
+$db->close();
diff --git a/htdocs/blockedlog/ajax/check_signature.php b/htdocs/blockedlog/ajax/check_signature.php
index 9617e6cd1ef..51a98244c40 100644
--- a/htdocs/blockedlog/ajax/check_signature.php
+++ b/htdocs/blockedlog/ajax/check_signature.php
@@ -57,4 +57,4 @@ $url = $conf->global->BLOCKEDLOG_AUTHORITY_URL.'/blockedlog/ajax/authority.php?s
$res = file_get_contents($url);
//echo $url;
-echo $res;
\ No newline at end of file
+echo $res;
diff --git a/htdocs/comm/mailing/class/mailing.class.php b/htdocs/comm/mailing/class/mailing.class.php
index 7e1073a0f2a..2a6dcde99d4 100644
--- a/htdocs/comm/mailing/class/mailing.class.php
+++ b/htdocs/comm/mailing/class/mailing.class.php
@@ -319,6 +319,7 @@ class Mailing extends CommonObject
if ($result < 0)
{
$this->error=$object->error;
+ $this->errors=array_merge($this->errors, $object->errors);
$error++;
}
diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php
index b3da0634aee..5f8811702b5 100644
--- a/htdocs/comm/propal/class/propal.class.php
+++ b/htdocs/comm/propal/class/propal.class.php
@@ -1285,7 +1285,12 @@ class Propal extends CommonObject
// Create clone
$object->context['createfromclone']='createfromclone';
$result=$object->create($user);
- if ($result < 0) $error++;
+ if ($result < 0)
+ {
+ $this->error = $object->error;
+ $this->errors = array_merge($this->errors, $object->errors);
+ $error++;
+ }
if (! $error)
{
diff --git a/htdocs/compta/cashcontrol/class/cashcontrol.class.php b/htdocs/compta/cashcontrol/class/cashcontrol.class.php
index 946658208df..492d8b79875 100644
--- a/htdocs/compta/cashcontrol/class/cashcontrol.class.php
+++ b/htdocs/compta/cashcontrol/class/cashcontrol.class.php
@@ -426,4 +426,4 @@ class CashControl extends CommonObject
return $result;
}
-}
\ No newline at end of file
+}
diff --git a/htdocs/core/actions_comments.inc.php b/htdocs/core/actions_comments.inc.php
index ee45a035043..83af2cd53cb 100644
--- a/htdocs/core/actions_comments.inc.php
+++ b/htdocs/core/actions_comments.inc.php
@@ -73,4 +73,4 @@ if ($action == 'deletecomment')
$action='';
}
}
-}
\ No newline at end of file
+}
diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php
index 4f1d1d21c02..276aa535c63 100644
--- a/htdocs/core/class/commonobject.class.php
+++ b/htdocs/core/class/commonobject.class.php
@@ -5015,7 +5015,7 @@ abstract class CommonObject
if ($this->array_options[$key] === '') $mandatorypb=true;
if ($mandatorypb)
{
- dol_syslog($this->error);
+ dol_syslog("Mandatory extra field ".$key." is empty");
$this->errors[]=$langs->trans('ErrorFieldRequired', $attributeLabel);
return -1;
}
diff --git a/htdocs/core/class/emailsenderprofile.class.php b/htdocs/core/class/emailsenderprofile.class.php
index 3ce9623a05d..b99a5e708d3 100644
--- a/htdocs/core/class/emailsenderprofile.class.php
+++ b/htdocs/core/class/emailsenderprofile.class.php
@@ -447,4 +447,4 @@ class EmailSenderProfileLine
// @var mixed Sample line property 2
public $prop2;
}
-*/
\ No newline at end of file
+*/
diff --git a/htdocs/core/lib/fiscalyear.lib.php b/htdocs/core/lib/fiscalyear.lib.php
index 6ea24bfacc2..3fb57dd55eb 100644
--- a/htdocs/core/lib/fiscalyear.lib.php
+++ b/htdocs/core/lib/fiscalyear.lib.php
@@ -53,4 +53,4 @@ function fiscalyear_prepare_head(Fiscalyear $object)
complete_head_from_modules($conf,$langs,$object,$head,$h,'fiscalyear','remove');
return $head;
-}
\ No newline at end of file
+}
diff --git a/htdocs/core/modules/modDon.class.php b/htdocs/core/modules/modDon.class.php
index f92c1cea2a5..d30b93a0410 100644
--- a/htdocs/core/modules/modDon.class.php
+++ b/htdocs/core/modules/modDon.class.php
@@ -162,4 +162,4 @@ class modDon extends DolibarrModules
return $this->_init($sql,$options);
}
-}
\ No newline at end of file
+}
diff --git a/htdocs/core/modules/modSupplierProposal.class.php b/htdocs/core/modules/modSupplierProposal.class.php
index 43d42d7b8c3..c61289e2cbf 100644
--- a/htdocs/core/modules/modSupplierProposal.class.php
+++ b/htdocs/core/modules/modSupplierProposal.class.php
@@ -257,4 +257,4 @@ class modSupplierProposal extends DolibarrModules
return $this->_remove($sql, $options);
}
-}
\ No newline at end of file
+}
diff --git a/htdocs/core/modules/reception/doc/doc_generic_reception_odt.modules.php b/htdocs/core/modules/reception/doc/doc_generic_reception_odt.modules.php
index e9b616cb0e2..35271ca7f7d 100644
--- a/htdocs/core/modules/reception/doc/doc_generic_reception_odt.modules.php
+++ b/htdocs/core/modules/reception/doc/doc_generic_reception_odt.modules.php
@@ -519,4 +519,4 @@ class doc_generic_reception_odt extends ModelePdfReception
return -1;
}
-}
\ No newline at end of file
+}
diff --git a/htdocs/core/modules/reception/mod_reception_beryl.php b/htdocs/core/modules/reception/mod_reception_beryl.php
index 071c7f732c3..7665079fd0b 100644
--- a/htdocs/core/modules/reception/mod_reception_beryl.php
+++ b/htdocs/core/modules/reception/mod_reception_beryl.php
@@ -143,4 +143,4 @@ class mod_reception_beryl extends ModelNumRefReception
// phpcs:enable
return $this->getNextValue($objsoc,$objforref);
}
-}
\ No newline at end of file
+}
diff --git a/htdocs/core/modules/reception/mod_reception_moonstone.php b/htdocs/core/modules/reception/mod_reception_moonstone.php
index ae4c4b42b48..a91dcaf5729 100644
--- a/htdocs/core/modules/reception/mod_reception_moonstone.php
+++ b/htdocs/core/modules/reception/mod_reception_moonstone.php
@@ -134,4 +134,4 @@ class mod_reception_moonstone extends ModelNumRefReception
// phpcs:enable
return $this->getNextValue($objsoc,$objforref);
}
-}
\ No newline at end of file
+}
diff --git a/htdocs/core/modules/syslog/logHandler.php b/htdocs/core/modules/syslog/logHandler.php
index fa013f4b083..b2e50933b87 100644
--- a/htdocs/core/modules/syslog/logHandler.php
+++ b/htdocs/core/modules/syslog/logHandler.php
@@ -97,4 +97,4 @@ class LogHandler
{
$this->ident+=$ident;
}
-}
\ No newline at end of file
+}
diff --git a/htdocs/core/modules/syslog/logHandlerInterface.php b/htdocs/core/modules/syslog/logHandlerInterface.php
index 6f59482a1c0..76764a5c8a3 100644
--- a/htdocs/core/modules/syslog/logHandlerInterface.php
+++ b/htdocs/core/modules/syslog/logHandlerInterface.php
@@ -83,4 +83,4 @@ interface LogHandlerInterface
* @return void
*/
public function export($content);
-}
\ No newline at end of file
+}
diff --git a/htdocs/core/modules/syslog/mod_syslog_syslog.php b/htdocs/core/modules/syslog/mod_syslog_syslog.php
index 1f2f499fbac..26232e91ed5 100644
--- a/htdocs/core/modules/syslog/mod_syslog_syslog.php
+++ b/htdocs/core/modules/syslog/mod_syslog_syslog.php
@@ -124,4 +124,4 @@ class mod_syslog_syslog extends LogHandler implements LogHandlerInterface
syslog($content['level'], $content['message']);
closelog();
}
-}
\ No newline at end of file
+}
diff --git a/htdocs/core/tpl/advtarget.tpl.php b/htdocs/core/tpl/advtarget.tpl.php
index af8c99c3fc7..268a971b51c 100644
--- a/htdocs/core/tpl/advtarget.tpl.php
+++ b/htdocs/core/tpl/advtarget.tpl.php
@@ -527,4 +527,4 @@ print '