Fix label for report n ledger for transitionnal bank account on tranfer

This commit is contained in:
Laurent Destailleur 2019-07-05 15:25:29 +02:00
parent 675b7b2e32
commit 9b32763919
3 changed files with 30 additions and 8 deletions

View File

@ -573,7 +573,14 @@ if (! $error && $action == 'writebookkeeping') {
{ {
$reflabel = ''; $reflabel = '';
if (! empty($val['lib'])) $reflabel .= dol_string_nohtmltag($val['lib']) . ($val['soclib']?" - ":""); 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 = new BookKeeping($db);
$bookkeeping->doc_date = $val["date"]; $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) { foreach ($tabbq[$key] as $k => $mt) {
if ($mt) if ($mt)
{ {
@ -831,7 +838,6 @@ if ($action == 'exportcsv') { // ISO and not UTF8 !
print '"' . $langs->transnoentitiesnoconv("Note") . '"' . $sep; print '"' . $langs->transnoentitiesnoconv("Note") . '"' . $sep;
print "\n"; print "\n";
foreach ($tabpay as $key => $val) foreach ($tabpay as $key => $val)
{ {
$date = dol_print_date($db->jdate($val["date"]), 'day'); $date = dol_print_date($db->jdate($val["date"]), 'day');
@ -869,7 +875,14 @@ if ($action == 'exportcsv') { // ISO and not UTF8 !
{ {
$reflabel = ''; $reflabel = '';
if (! empty($val['lib'])) $reflabel .= dol_string_nohtmltag($val['lib']) . ($val['soclib']?" - ":""); 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 '"' . $key . '"' . $sep;
print '"' . $date . '"' . $sep; print '"' . $date . '"' . $sep;
@ -1087,7 +1100,14 @@ if (empty($action) || $action == 'view') {
{ {
$reflabel = ''; $reflabel = '';
if (! empty($val['lib'])) $reflabel .= $val['lib'] . ($val['soclib']?" - ":""); 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 '<!-- Thirdparty bank.rowid='.$key.' -->'; print '<!-- Thirdparty bank.rowid='.$key.' -->';
print '<tr class="oddeven">'; print '<tr class="oddeven">';
@ -1115,7 +1135,7 @@ if (empty($action) || $action == 'view') {
} }
else else
{ {
print '<span class="warning">'.$langs->trans('UnknownAccountForThirdparty', length_accountg($conf->global->ACCOUNTING_ACCOUNT_SUSPENSE)).'</span>'; // We will a waiting account print '<span class="warning">'.$langs->trans('UnknownAccountForThirdparty', length_accountg($conf->global->ACCOUNTING_ACCOUNT_SUSPENSE)).'</span>'; // We will use a waiting account
} }
} }
else else

View File

@ -175,7 +175,7 @@ function journalHead($nom, $variante, $period, $periodlink, $description, $build
{ {
global $langs; global $langs;
print "\n\n<!-- debut cartouche journal -->\n"; print "\n\n<!-- start banner journal -->\n";
if(! is_empty($varlink)) $varlink = '?'.$varlink; if(! is_empty($varlink)) $varlink = '?'.$varlink;
@ -186,6 +186,7 @@ function journalHead($nom, $variante, $period, $periodlink, $description, $build
$head[$h][2] = 'journal'; $head[$h][2] = 'journal';
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].$varlink.'">'; print '<form method="POST" action="'.$_SERVER["PHP_SELF"].$varlink.'">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
dol_fiche_head($head, 'journal'); dol_fiche_head($head, 'journal');
@ -240,5 +241,5 @@ function journalHead($nom, $variante, $period, $periodlink, $description, $build
print '</form>'; print '</form>';
print "\n<!-- fin cartouche journal -->\n\n"; print "\n<!-- end banner journal -->\n\n";
} }

View File

@ -158,6 +158,7 @@ ACCOUNTING_RESULT_LOSS=Result accounting account (Loss)
ACCOUNTING_CLOSURE_DEFAULT_JOURNAL=Journal of closure ACCOUNTING_CLOSURE_DEFAULT_JOURNAL=Journal of closure
ACCOUNTING_ACCOUNT_TRANSFER_CASH=Accounting account of transitional bank transfer ACCOUNTING_ACCOUNT_TRANSFER_CASH=Accounting account of transitional bank transfer
TransitionalAccount=Transitional bank transfer account
ACCOUNTING_ACCOUNT_SUSPENSE=Accounting account of wait ACCOUNTING_ACCOUNT_SUSPENSE=Accounting account of wait
DONATION_ACCOUNTINGACCOUNT=Accounting account to register donations DONATION_ACCOUNTINGACCOUNT=Accounting account to register donations