mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Fixed bug #499
The input method of supplier orders wasn't being translated
This commit is contained in:
parent
51d3d33947
commit
0ecfe0465e
|
|
@ -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>';
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user