Skip to content
Snippets Groups Projects
Commit 484f8ec2 authored by Regis Houssin's avatar Regis Houssin
Browse files

Merge pull request #341 from marcosgdf/bug-499

Fixed bug #499
parents 51d3d339 0ecfe046
No related branches found
No related tags found
No related merge requests found
......@@ -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.
......
......@@ -1118,7 +1118,25 @@ if ($id > 0 || ! empty($ref))
if ($object->methode_commande)
{
print '<tr><td>'.$langs->trans("Method").'</td><td colspan="2">'.$object->methode_commande.'</td></tr>';
$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 '<tr><td>'.$langs->trans("Method").'</td><td colspan="2">'.$methode_commande.'</td></tr>';
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment