diff --git a/htdocs/accountancy/index.php b/htdocs/accountancy/index.php
index 1277098fe69..8892c9af9f7 100644
--- a/htdocs/accountancy/index.php
+++ b/htdocs/accountancy/index.php
@@ -109,10 +109,10 @@ if ($conf->accounting->enabled) {
print load_fiche_titre($langs->trans("AccountancyArea"), $resultboxes['selectboxlist'], 'accountancy', 0, '', '', $showtutorial);
- print '
'; // hideobject is to start hidden
- print "
\n";
- print '
'.$langs->trans("AccountancyAreaDescIntro")."\n";
- if (!empty($user->rights->accounting->chartofaccount)){
+ print '
'; // hideobject is to start hidden
+ print "
\n";
+ print ''.$langs->trans("AccountancyAreaDescIntro")."
\n";
+ if (!empty($user->rights->accounting->chartofaccount)) {
print "
\n"; print "
\n";
print load_fiche_titre(' '.$langs->trans("AccountancyAreaDescActionOnce"), '', '')."\n";
@@ -181,7 +181,6 @@ if ($conf->accounting->enabled) {
print $s;
print "
\n";
-
print '
';
}
diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php
index 226af3a96ee..58da30ad205 100644
--- a/htdocs/compta/facture/class/facture.class.php
+++ b/htdocs/compta/facture/class/facture.class.php
@@ -2660,8 +2660,7 @@ class Facture extends CommonInvoice
// Check for mandatory fields in thirdparty (defined into setup)
$array_to_check = array('IDPROF1', 'IDPROF2', 'IDPROF3', 'IDPROF4', 'IDPROF5', 'IDPROF6', 'EMAIL');
- foreach ($array_to_check as $key)
- {
+ foreach ($array_to_check as $key) {
$keymin = strtolower($key);
$i = (int) preg_replace('/[^0-9]/', '', $key);
if ($i == 1) {
@@ -2680,16 +2679,12 @@ class Facture extends CommonInvoice
}
$vallabel = $this->thirdparty->$keymin;
- if ($i > 0)
- {
- if ($this->thirdparty->isACompany())
- {
+ if ($i > 0) {
+ if ($this->thirdparty->isACompany()) {
// Check for mandatory prof id (but only if country is other than ours)
- if ($mysoc->country_id > 0 && $this->thirdparty->country_id == $mysoc->country_id)
- {
+ if ($mysoc->country_id > 0 && $this->thirdparty->country_id == $mysoc->country_id) {
$idprof_mandatory = 'SOCIETE_'.$key.'_INVOICE_MANDATORY';
- if (!$vallabel && !empty($conf->global->$idprof_mandatory))
- {
+ if (!$vallabel && !empty($conf->global->$idprof_mandatory)) {
$langs->load("errors");
$this->error = $langs->trans('ErrorProdIdIsMandatory', $langs->transcountry('ProfId'.$i, $this->thirdparty->country_code)).' ('.$langs->trans("ForbiddenBySetupRules").') ['.$langs->trans('Company').' : '.$this->thirdparty->name.']';
dol_syslog(__METHOD__.' '.$this->error, LOG_ERR);
@@ -2698,11 +2693,9 @@ class Facture extends CommonInvoice
}
}
} else {
- if ($key == 'EMAIL')
- {
+ if ($key == 'EMAIL') {
// Check for mandatory
- if (!empty($conf->global->SOCIETE_EMAIL_INVOICE_MANDATORY) && !isValidEMail($this->thirdparty->email))
- {
+ if (!empty($conf->global->SOCIETE_EMAIL_INVOICE_MANDATORY) && !isValidEMail($this->thirdparty->email)) {
$langs->load("errors");
$this->error = $langs->trans("ErrorBadEMail", $this->thirdparty->email).' ('.$langs->trans("ForbiddenBySetupRules").') ['.$langs->trans('Company').' : '.$this->thirdparty->name.']';
dol_syslog(__METHOD__.' '.$this->error, LOG_ERR);