Removed deprecated usage of Account::account_currency_code and started using Account::canBeReconciliated

This commit is contained in:
Marcos García de La Fuente 2016-03-02 10:45:40 +01:00
parent fd3b4f6080
commit 66313f584b
5 changed files with 13 additions and 11 deletions

View File

@ -140,10 +140,6 @@ class Commande extends CommonOrder
*/
var $lines = array();
// Pour board
var $nbtodo;
var $nbtodolate;
// Multicurrency
var $fk_multicurrency;
var $multicurrency_code;

View File

@ -397,7 +397,7 @@ if ($id > 0 || ! empty($ref))
}
}
if ($object->type != 2 && $object->rappro)
if ($object->canBeConciliated())
{
// If not cash account and can be reconciliate
if ($user->rights->banque->consolidate)
@ -529,7 +529,7 @@ if ($id > 0 || ! empty($ref))
print '<td align="right">'.$langs->trans("Credit").'</td>';
print '<td align="right" width="80">'.$langs->trans("BankBalance").'</td>';
print '<td align="center" width="60">';
if ($object->type != 2 && $object->rappro) print $langs->trans("AccountStatementShort");
if ($object->canBeConciliated()) print $langs->trans("AccountStatementShort");
else print '&nbsp;';
print '</td></tr>';

View File

@ -292,7 +292,7 @@ if ($action == 'create')
// Currency
print '<tr><td class="fieldrequired">'.$langs->trans("Currency").'</td>';
print '<td colspan="3">';
$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 '<tr><td>'.$langs->trans("Currency").'</td>';
print '<td colspan="3">';
$selectedcode=$account->account_currency_code;
$selectedcode=$account->currency_code;
if (! $selectedcode) $selectedcode=$conf->currency;
print $langs->trans("Currency".$selectedcode);
print '</td></tr>';
@ -851,7 +851,7 @@ else
print '<input type="hidden" value="'.$account->currency_code.'">';
print '</td>';
print '<td colspan="3">';
$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);

View File

@ -154,6 +154,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

View File

@ -144,8 +144,7 @@ if (empty($num))
print '<div class="tabsAction">';
if ($object->type != 2 && $object->rappro)
{
if ($object->canBeConciliated()) {
// If not cash account and can be reconciliate
if ($user->rights->banque->consolidate)
{