diff --git a/app/Jobs/Company/CompanyExport.php b/app/Jobs/Company/CompanyExport.php new file mode 100644 index 000000000000..da3ee70cd9d0 --- /dev/null +++ b/app/Jobs/Company/CompanyExport.php @@ -0,0 +1,57 @@ +company = $company; + $this->export_format = $export_format; + } + + /** + * Execute the job. + * + * @return CompanyToken|null + */ + public function handle() : void + { + + MultiDB::setDb($this->company->db); + + set_time_limit(0); + + + } + +} diff --git a/app/Jobs/Mail/NinjaMailerJob.php b/app/Jobs/Mail/NinjaMailerJob.php index 0fb06a7f44c6..6e8777750635 100644 --- a/app/Jobs/Mail/NinjaMailerJob.php +++ b/app/Jobs/Mail/NinjaMailerJob.php @@ -85,6 +85,10 @@ class NinjaMailerJob implements ShouldQueue $this->nmo->mailable->replyTo($this->nmo->settings->reply_to_email, $reply_to_name); } + else { + $this->nmo->mailable->replyTo($this->nmo->company->owner()->email, $this->nmo->company->owner()->present()->name()); + } + if (strlen($this->nmo->settings->bcc_email) > 1) { nlog('bcc list available'); diff --git a/app/Mail/TemplateEmail.php b/app/Mail/TemplateEmail.php index f9e3196c2fe7..1568c290e96a 100644 --- a/app/Mail/TemplateEmail.php +++ b/app/Mail/TemplateEmail.php @@ -107,7 +107,7 @@ class TemplateEmail extends Mailable }); //conditionally attach files - if ($settings->pdf_email_attachment !== false && ! empty($this->build_email->getAttachments())) { + // if ($settings->pdf_email_attachment !== false && ! empty($this->build_email->getAttachments())) { //hosted | plan check here foreach ($this->build_email->getAttachments() as $file) { @@ -118,7 +118,7 @@ class TemplateEmail extends Mailable $this->attach($file['path'], ['as' => $file['name'], 'mime' => $file['mime']]); } - } + // } return $this; } diff --git a/app/Models/Invoice.php b/app/Models/Invoice.php index d3da0af8b89f..7acfb3258875 100644 --- a/app/Models/Invoice.php +++ b/app/Models/Invoice.php @@ -415,6 +415,8 @@ class Invoice extends BaseModel CreateEntityPdf::dispatchNow($invitation); } +nlog($storage_path); + return $storage_path; } diff --git a/app/Utils/SystemHealth.php b/app/Utils/SystemHealth.php index 552d580df458..3d1d72317977 100644 --- a/app/Utils/SystemHealth.php +++ b/app/Utils/SystemHealth.php @@ -82,9 +82,20 @@ class SystemHealth 'mail_mailer' => (string)self::checkMailMailer(), 'flutter_renderer' => (string)config('ninja.flutter_canvas_kit'), 'jobs_pending' => (int) Queue::size(), + 'pdf_engine' => (string) self::getPdfEngine(), ]; } + public static function getPdfEngine() + { + if(config('ninja.invoiceninja_hosted_pdf_generation')) + return 'Invoice Ninja Hosted PDF Generator'; + elseif(config('ninja.phantomjs_pdf_generation')) + return 'Phantom JS Web Generator'; + else + return 'SnapPDF PDF Generator'; + } + public static function checkMailMailer() { return config('mail.default');