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:
commit
a469f841f7
@ -984,6 +984,7 @@ class FactureRec extends CommonInvoice
|
|||||||
$error=0;
|
$error=0;
|
||||||
|
|
||||||
$langs->load("bills");
|
$langs->load("bills");
|
||||||
|
$langs->load('main');
|
||||||
|
|
||||||
$nb_create=0;
|
$nb_create=0;
|
||||||
|
|
||||||
@ -1060,6 +1061,8 @@ class FactureRec extends CommonInvoice
|
|||||||
}
|
}
|
||||||
if (! $error && $facturerec->generate_pdf)
|
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);
|
$result = $facture->generateDocument($facturerec->modelpdf, $langs);
|
||||||
if ($result <= 0)
|
if ($result <= 0)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user