2
0
forked from Wavyzz/dolibarr

Standardize code around model_pdf

This commit is contained in:
Laurent Destailleur
2020-09-10 01:49:09 +02:00
parent fb51fe1087
commit b8fe2188a6
69 changed files with 196 additions and 221 deletions

View File

@@ -196,7 +196,7 @@ class Documents extends DolibarrApi
throw new RestException(404, 'Invoice not found');
}
$templateused = $doctemplate ? $doctemplate : $this->invoice->modelpdf;
$templateused = $doctemplate ? $doctemplate : $this->invoice->model_pdf;
$result = $this->invoice->generateDocument($templateused, $outputlangs, $hidedetails, $hidedesc, $hideref);
if ($result <= 0) {
throw new RestException(500, 'Error generating document');
@@ -210,7 +210,7 @@ class Documents extends DolibarrApi
if (!$result) {
throw new RestException(404, 'Order not found');
}
$templateused = $doctemplate ? $doctemplate : $this->order->modelpdf;
$templateused = $doctemplate ? $doctemplate : $this->order->model_pdf;
$result = $this->order->generateDocument($templateused, $outputlangs, $hidedetails, $hidedesc, $hideref);
if ($result <= 0) {
throw new RestException(500, 'Error generating document');
@@ -224,7 +224,7 @@ class Documents extends DolibarrApi
if (!$result) {
throw new RestException(404, 'Proposal not found');
}
$templateused = $doctemplate ? $doctemplate : $this->propal->modelpdf;
$templateused = $doctemplate ? $doctemplate : $this->propal->model_pdf;
$result = $this->propal->generateDocument($templateused, $outputlangs, $hidedetails, $hidedesc, $hideref);
if ($result <= 0) {
throw new RestException(500, 'Error generating document');