diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php
index caf27c0aced..994894f2b4c 100644
--- a/htdocs/comm/propal.php
+++ b/htdocs/comm/propal.php
@@ -1976,25 +1976,23 @@ if ($action == 'create') {
}
}
}
- // Bank Account
- print '
';
- print '| ';
- print $langs->trans('BankAccount');
- print ' | ';
+
+ // Bank Account
+ print ' | | ';
+ print '';
- print ' | ';
- if ($action == 'editbankaccount')
- {
- $form->form_select_comptes($_SERVER['PHP_SELF'].'?id='.$object->id, $object->fk_account, 'fk_account', 1);
- }
- else
- {
- $form->form_select_comptes($_SERVER['PHP_SELF'].'?id='.$object->id, $object->fk_account, 'none');
- }
- print " | ";
- print ' ';
+ print ' ';
+ print ' | ';
+ if ($action == 'editbankaccount') {
+ $form->form_select_comptes($_SERVER['PHP_SELF'].'?id='.$object->id, $object->fk_account, 'fk_account', 1);
+ } else {
+ $form->form_select_comptes($_SERVER['PHP_SELF'].'?id='.$object->id, $object->fk_account, 'none');
+ }
+ print ' | ';
+ print '
';
// Amount HT
print '| ' . $langs->trans('AmountHT') . ' | ';
diff --git a/htdocs/commande/fiche.php b/htdocs/commande/fiche.php
index aeba517270b..58fede8e275 100644
--- a/htdocs/commande/fiche.php
+++ b/htdocs/commande/fiche.php
@@ -2142,15 +2142,12 @@ if ($action == 'create' && $user->rights->commande->creer) {
print 'id.'">'.img_edit($langs->trans('SetBankAccount'),1).' | ';
print '
';
print '';
- if ($action == 'editbankaccount')
- {
+ if ($action == 'editbankaccount') {
$form->form_select_comptes($_SERVER['PHP_SELF'].'?id='.$object->id, $object->fk_account, 'fk_account', 1);
- }
- else
- {
+ } else {
$form->form_select_comptes($_SERVER['PHP_SELF'].'?id='.$object->id, $object->fk_account, 'none');
}
- print " | ";
+ print '';
print '';
// Total HT
diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php
index 44554d39180..fd6f83564ad 100644
--- a/htdocs/core/class/commonobject.class.php
+++ b/htdocs/core/class/commonobject.class.php
@@ -1087,8 +1087,7 @@ abstract class CommonObject
*/
function setBankAccount($fk_account)
{
- if (! $this->table_element)
- {
+ if (! $this->table_element) {
dol_syslog(get_class($this)."::setBankAccount was called on objet with property table_element not defined",LOG_ERR);
return -1;
}
@@ -1099,13 +1098,10 @@ abstract class CommonObject
$sql.= " SET fk_account = ".$fk_account;
$sql.= " WHERE rowid=".$this->id;
- if ($this->db->query($sql))
- {
+ if ($this->db->query($sql)) {
$this->fk_account = ($fk_account=='NULL')?null:$fk_account;
return 1;
- }
- else
- {
+ } else {
dol_syslog(get_class($this).'::setBankAccount Error '.$sql.' - '.$this->db->error());
$this->error=$this->db->error();
return 0;