From 9b327639197692f9eb5cf3ac970d594f6f79107f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 5 Jul 2019 15:25:29 +0200 Subject: [PATCH] Fix label for report n ledger for transitionnal bank account on tranfer --- htdocs/accountancy/journal/bankjournal.php | 32 ++++++++++++++++++---- htdocs/core/lib/accounting.lib.php | 5 ++-- htdocs/langs/en_US/accountancy.lang | 1 + 3 files changed, 30 insertions(+), 8 deletions(-) diff --git a/htdocs/accountancy/journal/bankjournal.php b/htdocs/accountancy/journal/bankjournal.php index cfe49764c74..d4a9ff0d3f6 100644 --- a/htdocs/accountancy/journal/bankjournal.php +++ b/htdocs/accountancy/journal/bankjournal.php @@ -573,7 +573,14 @@ if (! $error && $action == 'writebookkeeping') { { $reflabel = ''; if (! empty($val['lib'])) $reflabel .= dol_string_nohtmltag($val['lib']) . ($val['soclib']?" - ":""); - $reflabel.= dol_string_nohtmltag($val['soclib']); + if ($tabtype[$key] == 'banktransfert') + { + $reflabel.= dol_string_nohtmltag($langs->transnoentitiesnoconv('TransitionalAccount').' '.$account_transfer); + } + else + { + $reflabel.= dol_string_nohtmltag($val['soclib']); + } $bookkeeping = new BookKeeping($db); $bookkeeping->doc_date = $val["date"]; @@ -702,7 +709,7 @@ if (! $error && $action == 'writebookkeeping') { } } } - else { // If thirdparty unkown, output the waiting account + else { // If thirdparty unknown, output the waiting account foreach ($tabbq[$key] as $k => $mt) { if ($mt) { @@ -831,7 +838,6 @@ if ($action == 'exportcsv') { // ISO and not UTF8 ! print '"' . $langs->transnoentitiesnoconv("Note") . '"' . $sep; print "\n"; - foreach ($tabpay as $key => $val) { $date = dol_print_date($db->jdate($val["date"]), 'day'); @@ -869,7 +875,14 @@ if ($action == 'exportcsv') { // ISO and not UTF8 ! { $reflabel = ''; if (! empty($val['lib'])) $reflabel .= dol_string_nohtmltag($val['lib']) . ($val['soclib']?" - ":""); - $reflabel.= dol_string_nohtmltag($val['soclib']); + if ($tabtype[$key] == 'banktransfert') + { + $reflabel.= dol_string_nohtmltag($langs->transnoentitiesnoconv('TransitionalAccount').' '.$account_transfer); + } + else + { + $reflabel.= dol_string_nohtmltag($val['soclib']); + } print '"' . $key . '"' . $sep; print '"' . $date . '"' . $sep; @@ -1087,7 +1100,14 @@ if (empty($action) || $action == 'view') { { $reflabel = ''; if (! empty($val['lib'])) $reflabel .= $val['lib'] . ($val['soclib']?" - ":""); - $reflabel.= $val['soclib']; + if ($tabtype[$key] == 'banktransfert') + { + $reflabel.= $langs->trans('TransitionalAccount').' '.$account_transfer; + } + else + { + $reflabel.= $val['soclib']; + } print ''; print ''; @@ -1115,7 +1135,7 @@ if (empty($action) || $action == 'view') { } else { - print ''.$langs->trans('UnknownAccountForThirdparty', length_accountg($conf->global->ACCOUNTING_ACCOUNT_SUSPENSE)).''; // We will a waiting account + print ''.$langs->trans('UnknownAccountForThirdparty', length_accountg($conf->global->ACCOUNTING_ACCOUNT_SUSPENSE)).''; // We will use a waiting account } } else diff --git a/htdocs/core/lib/accounting.lib.php b/htdocs/core/lib/accounting.lib.php index 9545b6961fd..d6bd38b5030 100644 --- a/htdocs/core/lib/accounting.lib.php +++ b/htdocs/core/lib/accounting.lib.php @@ -175,7 +175,7 @@ function journalHead($nom, $variante, $period, $periodlink, $description, $build { global $langs; - print "\n\n\n"; + print "\n\n\n"; if(! is_empty($varlink)) $varlink = '?'.$varlink; @@ -186,6 +186,7 @@ function journalHead($nom, $variante, $period, $periodlink, $description, $build $head[$h][2] = 'journal'; print '
'; + print ''; dol_fiche_head($head, 'journal'); @@ -240,5 +241,5 @@ function journalHead($nom, $variante, $period, $periodlink, $description, $build print '
'; - print "\n\n\n"; + print "\n\n\n"; } diff --git a/htdocs/langs/en_US/accountancy.lang b/htdocs/langs/en_US/accountancy.lang index 3bb0df59812..ece95cfca29 100644 --- a/htdocs/langs/en_US/accountancy.lang +++ b/htdocs/langs/en_US/accountancy.lang @@ -158,6 +158,7 @@ ACCOUNTING_RESULT_LOSS=Result accounting account (Loss) ACCOUNTING_CLOSURE_DEFAULT_JOURNAL=Journal of closure ACCOUNTING_ACCOUNT_TRANSFER_CASH=Accounting account of transitional bank transfer +TransitionalAccount=Transitional bank transfer account ACCOUNTING_ACCOUNT_SUSPENSE=Accounting account of wait DONATION_ACCOUNTINGACCOUNT=Accounting account to register donations