Skip to content

Commit

Permalink
generate new pdf when validate billing
Browse files Browse the repository at this point in the history
  • Loading branch information
De Coninck Laurent committed Feb 21, 2017
1 parent 04d7366 commit 2ecf50a
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 2ecf50a

Please sign in to comment.