Try a better fix
This commit is contained in:
parent
3dcb90048c
commit
de187ab398
@ -229,7 +229,7 @@ if ($action == 'add' && $user->rights->commande->creer)
|
|||||||
|
|
||||||
$object->origin = $_POST['origin'];
|
$object->origin = $_POST['origin'];
|
||||||
$object->origin_id = $_POST['originid'];
|
$object->origin_id = $_POST['originid'];
|
||||||
|
|
||||||
// Possibility to add external linked objects with hooks
|
// Possibility to add external linked objects with hooks
|
||||||
$object->linked_objects[$object->origin] = $object->origin_id;
|
$object->linked_objects[$object->origin] = $object->origin_id;
|
||||||
if (is_array($_POST['other_linked_objects']) && ! empty($_POST['other_linked_objects']))
|
if (is_array($_POST['other_linked_objects']) && ! empty($_POST['other_linked_objects']))
|
||||||
@ -641,15 +641,14 @@ if ($action == 'addline' && $user->rights->commande->creer)
|
|||||||
{
|
{
|
||||||
// Define output language
|
// Define output language
|
||||||
$outputlangs = $langs;
|
$outputlangs = $langs;
|
||||||
$newlang='';
|
$newlang=GETPOST('lang_id','alpha');
|
||||||
if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id','int')) $newlang=GETPOST('lang_id','int');
|
|
||||||
if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang=$object->client->default_lang;
|
if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang=$object->client->default_lang;
|
||||||
if (! empty($newlang))
|
if (! empty($newlang))
|
||||||
{
|
{
|
||||||
$outputlangs = new Translate("",$conf);
|
$outputlangs = new Translate("",$conf);
|
||||||
$outputlangs->setDefaultLang($newlang);
|
$outputlangs->setDefaultLang($newlang);
|
||||||
}
|
}
|
||||||
|
|
||||||
$ret=$object->fetch($id); // Reload to get new records
|
$ret=$object->fetch($id); // Reload to get new records
|
||||||
commande_pdf_create($db, $object, $object->modelpdf, $outputlangs, GETPOST('hidedetails'), GETPOST('hidedesc'), GETPOST('hideref'), $hookmanager);
|
commande_pdf_create($db, $object, $object->modelpdf, $outputlangs, GETPOST('hidedetails'), GETPOST('hidedesc'), GETPOST('hideref'), $hookmanager);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -221,15 +221,14 @@ if ($action == 'addline' && $user->rights->fournisseur->commande->creer)
|
|||||||
{
|
{
|
||||||
// Define output language
|
// Define output language
|
||||||
$outputlangs = $langs;
|
$outputlangs = $langs;
|
||||||
$newlang='';
|
$newlang=GETPOST('lang_id','alpha');
|
||||||
if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id','int')) $newlang=GETPOST('lang_id','int');
|
if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang=$object->client->default_lang;
|
||||||
if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang=$object->client->default_lang;
|
|
||||||
if (! empty($newlang))
|
if (! empty($newlang))
|
||||||
{
|
{
|
||||||
$outputlangs = new Translate("",$conf);
|
$outputlangs = new Translate("",$conf);
|
||||||
$outputlangs->setDefaultLang($newlang);
|
$outputlangs->setDefaultLang($newlang);
|
||||||
}
|
}
|
||||||
|
|
||||||
$ret=$object->fetch($id); // Reload to get new records
|
$ret=$object->fetch($id); // Reload to get new records
|
||||||
supplier_order_pdf_create($db, $object, $object->modelpdf, $outputlangs, GETPOST('hidedetails'), GETPOST('hidedesc'), GETPOST('hideref'));
|
supplier_order_pdf_create($db, $object, $object->modelpdf, $outputlangs, GETPOST('hidedetails'), GETPOST('hidedesc'), GETPOST('hideref'));
|
||||||
}
|
}
|
||||||
|
|||||||
@ -509,9 +509,8 @@ elseif ($action == 'addline')
|
|||||||
{
|
{
|
||||||
// Define output language
|
// Define output language
|
||||||
$outputlangs = $langs;
|
$outputlangs = $langs;
|
||||||
$newlang='';
|
$newlang=GETPOST('lang_id','alpha');
|
||||||
if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id','int')) $newlang=GETPOST('lang_id','int');
|
if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang=$object->client->default_lang;
|
||||||
if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang=$object->client->default_lang;
|
|
||||||
if (! empty($newlang))
|
if (! empty($newlang))
|
||||||
{
|
{
|
||||||
$outputlangs = new Translate("",$conf);
|
$outputlangs = new Translate("",$conf);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user