mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-08 00:52:01 +01:00
Debug v23 - PDF generation error if additional PDF name not set
This commit is contained in:
@@ -641,8 +641,8 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
}
|
||||
|
||||
// Add terms to sale
|
||||
if (getDolGlobalString("MAIN_INFO_ORDER_TERMSOFSALE") && getDolGlobalInt('MAIN_PDF_ADD_TERMSOFSALE_ORDER')) {
|
||||
$termsofsalefilename = getDolGlobalString('MAIN_INFO_ORDER_TERMSOFSALE');
|
||||
$termsofsalefilename = getDolGlobalString('MAIN_INFO_ORDER_TERMSOFSALE');
|
||||
if (getDolGlobalInt('MAIN_PDF_ADD_TERMSOFSALE_ORDER') && $termsofsalefilename) {
|
||||
$termsofsale = $conf->order->dir_output.'/'.$termsofsalefilename;
|
||||
if (!empty($conf->order->multidir_output[$conf->entity])) {
|
||||
$termsofsale = $conf->order->multidir_output[$conf->entity].'/'.$termsofsalefilename;
|
||||
|
||||
@@ -912,8 +912,8 @@ class pdf_eratosthene extends ModelePDFCommandes
|
||||
}
|
||||
|
||||
// Add terms to sale
|
||||
if (getDolGlobalString("MAIN_INFO_ORDER_TERMSOFSALE") && getDolGlobalInt('MAIN_PDF_ADD_TERMSOFSALE_ORDER')) {
|
||||
$termsofsalefilename = getDolGlobalString('MAIN_INFO_ORDER_TERMSOFSALE');
|
||||
$termsofsalefilename = getDolGlobalString('MAIN_INFO_ORDER_TERMSOFSALE');
|
||||
if (getDolGlobalInt('MAIN_PDF_ADD_TERMSOFSALE_ORDER') && $termsofsalefilename) {
|
||||
$termsofsale = $conf->order->dir_output.'/'.$termsofsalefilename;
|
||||
if (!empty($conf->order->multidir_output[$conf->entity])) {
|
||||
$termsofsale = $conf->order->multidir_output[$conf->entity].'/'.$termsofsalefilename;
|
||||
|
||||
@@ -916,8 +916,8 @@ class pdf_crabe extends ModelePDFFactures
|
||||
}
|
||||
|
||||
// Add terms to sale
|
||||
if (getDolGlobalInt('MAIN_PDF_ADD_TERMSOFSALE_INVOICE')) {
|
||||
$termsofsalefilename = getDolGlobalString('MAIN_INFO_INVOICE_TERMSOFSALE');
|
||||
$termsofsalefilename = getDolGlobalString('MAIN_INFO_INVOICE_TERMSOFSALE');
|
||||
if (getDolGlobalInt('MAIN_PDF_ADD_TERMSOFSALE_INVOICE') && $termsofsalefilename) {
|
||||
$termsofsale = $conf->invoice->dir_output.'/'.$termsofsalefilename;
|
||||
if (!empty($conf->invoice->multidir_output[$object->entity ?? $conf->entity])) {
|
||||
$termsofsale = $conf->invoice->multidir_output[$object->entity ?? $conf->entity].'/'.$termsofsalefilename;
|
||||
|
||||
@@ -1190,8 +1190,8 @@ class pdf_octopus extends ModelePDFFactures
|
||||
$pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod
|
||||
}
|
||||
// Add terms to sale
|
||||
if (getDolGlobalInt('MAIN_PDF_ADD_TERMSOFSALE_INVOICE')) {
|
||||
$termsofsalefilename = getDolGlobalString('MAIN_INFO_INVOICE_TERMSOFSALE');
|
||||
$termsofsalefilename = getDolGlobalString('MAIN_INFO_INVOICE_TERMSOFSALE');
|
||||
if (getDolGlobalInt('MAIN_PDF_ADD_TERMSOFSALE_INVOICE') && $termsofsalefilename) {
|
||||
$termsofsale = $conf->invoice->dir_output.'/'.$termsofsalefilename;
|
||||
if (!empty($conf->invoice->multidir_output[$object->entity ?? $conf->entity])) {
|
||||
$termsofsale = $conf->invoice->multidir_output[$object->entity ?? $conf->entity].'/'.$termsofsalefilename;
|
||||
@@ -1220,8 +1220,8 @@ class pdf_octopus extends ModelePDFFactures
|
||||
}
|
||||
|
||||
// Add terms to sale
|
||||
if (getDolGlobalInt('MAIN_PDF_ADD_TERMSOFSALE_INVOICE')) {
|
||||
$termsofsalefilename = getDolGlobalString('MAIN_INFO_INVOICE_TERMSOFSALE');
|
||||
$termsofsalefilename = getDolGlobalString('MAIN_INFO_INVOICE_TERMSOFSALE');
|
||||
if (getDolGlobalInt('MAIN_PDF_ADD_TERMSOFSALE_INVOICE') && $termsofsalefilename) {
|
||||
$termsofsale = $conf->invoice->dir_output.'/'.$termsofsalefilename;
|
||||
if (!empty($conf->invoice->multidir_output[$object->entity ?? $conf->entity])) {
|
||||
$termsofsale = $conf->invoice->multidir_output[$object->entity ?? $conf->entity].'/'.$termsofsalefilename;
|
||||
|
||||
@@ -1107,13 +1107,15 @@ class pdf_sponge extends ModelePDFFactures
|
||||
if (method_exists($pdf, 'AliasNbPages')) {
|
||||
$pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod
|
||||
}
|
||||
|
||||
// Add terms to sale
|
||||
if (getDolGlobalInt('MAIN_PDF_ADD_TERMSOFSALE_INVOICE')) {
|
||||
$termsofsalefilename = getDolGlobalString('MAIN_INFO_INVOICE_TERMSOFSALE');
|
||||
$termsofsalefilename = getDolGlobalString('MAIN_INFO_INVOICE_TERMSOFSALE');
|
||||
if (getDolGlobalInt('MAIN_PDF_ADD_TERMSOFSALE_INVOICE') && $termsofsalefilename) {
|
||||
$termsofsale = $conf->invoice->dir_output.'/'.$termsofsalefilename;
|
||||
if (!empty($conf->invoice->multidir_output[$object->entity ?? $conf->entity])) {
|
||||
$termsofsale = $conf->invoice->multidir_output[$object->entity ?? $conf->entity].'/'.$termsofsalefilename;
|
||||
}
|
||||
|
||||
if (file_exists($termsofsale) && is_readable($termsofsale)) {
|
||||
$pagecount = $pdf->setSourceFile($termsofsale);
|
||||
for ($i = 1; $i <= $pagecount; $i++) {
|
||||
@@ -1498,7 +1500,7 @@ class pdf_sponge extends ModelePDFFactures
|
||||
}
|
||||
|
||||
// Show payments conditions
|
||||
if ($object->type != 2 && ($object->cond_reglement_code || $object->cond_reglement)) {
|
||||
if ($object->type != 2 && $object->cond_reglement_code) {
|
||||
$pdf->SetFont('', '', $default_font_size - 2);
|
||||
$pdf->SetXY($this->marge_gauche, $posy);
|
||||
$titre = $outputlangs->transnoentities("PaymentConditions").':';
|
||||
|
||||
@@ -771,8 +771,8 @@ class pdf_azur extends ModelePDFPropales
|
||||
}
|
||||
|
||||
// Add terms to sale
|
||||
if (getDolGlobalString('MAIN_INFO_PROPAL_TERMSOFSALE') && getDolGlobalInt('MAIN_PDF_ADD_TERMSOFSALE_PROPAL')) {
|
||||
$termsofsalefilename = getDolGlobalString('MAIN_INFO_PROPAL_TERMSOFSALE');
|
||||
$termsofsalefilename = getDolGlobalString('MAIN_INFO_PROPAL_TERMSOFSALE');
|
||||
if (getDolGlobalInt('MAIN_PDF_ADD_TERMSOFSALE_PROPAL') && $termsofsalefilename) {
|
||||
$termsofsale = $conf->propal->dir_output.'/'.$termsofsalefilename;
|
||||
if (!empty($conf->propal->multidir_output[$object->entity ?? $conf->entity])) {
|
||||
$termsofsale = $conf->propal->multidir_output[$object->entity ?? $conf->entity].'/'.$termsofsalefilename;
|
||||
|
||||
@@ -942,8 +942,8 @@ class pdf_cyan extends ModelePDFPropales
|
||||
}
|
||||
|
||||
// Add terms to sale
|
||||
if (getDolGlobalString('MAIN_INFO_PROPAL_TERMSOFSALE') && getDolGlobalInt('MAIN_PDF_ADD_TERMSOFSALE_PROPAL')) {
|
||||
$termsofsalefilename = getDolGlobalString('MAIN_INFO_PROPAL_TERMSOFSALE');
|
||||
$termsofsalefilename = getDolGlobalString('MAIN_INFO_PROPAL_TERMSOFSALE');
|
||||
if (getDolGlobalInt('MAIN_PDF_ADD_TERMSOFSALE_PROPAL') && $termsofsalefilename) {
|
||||
$termsofsale = $conf->propal->dir_output.'/'.$termsofsalefilename;
|
||||
if (!empty($conf->propal->multidir_output[$object->entity ?? $conf->entity])) {
|
||||
$termsofsale = $conf->propal->multidir_output[$object->entity ?? $conf->entity].'/'.$termsofsalefilename;
|
||||
|
||||
Reference in New Issue
Block a user