diff --git a/htdocs/compta/bank/bankentries_list.php b/htdocs/compta/bank/bankentries_list.php
index 868baffdf5a..d1016e199b4 100644
--- a/htdocs/compta/bank/bankentries_list.php
+++ b/htdocs/compta/bank/bankentries_list.php
@@ -155,7 +155,8 @@ $arrayfields = array(
'b.dateo' => array('label' => $langs->trans("DateOperationShort"), 'checked' => -1,'position' => 30),
'b.datev' => array('label' => $langs->trans("DateValueShort"), 'checked' => 1,'position' => 40),
'type' => array('label' => $langs->trans("Type"), 'checked' => 1,'position' => 50),
- 'b.num_chq' => array('label' => $langs->trans("Numero"), 'checked' => 1,'position' => 60),
+ 'b.num_chq' => array('label' => $langs->trans("Numero"), 'checked' => 0,'position' => 60),
+ 'b.fk_bordereau' => array('label' => $langs->trans("ChequeNumber"), 'checked' => 0, 'position' => 65),
'bu.label' => array('label' => $langs->trans("ThirdParty").'/'.$langs->trans("User"), 'checked' => 1, 'position' => 70),
'ba.ref' => array('label' => $langs->trans("BankAccount"), 'checked' => (($id > 0 || !empty($ref)) ? 0 : 1), 'position' => 80),
'b.debit' => array('label' => $langs->trans("Debit"), 'checked' => 1, 'position' => 90),
@@ -164,7 +165,6 @@ $arrayfields = array(
'balance' => array('label' => $langs->trans("Balance"), 'checked' => 1, 'position' => 120),
'b.num_releve' => array('label' => $langs->trans("AccountStatement"), 'checked' => 1, 'position' => 130),
'b.conciliated' => array('label' => $langs->trans("BankLineReconciled"), 'enabled' => $object->rappro, 'checked' => ($action == 'reconcile' ? 1 : 0), 'position' => 140),
- 'b.fk_bordereau' => array('label' => $langs->trans("ChequeNumber"), 'checked' => 0, 'position' => 150),
);
// Extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_array_fields.tpl.php';
@@ -1131,6 +1131,7 @@ if ($resql) {
if (!empty($arrayfields['b.datev']['checked'])) {
print '
';
}
+ // Type
if (!empty($arrayfields['type']['checked'])) {
print '';
print $form->select_types_paiements(empty($search_type) ? '' : $search_type, 'search_type', '', 2, 1, 1, 0, 1, 'maxwidth100', 1);
@@ -1140,7 +1141,11 @@ if ($resql) {
if (!empty($arrayfields['b.num_chq']['checked'])) {
print ' ';
}
- // Checked
+ // Bordereau
+ if (!empty($arrayfields['b.fk_bordereau']['checked'])) {
+ print ' ';
+ }
+ // Thirdparty
if (!empty($arrayfields['bu.label']['checked'])) {
print ' ';
}
@@ -1186,10 +1191,6 @@ if ($resql) {
print $form->selectyesno('search_conciliated', $search_conciliated, 1, false, 1, 1, 'search_status onrightofpage width75');
print '';
}
- // Bordereau
- if (!empty($arrayfields['b.fk_bordereau']['checked'])) {
- print ' ';
- }
// Action edit/delete and select
print ' ';
@@ -1238,6 +1239,10 @@ if ($resql) {
print_liste_field_titre($arrayfields['b.num_chq']['label'], $_SERVER['PHP_SELF'], 'b.num_chq', '', $param, '', $sortfield, $sortorder, "center ");
$totalarray['nbfield']++;
}
+ if (!empty($arrayfields['b.fk_bordereau']['checked'])) {
+ print_liste_field_titre($arrayfields['b.fk_bordereau']['label'], $_SERVER['PHP_SELF'], 'b.fk_bordereau', '', $param, '', $sortfield, $sortorder, "center ");
+ $totalarray['nbfield']++;
+ }
if (!empty($arrayfields['bu.label']['checked'])) {
print_liste_field_titre($arrayfields['bu.label']['label'], $_SERVER['PHP_SELF'], '', '', $param, '', $sortfield, $sortorder);
$totalarray['nbfield']++;
@@ -1270,10 +1275,6 @@ if ($resql) {
print_liste_field_titre($arrayfields['b.conciliated']['label'], $_SERVER['PHP_SELF'], 'b.rappro', '', $param, '', $sortfield, $sortorder, "center ");
$totalarray['nbfield']++;
}
- if (!empty($arrayfields['b.fk_bordereau']['checked'])) {
- print_liste_field_titre($arrayfields['b.fk_bordereau']['label'], $_SERVER['PHP_SELF'], 'b.fk_bordereau', '', $param, '', $sortfield, $sortorder, "center ");
- $totalarray['nbfield']++;
- }
// Extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php';
@@ -1418,6 +1419,7 @@ if ($resql) {
}
print '';
}
+
if (!empty($arrayfields['b.num_releve']['checked'])) {
print ' ';
}
@@ -1653,12 +1655,15 @@ if ($resql) {
// Payment type
if (!empty($arrayfields['type']['checked'])) {
- print '';
- $labeltype = ($langs->trans("PaymentTypeShort".$objp->fk_type) != "PaymentTypeShort".$objp->fk_type) ? $langs->trans("PaymentTypeShort".$objp->fk_type) : $langs->getLabelFromKey($db, $objp->fk_type, 'c_paiement', 'code', 'libelle', '', 1);
+ $labeltype = ($langs->transnoentitiesnoconv("PaymentTypeShort".$objp->fk_type) != "PaymentTypeShort".$objp->fk_type) ? $langs->transnoentitiesnoconv("PaymentTypeShort".$objp->fk_type) : $langs->getLabelFromKey($db, $objp->fk_type, 'c_paiement', 'code', 'libelle', '', 1);
+ if (empty($arrayfields['b.num_chq']['checked'])) {
+ $labeltype .= ($objp->num_chq ? ' - '.$objp->num_chq : '');
+ }
+ print ' ';
if ($labeltype == 'SOLD') {
print ' '; //$langs->trans("InitialBankBalance");
} else {
- print $labeltype;
+ print dolPrintLabel($labeltype);
}
print " \n";
if (!$i) {
@@ -1674,6 +1679,17 @@ if ($resql) {
}
}
+ // Cheque
+ if (!empty($arrayfields['b.fk_bordereau']['checked'])) {
+ $bordereaustatic->fetch($objp->fk_bordereau);
+ print '';
+ print $bordereaustatic->getNomUrl();
+ print ' ';
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
+ }
+
// Third party
if (!empty($arrayfields['bu.label']['checked'])) {
print '';
@@ -1832,6 +1848,7 @@ if ($resql) {
}
}
+ // Conciliated
if (!empty($arrayfields['b.conciliated']['checked'])) {
print ' ';
print yn($objp->conciliated);
@@ -1841,16 +1858,6 @@ if ($resql) {
}
}
- if (!empty($arrayfields['b.fk_bordereau']['checked'])) {
- $bordereaustatic->fetch($objp->fk_bordereau);
- print ' ';
- print $bordereaustatic->getNomUrl();
- print ' ';
- if (!$i) {
- $totalarray['nbfield']++;
- }
- }
-
// Fields from hook
$parameters = array('arrayfields' => $arrayfields, 'obj' => $objp, 'i' => $i, 'totalarray' => &$totalarray);
$reshook=$hookmanager->executeHooks('printFieldListValue', $parameters, $object, $action); // Note that $action and $objecttmpect may have been modified by hook
diff --git a/htdocs/core/class/translate.class.php b/htdocs/core/class/translate.class.php
index 534aa18773e..e15b80798f2 100644
--- a/htdocs/core/class/translate.class.php
+++ b/htdocs/core/class/translate.class.php
@@ -1025,7 +1025,7 @@ class Translate
* @param string $fieldlabel Field for label. This value must always be a hardcoded string and not a value coming from user input.
* @param string $keyforselect Use another value than the translation key for the where into select
* @param int $filteronentity Use a filter on entity
- * @return string|int Label in UTF8 (but without entities) or -1 if error
+ * @return string|int Label in UTF8 (not HTML entity encoded) or -1 if error
* @see dol_getIdFromCode()
*/
public function getLabelFromKey($db, $key, $tablename, $fieldkey, $fieldlabel, $keyforselect = '', $filteronentity = 0)