mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-23 20:00:33 -04:00
Minor fixes for paths in hosted
This commit is contained in:
parent
119b07fe03
commit
183e8ac36f
@ -14,6 +14,7 @@ namespace App\Mail\Engine;
|
||||
use App\DataMapper\EmailTemplateDefaults;
|
||||
use App\Models\Account;
|
||||
use App\Utils\Helpers;
|
||||
use App\Utils\Ninja;
|
||||
use App\Utils\Number;
|
||||
use App\Utils\Traits\MakesDates;
|
||||
|
||||
@ -77,7 +78,10 @@ class PaymentEmailEngine extends BaseEmailEngine
|
||||
|
||||
$this->payment->invoices->each(function ($invoice){
|
||||
|
||||
$this->setAttachments([$invoice->pdf_file_path($invoice->invitations->first())]);
|
||||
if(Ninja::isHosted())
|
||||
$this->setAttachments([$invoice->pdf_file_path($invoice->invitations->first(), 'url', true)]);
|
||||
else
|
||||
$this->setAttachments([$invoice->pdf_file_path($invoice->invitations->first())]);
|
||||
|
||||
});
|
||||
|
||||
|
@ -414,7 +414,7 @@ class Invoice extends BaseModel
|
||||
if(Ninja::isHosted() && $portal && Storage::disk(config('filesystems.default'))->exists($file_path)){
|
||||
return Storage::disk(config('filesystems.default'))->{$type}($file_path);
|
||||
}
|
||||
elseif(Ninja::isHosted() && $portal){
|
||||
elseif(Ninja::isHosted()){
|
||||
$file_path = CreateEntityPdf::dispatchNow($invitation, config('filesystems.default'));
|
||||
return Storage::disk(config('filesystems.default'))->{$type}($file_path);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user