From 3bde8a575e251b8f14e7dc086169fc9cf59e3262 Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Sun, 26 Mar 2017 05:48:31 +0200 Subject: [PATCH 1/3] Fix : Ref of expense report and date are inverted in list of expense report to bind --- htdocs/accountancy/expensereport/list.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/accountancy/expensereport/list.php b/htdocs/accountancy/expensereport/list.php index 693984432ae..50b96b5a38b 100644 --- a/htdocs/accountancy/expensereport/list.php +++ b/htdocs/accountancy/expensereport/list.php @@ -1,6 +1,6 @@ - * Copyright (C) 2013-2016 Alexandre Spangaro + * Copyright (C) 2013-2017 Alexandre Spangaro * Copyright (C) 2014-2015 Ari Elbaz (elarifr) * Copyright (C) 2013-2014 Florian Henry * Copyright (C) 2014 Juanjo Menent s @@ -302,17 +302,17 @@ if ($result) { $expensereport_static->ref = $objp->ref; $expensereport_static->id = $objp->erid; - + print ''; // Line id print '' . $objp->rowid . ''; - print '' . dol_print_date($db->jdate($objp->date), 'day') . ''; - // Ref Expense report print '' . $expensereport_static->getNomUrl(1) . ''; + print '' . dol_print_date($db->jdate($objp->date), 'day') . ''; + // Fees label print ''; print $objp->fees_label; From 8f915bc59366f9df8cf145e6510273bf8f502943 Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Sun, 26 Mar 2017 06:20:05 +0200 Subject: [PATCH 2/3] Fix : Problem with type_fees_label in accountancy module --- htdocs/accountancy/expensereport/card.php | 8 ++++---- htdocs/accountancy/expensereport/lines.php | 6 +++--- htdocs/accountancy/expensereport/list.php | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/htdocs/accountancy/expensereport/card.php b/htdocs/accountancy/expensereport/card.php index 4819bd656ae..808214becce 100644 --- a/htdocs/accountancy/expensereport/card.php +++ b/htdocs/accountancy/expensereport/card.php @@ -1,7 +1,7 @@ * Copyright (C) 2005 Simon TOSSER - * Copyright (C) 2013-2016 Alexandre Spangaro + * Copyright (C) 2013-2017 Alexandre Spangaro * Copyright (C) 2013-2014 Olivier Geffroy * Copyright (C) 2013-2014 Florian Henry * Copyright (C) 2014 Juanjo Menent @@ -76,7 +76,7 @@ if ($action == 'ventil' && $user->rights->accounting->bind->write) { /* * View */ -llxHeader("", "FicheVentilation"); +llxHeader("", $langs->trans(FicheVentilation)); if ($cancel == $langs->trans("Cancel")) { $action = ''; @@ -89,7 +89,7 @@ $formventilation = new FormVentilation($db); if (! empty($id)) { $sql = "SELECT er.ref, er.rowid as facid, erd.fk_c_type_fees, erd.comments, erd.rowid, erd.fk_code_ventilation,"; - $sql .= " f.id as fees_id, f.label as fees_label,"; + $sql .= " f.id as type_fees_id, f.code as type_fees_code, f.label as type_fees_label,"; $sql .= " aa.account_number, aa.label"; $sql .= " FROM " . MAIN_DB_PREFIX . "expensereport_det as erd"; $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "c_type_fees as f ON f.id = erd.fk_c_type_fees"; @@ -132,7 +132,7 @@ if (! empty($id)) { print '' . stripslashes(nl2br($objp->comments)) . ''; print '' . $langs->trans("TypeFees") . ''; - print '' . dol_trunc($objp->fees_label, 24) . ''; + print '' . ($langs->trans($objp->type_fees_code) == $objp->type_fees_code ? $objp->type_fees_label : $langs->trans(($objp->type_fees_code))) . ''; print '' . $langs->trans("Account") . ''; print $formventilation->select_account($objp->fk_code_ventilation, 'codeventil', 1); diff --git a/htdocs/accountancy/expensereport/lines.php b/htdocs/accountancy/expensereport/lines.php index 049e1d44687..31b1ae6701c 100644 --- a/htdocs/accountancy/expensereport/lines.php +++ b/htdocs/accountancy/expensereport/lines.php @@ -1,6 +1,6 @@ - * Copyright (C) 2013-2016 Alexandre Spangaro + * Copyright (C) 2013-2017 Alexandre Spangaro * Copyright (C) 2014-2015 Ari Elbaz (elarifr) * Copyright (C) 2013-2016 Florian Henry * Copyright (C) 2014 Juanjo Menent @@ -148,7 +148,7 @@ print '