Merge branch 'dillon/34.1-jenkins-vapor' into vapor/development

This commit is contained in:
Dillon Ngo
2024-04-26 15:27:21 +08:00
@@ -75,7 +75,13 @@ class BulkDownloadCustomerInvoicesLogic
$zipDataStr .= $fileContent;
}
$zipFileName = "invoices_{$startDate}_to_{$endDate}_{$company->reference}.zip";
$zipDirectory = storage_path('app/bulk_invoice'); // Update this with the actual directory path
if (!file_exists($zipDirectory)) {
mkdir($zipDirectory, 0755, true);
}
$zipFileName = "{$zipDirectory}/invoices_{$startDate}_to_{$endDate}_{$company->reference}.zip";
if ($zip->open($zipFileName, ZipArchive::CREATE | ZipArchive::OVERWRITE)) {
$zip->addFromString($zipFileName, $zipDataStr);