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];
$logo = $this->getLogo();
$invoiceData = $this->gestionBdd->getInvoicePdfDataByClientAndMonthYear($clientId,$month,$year,$currentConfig);
if($invoiceData == null){
return "";
if(empty($invoiceData)){
return null;
}
$pdf = new InvoicePdfHandler();
$pdf->MutlipleInvoicePdfFactory($invoiceData,$logo);