diff --git a/htdocs/commande/fiche.php b/htdocs/commande/fiche.php index 25b6e7c0485..dc737c250d2 100644 --- a/htdocs/commande/fiche.php +++ b/htdocs/commande/fiche.php @@ -642,7 +642,7 @@ if ($action == 'addline' && $user->rights->commande->creer) // Define output language $outputlangs = $langs; $newlang=''; - if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id','int')) $newlang=GETPOST('lang_id','int'); + if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id','alpha')) $newlang=GETPOST('lang_id','alpha'); if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang=$object->client->default_lang; if (! empty($newlang)) { diff --git a/htdocs/fourn/commande/fiche.php b/htdocs/fourn/commande/fiche.php index 4fc711a5830..e42fc5ab098 100644 --- a/htdocs/fourn/commande/fiche.php +++ b/htdocs/fourn/commande/fiche.php @@ -166,12 +166,12 @@ if ($action == 'addline' && $user->rights->fournisseur->commande->creer) $remise_percent = $_POST["remise_percent"] ? $_POST["remise_percent"] : $_POST["p_remise_percent"]; - $tva_tx = get_default_tva($object->client,$mysoc,$product->id); + $tva_tx = get_default_tva($object->thirdparty,$mysoc,$product->id); $type = $product->type; // Local Taxes - $localtax1_tx= get_localtax($tva_tx, 1, $societe); - $localtax2_tx= get_localtax($tva_tx, 2, $societe); + $localtax1_tx= get_localtax($tva_tx, 1, $mysoc); + $localtax2_tx= get_localtax($tva_tx, 2, $mysoc); $result=$object->addline( $desc, diff --git a/htdocs/fourn/facture/fiche.php b/htdocs/fourn/facture/fiche.php index 2fee0a5d84d..c99a409b08a 100644 --- a/htdocs/fourn/facture/fiche.php +++ b/htdocs/fourn/facture/fiche.php @@ -454,10 +454,10 @@ if ($_GET['action'] == 'addline') // $label = '['.$product->ref.'] - '. $product->libelle; $label = $product->description; - $tvatx=get_default_tva($societe,$mysoc,$product->id); + $tvatx=get_default_tva($facfou->thirdparty,$mysoc,$product->id); - $localtax1tx= get_localtax($tvatx, 1, $societe); - $localtax2tx= get_localtax($tvatx, 2, $societe); + $localtax1tx= get_localtax($tvatx, 1, $mysoc); + $localtax2tx= get_localtax($tvatx, 2, $mysoc); $type = $product->type; @@ -473,8 +473,8 @@ if ($_GET['action'] == 'addline') else { $tauxtva = price2num($_POST['tauxtva']); - $localtax1tx= get_localtax($tauxtva, 1, $societe); - $localtax2tx= get_localtax($tauxtva, 2, $societe); + $localtax1tx= get_localtax($tauxtva, 1, $facfou->thirdparty); + $localtax2tx= get_localtax($tauxtva, 2, $facfou->thirdparty); if (! $_POST['label']) { @@ -1852,7 +1852,7 @@ else $delallowed=$user->rights->fournisseur->facture->supprimer; print '
'; - $somethingshown=$formfile->show_documents('facture_fournisseur',$subdir,$filedir,$urlsource,$genallowed,$delallowed,$fac->modelpdf); + $somethingshown=$formfile->show_documents('facture_fournisseur',$subdir,$filedir,$urlsource,$genallowed,$delallowed,$fac->modelpdf,1,0,0,0,0,'','','',$societe->default_lang); $object=$fac;