diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index 394b4887a6f..9eb31ebd608 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -140,10 +140,6 @@ class Commande extends CommonOrder */ var $lines = array(); - // Pour board - var $nbtodo; - var $nbtodolate; - // Multicurrency var $fk_multicurrency; var $multicurrency_code; diff --git a/htdocs/compta/bank/account.php b/htdocs/compta/bank/account.php index 880ff92d3d5..589c266d525 100644 --- a/htdocs/compta/bank/account.php +++ b/htdocs/compta/bank/account.php @@ -397,15 +397,11 @@ if ($id > 0 || ! empty($ref)) } } - if ($object->type != 2 && $object->rappro) - { + if ($object->canBeConciliated() > 0) { // If not cash account and can be reconciliate - if ($user->rights->banque->consolidate) - { - print ''.$langs->trans("Conciliate").''; - } - else - { + if ($user->rights->banque->consolidate) { + print ''.$langs->trans("Conciliate").''; + } else { print ''.$langs->trans("Conciliate").''; } } @@ -529,8 +525,11 @@ if ($id > 0 || ! empty($ref)) print ''.$langs->trans("Credit").''; print ''.$langs->trans("BankBalance").''; print ''; - if ($object->type != 2 && $object->rappro) print $langs->trans("AccountStatementShort"); - else print ' '; + if ($object->canBeConciliated() > 0) { + print $langs->trans("AccountStatementShort"); + } else { + print ' '; + } print ''; print '
'; diff --git a/htdocs/compta/bank/card.php b/htdocs/compta/bank/card.php index c8d7f036cdc..77572860cf5 100644 --- a/htdocs/compta/bank/card.php +++ b/htdocs/compta/bank/card.php @@ -292,7 +292,7 @@ if ($action == 'create') // Currency print ''.$langs->trans("Currency").''; print ''; - $selectedcode=$account->account_currency_code; + $selectedcode=$account->currency_code; if (! $selectedcode) $selectedcode=$conf->currency; print $form->selectCurrency((isset($_POST["account_currency_code"])?$_POST["account_currency_code"]:$selectedcode), 'account_currency_code'); //print $langs->trans("Currency".$conf->currency); @@ -583,7 +583,7 @@ else // Currency print ''.$langs->trans("Currency").''; print ''; - $selectedcode=$account->account_currency_code; + $selectedcode=$account->currency_code; if (! $selectedcode) $selectedcode=$conf->currency; print $langs->trans("Currency".$selectedcode); print ''; @@ -851,7 +851,7 @@ else print ''; print ''; print ''; - $selectedcode=$account->account_currency_code; + $selectedcode=$account->currency_code; if (! $selectedcode) $selectedcode=$conf->currency; print $form->selectCurrency((isset($_POST["account_currency_code"])?$_POST["account_currency_code"]:$selectedcode), 'account_currency_code'); //print $langs->trans("Currency".$conf->currency); diff --git a/htdocs/compta/bank/class/account.class.php b/htdocs/compta/bank/class/account.class.php index 5c5b7cf1479..bf3aeb06f0a 100644 --- a/htdocs/compta/bank/class/account.class.php +++ b/htdocs/compta/bank/class/account.class.php @@ -166,6 +166,13 @@ class Account extends CommonObject */ public $currency_code; + /** + * Currency code + * @var string + * @deprecated Use currency_code instead + */ + public $account_currency_code; + /** * Authorized minimum balance * @var float diff --git a/htdocs/compta/bank/releve.php b/htdocs/compta/bank/releve.php index 43587cfa6a0..8ef53f26203 100644 --- a/htdocs/compta/bank/releve.php +++ b/htdocs/compta/bank/releve.php @@ -143,16 +143,12 @@ if (empty($num)) dol_fiche_end(); print '
'; - - if ($object->type != 2 && $object->rappro) - { + + if ($object->canBeConciliated() > 0) { // If not cash account and can be reconciliate - if ($user->rights->banque->consolidate) - { - print ''.$langs->trans("Conciliate").''; - } - else - { + if ($user->rights->banque->consolidate) { + print ''.$langs->trans("Conciliate").''; + } else { print ''.$langs->trans("Conciliate").''; } }