Skip to content

Commit

Permalink
Merge pull request #6455 from laudeco/fix/generation_billing_on_valid…
Browse files Browse the repository at this point in the history
…ation

generate new pdf when validate billing
  • Loading branch information
eldy committed Feb 22, 2017
2 parents cbe8553 + 2ecf50a commit 5a3873c
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion htdocs/fourn/facture/card.php
Expand Up @@ -187,7 +187,21 @@
if ($result < 0)
{
setEventMessages($object->error,$object->errors,'errors');
}
}else{
$outputlangs = $langs;
$newlang = '';
if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id')) $newlang = GETPOST('lang_id','alpha');
if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang = $object->thirdparty->default_lang;
if (! empty($newlang)) {
$outputlangs = new Translate("", $conf);
$outputlangs->setDefaultLang($newlang);
}
$model=$object->modelpdf;
$ret = $object->fetch($id); // Reload to get new records

$result=$object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref);
if ($result < 0) dol_print_error($db,$result);
}
}
}

Expand Down

0 comments on commit 5a3873c

Please sign in to comment.