diff --git a/htdocs/accountancy/journal/bankjournal.php b/htdocs/accountancy/journal/bankjournal.php
index f3049206389..a848f8505d8 100644
--- a/htdocs/accountancy/journal/bankjournal.php
+++ b/htdocs/accountancy/journal/bankjournal.php
@@ -1159,19 +1159,24 @@ if (empty($action) || $action == 'view') {
//var_dump($tabpay[$key]);
print '';
print '
';
+
+ // Date
print "| ".$date." | ";
- print "".$ref." | ";
+
+ // Ref
+ print "".dol_escape_htmltag($ref)." | ";
+
// Ledger account
- print "";
$accounttoshow = length_accountg($k);
if (empty($accounttoshow) || $accounttoshow == 'NotDefined') {
- print ''.$langs->trans("BankAccountNotDefined").'';
- } else {
- print $accounttoshow;
+ $accounttoshow = ''.$langs->trans("BankAccountNotDefined").'';
}
+ print ' | ';
+ print $accounttoshow;
print " | ";
+
// Subledger account
- print "";
+ print ' | ';
/*$accounttoshow = length_accountg($k);
if (empty($accounttoshow) || $accounttoshow == 'NotDefined')
{
@@ -1179,9 +1184,12 @@ if (empty($action) || $action == 'view') {
}
else print $accounttoshow;*/
print " | ";
- print "";
- print $reflabel;
+
+ // Label operation
+ print ' | ';
+ print $reflabel; // This is already html escaped content
print " | ";
+
print ''.$val["type_payment"]." | ";
print ''.($mt >= 0 ? price($mt) : '')." | ";
print ''.($mt < 0 ? price(-$mt) : '')." | ";
@@ -1205,10 +1213,14 @@ if (empty($action) || $action == 'view') {
print '';
print '
';
+
+ // Date
print "| ".$date." | ";
- print "".$ref." | ";
+
+ // Ref
+ print "".dol_escape_htmltag($ref)." | ";
+
// Ledger account
- print "";
$account_ledger = $k;
// Try to force general ledger account depending on type
if ($tabtype[$key] == 'payment') {
@@ -1237,9 +1249,9 @@ if (empty($action) || $action == 'view') {
if ($tabtype[$key] == 'unknown') {
// We will accept writing, but into a waiting account
if (empty($conf->global->ACCOUNTING_ACCOUNT_SUSPENSE) || $conf->global->ACCOUNTING_ACCOUNT_SUSPENSE == '-1') {
- print ''.$langs->trans('UnknownAccountForThirdpartyAndWaitingAccountNotDefinedBlocking').'';
+ $accounttoshow = ''.$langs->trans('UnknownAccountForThirdpartyAndWaitingAccountNotDefinedBlocking').'';
} else {
- print ''.$langs->trans('UnknownAccountForThirdparty', length_accountg($conf->global->ACCOUNTING_ACCOUNT_SUSPENSE)).''; // We will use a waiting account
+ $accounttoshow = ''.$langs->trans('UnknownAccountForThirdparty', length_accountg($conf->global->ACCOUNTING_ACCOUNT_SUSPENSE)).''; // We will use a waiting account
}
} else {
// We will refuse writing
@@ -1262,15 +1274,15 @@ if (empty($action) || $action == 'view') {
if ($tabtype[$key] == 'member') {
$errorstring = 'MainAccountForSubscriptionPaymentNotDefined';
}
- print ''.$langs->trans($errorstring).'';
+ $accounttoshow = ''.$langs->trans($errorstring).'';
}
- } else {
- print $accounttoshow;
}
+ print ' | ';
+ print $accounttoshow;
print " | ";
// Subledger account
- print "";
+ $accounttoshowsubledger = '';
if (in_array($tabtype[$key], array('payment', 'payment_supplier', 'payment_expensereport', 'payment_salary', 'payment_various'))) { // Type of payments that uses a subledger
$accounttoshowsubledger = length_accounta($k);
if ($accounttoshow != $accounttoshowsubledger) {
@@ -1282,18 +1294,20 @@ if (empty($action) || $action == 'view') {
if (!empty($tabcompany[$key]['code_compta'])) {
if (in_array($tabtype[$key], array('payment_various', 'payment_salary'))) {
// For such case, if subledger is not defined, we won't use subledger accounts.
- print ''.$langs->trans("ThirdpartyAccountNotDefinedOrThirdPartyUnknownSubledgerIgnored").'';
+ $accounttoshowsubledger = ''.$langs->trans("ThirdpartyAccountNotDefinedOrThirdPartyUnknownSubledgerIgnored").'';
} else {
- print ''.$langs->trans("ThirdpartyAccountNotDefinedOrThirdPartyUnknown", $tabcompany[$key]['code_compta']).'';
+ $accounttoshowsubledger = ''.$langs->trans("ThirdpartyAccountNotDefinedOrThirdPartyUnknown", $tabcompany[$key]['code_compta']).'';
}
} else {
- print ''.$langs->trans("ThirdpartyAccountNotDefinedOrThirdPartyUnknownBlocking").'';
+ $accounttoshowsubledger = ''.$langs->trans("ThirdpartyAccountNotDefinedOrThirdPartyUnknownBlocking").'';
}
- } else {
- print $accounttoshowsubledger;
}
+ } else {
+ $accounttoshowsubledger = '';
}
}
+ print ' | ';
+ print $accounttoshowsubledger;
print " | ";
print "".$reflabel." | ";