FIX: payment creation: re-generate invoice PDF with correct display options
This commit is contained in:
parent
521dec7792
commit
ee96fb6470
@ -440,8 +440,13 @@ class Paiement extends CommonObject
|
|||||||
$outputlangs = new Translate("", $conf);
|
$outputlangs = new Translate("", $conf);
|
||||||
$outputlangs->setDefaultLang($newlang);
|
$outputlangs->setDefaultLang($newlang);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$hidedetails = ! empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS) ? 1 : 0;
|
||||||
|
$hidedesc = ! empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DESC) ? 1 : 0;
|
||||||
|
$hideref = !empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_REF) ? 1 : 0;
|
||||||
|
|
||||||
$ret = $invoice->fetch($facid); // Reload to get new records
|
$ret = $invoice->fetch($facid); // Reload to get new records
|
||||||
$result = $invoice->generateDocument($invoice->modelpdf, $outputlangs);
|
$result = $invoice->generateDocument($invoice->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref);
|
||||||
if ($result < 0) {
|
if ($result < 0) {
|
||||||
setEventMessages($invoice->error, $invoice->errors, 'errors');
|
setEventMessages($invoice->error, $invoice->errors, 'errors');
|
||||||
$error++;
|
$error++;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user