From a9dc6bb3d7a8797787d2016f0d9413cb2f00172c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= <marcosgdf@gmail.com> Date: Tue, 10 Feb 2015 00:55:22 +0100 Subject: [PATCH] Fix: [ bug #1826 ] Supplier payment types are not translated in fourn/facture/paiement.php --- ChangeLog | 1 + htdocs/fourn/facture/paiement.php | 9 ++++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5870e55152d..eb0736c543d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -21,6 +21,7 @@ English Dolibarr ChangeLog - Fix: [ bug #1812 ] SQL Error message while sending emailing with PostgreSQL datatabase - Fix: [ bug #1819 ] SQL error when searching for an invoice payment - Fix: [ bug #1827 ] Tax reports gives incorrect amounts when using external modules that create lines with special codes +- Fix: [ bug #1826 ] Supplier payment types are not translated in fourn/facture/paiement.php ***** ChangeLog for 3.6.2 compared to 3.6.1 ***** - Fix: fix ErrorBadValueForParamNotAString error message in price customer multiprice. diff --git a/htdocs/fourn/facture/paiement.php b/htdocs/fourn/facture/paiement.php index b6a4c5a7925..a8576cff01d 100644 --- a/htdocs/fourn/facture/paiement.php +++ b/htdocs/fourn/facture/paiement.php @@ -5,6 +5,7 @@ * Copyright (C) 2004 Christophe Combelles <ccomb@free.fr> * Copyright (C) 2005 Marc Barilley / Ocebo <marc@ocebo.com> * Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com> + * Copyright (C) 2015 Marcos GarcĂa <marcosgdf@gmail.com> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -447,7 +448,7 @@ if (empty($action)) $sql = 'SELECT p.rowid as pid, p.datep as dp, p.amount as pamount, p.num_paiement,'; $sql.= ' s.rowid as socid, s.nom,'; - $sql.= ' c.libelle as paiement_type,'; + $sql.= ' c.code as paiement_type, c.libelle as paiement_libelle,'; $sql.= ' ba.rowid as bid, ba.label,'; if (!$user->rights->societe->client->voir) $sql .= ' sc.fk_soc, sc.fk_user,'; $sql.= ' SUM(f.amount)'; @@ -486,7 +487,7 @@ if (empty($action)) { $sql .= " AND s.nom LIKE '%".$db->escape($search_company)."%'"; } - $sql.= " GROUP BY p.rowid, p.datep, p.amount, p.num_paiement, s.rowid, s.nom, c.libelle, ba.rowid, ba.label"; + $sql.= " GROUP BY p.rowid, p.datep, p.amount, p.num_paiement, s.rowid, s.nom, c.code, c.libelle, ba.rowid, ba.label"; if (!$user->rights->societe->client->voir) $sql .= ", sc.fk_soc, sc.fk_user"; $sql.= $db->order($sortfield,$sortorder); $sql.= $db->plimit($limit+1, $offset); @@ -558,7 +559,9 @@ if (empty($action)) else print ' '; print '</td>'; - print '<td>'.dol_trunc($objp->paiement_type.' '.$objp->num_paiement,32)."</td>\n"; + $payment_type = $langs->trans("PaymentType".$objp->paiement_type)!=("PaymentType".$objp->paiement_type)?$langs->trans("PaymentType".$objp->paiement_type):$objp->paiement_libelle; + + print '<td>'.$payment_type.' '.dol_trunc($objp->num_paiement,32)."</td>\n"; print '<td>'; if ($objp->bid) print '<a href="'.DOL_URL_ROOT.'/compta/bank/account.php?account='.$objp->bid.'">'.img_object($langs->trans("ShowAccount"),'account').' '.dol_trunc($objp->label,24).'</a>'; -- GitLab