Better fix.
This commit is contained in:
parent
baf6a26834
commit
9cd766a870
@ -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))
|
||||
{
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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 '<br>';
|
||||
$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;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user