diff --git a/ChangeLog b/ChangeLog index 24c8b2e643c..b0c9002e180 100644 --- a/ChangeLog +++ b/ChangeLog @@ -42,6 +42,7 @@ For users: - Fix: Errors weren't being shown in customer's & supplier's orders - New: Add conditional substitution IF/ELSEIF/ENDIF for ODT templates - New: Basic implementation of hooks and triggers for a lot (most) of core modules: action/calendar, trips and expenses, dons, vat payment, contact/society, contract, product lines, expedition, order supplier and order invoice (lines included), intervention card, project, tasks +- Fix: [ bug #499 ]: Supplier order input method not translated For developers: - New: Add webservice for thirdparty creation and list. diff --git a/htdocs/fourn/commande/fiche.php b/htdocs/fourn/commande/fiche.php index dad9cbd6593..18de50e8c2c 100644 --- a/htdocs/fourn/commande/fiche.php +++ b/htdocs/fourn/commande/fiche.php @@ -1118,7 +1118,25 @@ if ($id > 0 || ! empty($ref)) if ($object->methode_commande) { - print ''.$langs->trans("Method").''.$object->methode_commande.''; + $sql = "SELECT rowid, code, libelle"; + $sql.= " FROM ".MAIN_DB_PREFIX.'c_input_method'; + $sql.= " WHERE active=1 AND rowid = ".$db->escape($object->methode_commande_id); + + $resql = $db->query($sql); + + if ($resql && $db->num_rows($resql)) + { + $obj = $db->fetch_object($resql); + + // Si traduction existe, on l'utilise, sinon on prend le libelle par defaut + $methode_commande = ($langs->trans($obj->code) != $obj->code ? $langs->trans($obj->code) : ($obj->libelle!='-'?$obj->libelle:'')); + } + else + { + dol_print_error($db); + } + + print ''.$langs->trans("Method").''.$methode_commande.''; } }