mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-23 20:00:33 -04:00
Fixes for quotes and credit paths
This commit is contained in:
parent
c7dfa8547f
commit
b97e72d587
@ -41,16 +41,9 @@ class GetCreditPdf extends AbstractService
|
|||||||
|
|
||||||
$file_path = $path.$this->credit->numberFormatter().'.pdf';
|
$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);
|
$file_path = CreateEntityPdf::dispatchNow($this->invitation);
|
||||||
}
|
|
||||||
|
|
||||||
if(config('filesystems.default') == 's3')
|
|
||||||
return TempFile::path(Storage::disk($disk)->url($file_path));
|
|
||||||
|
|
||||||
return Storage::disk($disk)->path($file_path);
|
return Storage::disk($disk)->path($file_path);
|
||||||
}
|
}
|
||||||
|
@ -39,16 +39,9 @@ class GetQuotePdf extends AbstractService
|
|||||||
|
|
||||||
$file_path = $path.$this->quote->numberFormatter().'.pdf';
|
$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);
|
$file_path = CreateEntityPdf::dispatchNow($invitation);
|
||||||
}
|
|
||||||
|
|
||||||
if(config('filesystems.default') == 's3')
|
|
||||||
return TempFile::path(Storage::disk($disk)->url($file_path));
|
|
||||||
|
|
||||||
return Storage::disk($disk)->path($file_path);
|
return Storage::disk($disk)->path($file_path);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user