Merge pull request #9140 from bugness-chl/8.0-bugfix-pdf

FIX 2 bugfix for PDF generated by Templates/Cron: DueDate and translation
This commit is contained in:
Laurent Destailleur 2018-07-24 17:47:37 +02:00 committed by GitHub
commit a469f841f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -984,6 +984,7 @@ class FactureRec extends CommonInvoice
$error=0;
$langs->load("bills");
$langs->load('main');
$nb_create=0;
@ -1060,6 +1061,8 @@ class FactureRec extends CommonInvoice
}
if (! $error && $facturerec->generate_pdf)
{
// We refresh the object in order to have all necessary data (like date_lim_reglement)
$facture->fetch($facture->id);
$result = $facture->generateDocument($facturerec->modelpdf, $langs);
if ($result <= 0)
{