return null when pdf data is empty

This commit is contained in:
Tiavina 2025-01-06 11:06:10 +03:00
parent 3d75d77574
commit 5ff78abe2c

View File

@ -124,8 +124,8 @@ class InvoicePdfService {
$currentConfig = $configs[0]; $currentConfig = $configs[0];
$logo = $this->getLogo(); $logo = $this->getLogo();
$invoiceData = $this->gestionBdd->getInvoicePdfDataByClientAndMonthYear($clientId,$month,$year,$currentConfig); $invoiceData = $this->gestionBdd->getInvoicePdfDataByClientAndMonthYear($clientId,$month,$year,$currentConfig);
if($invoiceData == null){ if(empty($invoiceData)){
return ""; return null;
} }
$pdf = new InvoicePdfHandler(); $pdf = new InvoicePdfHandler();
$pdf->MutlipleInvoicePdfFactory($invoiceData,$logo); $pdf->MutlipleInvoicePdfFactory($invoiceData,$logo);