1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-13 06:32:40 +01:00

Fixes for quotes and credit paths

This commit is contained in:
David Bomba 2021-05-15 12:31:17 +10:00
parent c7dfa8547f
commit b97e72d587
2 changed files with 4 additions and 18 deletions

View File

@ -41,16 +41,9 @@ class GetCreditPdf extends AbstractService
$file_path = $path.$this->credit->numberFormatter().'.pdf';
$disk = config('filesystems.default');
$disk = 'public';
$file = Storage::disk($disk)->exists($file_path);
if (! $file) {
$file_path = CreateEntityPdf::dispatchNow($this->invitation);
}
if(config('filesystems.default') == 's3')
return TempFile::path(Storage::disk($disk)->url($file_path));
$file_path = CreateEntityPdf::dispatchNow($this->invitation);
return Storage::disk($disk)->path($file_path);
}

View File

@ -39,16 +39,9 @@ class GetQuotePdf extends AbstractService
$file_path = $path.$this->quote->numberFormatter().'.pdf';
$disk = config('filesystems.default');
$disk = 'public';
$file = Storage::disk($disk)->exists($file_path);
if (! $file) {
$file_path = CreateEntityPdf::dispatchNow($invitation);
}
if(config('filesystems.default') == 's3')
return TempFile::path(Storage::disk($disk)->url($file_path));
$file_path = CreateEntityPdf::dispatchNow($invitation);
return Storage::disk($disk)->path($file_path);
}