diff --git a/ChangeLog b/ChangeLog index 62e9977baab00d2d38473fcd09fe613e67de7aa1..b4255c930104d7a785731a9039eeb631ecf38552 100644 --- a/ChangeLog +++ b/ChangeLog @@ -29,6 +29,7 @@ Fix: [ bug #1589 ] Menu type in "Edit menu" page is not translated Fix: [ bug #1591 ] Linked object block shows Total HT/TTC even if not having permission to read them Fix: [ bug #1577 ] When creating new Private individual third, selected third type is ignored Fix: [ bug #1555 ] Update accountancy code of products does not throw PRODUCT_MODIFY trigger +Fix: [ bug #1548 ] Supplier payment card shows type in French ***** ChangeLog for 3.5.4 compared to 3.5.3 ***** Fix: Hide title of event when agenda module disabled. diff --git a/htdocs/fourn/class/paiementfourn.class.php b/htdocs/fourn/class/paiementfourn.class.php index 380a16bd1298d5a5375b50571694b068a335350b..b8e9266cb37d30a563f090a8fcb8f11bf4e135f5 100644 --- a/htdocs/fourn/class/paiementfourn.class.php +++ b/htdocs/fourn/class/paiementfourn.class.php @@ -4,6 +4,7 @@ * Copyright (C) 2005 Marc Barilley / Ocebo <marc@ocebo.com> * Copyright (C) 2005-2009 Regis Houssin <regis.houssin@capnetworks.com> * Copyright (C) 2010-2011 Juanjo Menent <jmenent@2byte.es> + * Copyright (C) 2014 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 @@ -55,6 +56,18 @@ class PaiementFourn extends Paiement // fk_paiement dans llx_paiement est l'id du type de paiement (7 pour CHQ, ...) // fk_paiement dans llx_paiement_facture est le rowid du paiement + /** + * Label of payment type + * @var string + */ + public $type_libelle; + + /** + * Code of Payment type + * @var string + */ + public $type_code; + /** * Constructor * @@ -74,7 +87,7 @@ class PaiementFourn extends Paiement function fetch($id) { $sql = 'SELECT p.rowid, p.datep as dp, p.amount, p.statut, p.fk_bank,'; - $sql.= ' c.libelle as paiement_type,'; + $sql.= ' c.code as paiement_code, c.libelle as paiement_type,'; $sql.= ' p.num_paiement, p.note, b.fk_account'; $sql.= ' FROM '.MAIN_DB_PREFIX.'c_paiement as c, '.MAIN_DB_PREFIX.'paiementfourn as p'; $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'bank as b ON p.fk_bank = b.rowid '; @@ -95,6 +108,7 @@ class PaiementFourn extends Paiement $this->bank_line = $obj->fk_bank; $this->montant = $obj->amount; $this->note = $obj->note; + $this->type_code = $obj->paiement_code; $this->type_libelle = $obj->paiement_type; $this->statut = $obj->statut; $error = 1; diff --git a/htdocs/fourn/paiement/fiche.php b/htdocs/fourn/paiement/fiche.php index 0cbceb917a0595239fcf43faadbf2e7616e6f639..97f8b331e65d5962d454a3eafc5aebb8b7f1b7ce 100644 --- a/htdocs/fourn/paiement/fiche.php +++ b/htdocs/fourn/paiement/fiche.php @@ -2,6 +2,7 @@ /* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org> * Copyright (C) 2005 Marc Barilley / Ocebo <marc@ocebo.com> * Copyright (C) 2006-2010 Laurent Destailleur <eldy@users.sourceforge.net> + * Copyright (C) 2014 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 @@ -187,7 +188,8 @@ if ($result > 0) print '</td></tr>'; // Payment mode - print '<tr><td valign="top" colspan="2">'.$langs->trans('PaymentMode').'</td><td colspan="3">'.$object->type_libelle.'</td></tr>'; + $labeltype=$langs->trans("PaymentType".$object->type_code)!=("PaymentType".$object->type_code)?$langs->trans("PaymentType".$object->type_code):$object->type_libelle; + print '<tr><td valign="top" colspan="2">'.$langs->trans('PaymentMode').'</td><td colspan="3">'.$labeltype.'</td></tr>'; // Payment numero print '<tr><td valign="top" colspan="2">'.$form->editfieldkey("Numero",'num_paiement',$object->numero,$object,$object->statut == 0 && $user->rights->fournisseur->facture->creer).'</td><td colspan="3">';