From f643cb587fe7586fc40952fb29619ac3c90f6562 Mon Sep 17 00:00:00 2001 From: = Date: Mon, 23 Aug 2021 20:14:04 +1000 Subject: [PATCH 1/4] Fixes for translations --- app/Jobs/Company/CompanyExport.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/Jobs/Company/CompanyExport.php b/app/Jobs/Company/CompanyExport.php index 504c0dc599ac..4062d37c0cd6 100644 --- a/app/Jobs/Company/CompanyExport.php +++ b/app/Jobs/Company/CompanyExport.php @@ -35,6 +35,7 @@ use Illuminate\Queue\SerializesModels; use Illuminate\Support\Facades\Storage; use ZipStream\Option\Archive; use ZipStream\ZipStream; +use Illuminate\Support\Facades\App; class CompanyExport implements ShouldQueue { @@ -499,6 +500,10 @@ class CompanyExport implements ShouldQueue Storage::disk(config('filesystems.default'))->put('backups/'.$file_name, file_get_contents($zip_path)); } + App::forgetInstance('translator'); + $t = app('translator'); + $t->replace(Ninja::transformTranslations($this->company->settings)); + $nmo = new NinjaMailerObject; $nmo->mailable = new DownloadBackup(Storage::disk(config('filesystems.default'))->url('backups/'.$file_name), $this->company); $nmo->to_user = $this->user; From 4bf6ea8e75cd333c0ab9091a2fb9675c1aaad81c Mon Sep 17 00:00:00 2001 From: David Bomba Date: Tue, 24 Aug 2021 07:15:33 +1000 Subject: [PATCH 2/4] Fixes for Company Export --- app/Jobs/Company/CompanyExport.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Jobs/Company/CompanyExport.php b/app/Jobs/Company/CompanyExport.php index 4062d37c0cd6..239104c4102d 100644 --- a/app/Jobs/Company/CompanyExport.php +++ b/app/Jobs/Company/CompanyExport.php @@ -479,7 +479,7 @@ class CompanyExport implements ShouldQueue private function zipAndSend() { - $file_name = date('Y-m-d').'_'.str_replace(' ', '_', $this->company->present()->name() . '_' . $this->company->company_key .'.zip'); + $file_name = date('Y-m-d').'_'.str_replace([" ", "/"],["_",""], $this->company->present()->name() . '_' . $this->company->company_key .'.zip'); $path = 'backups'; From 9be33bfdf78c63c5be31822cdc920f6b985aad4b Mon Sep 17 00:00:00 2001 From: David Bomba Date: Tue, 24 Aug 2021 15:58:43 +1000 Subject: [PATCH 3/4] Fixes for quote services --- app/Services/Quote/CreateInvitations.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Services/Quote/CreateInvitations.php b/app/Services/Quote/CreateInvitations.php index c1092b10ea5d..b2e42395e088 100644 --- a/app/Services/Quote/CreateInvitations.php +++ b/app/Services/Quote/CreateInvitations.php @@ -60,7 +60,7 @@ class CreateInvitations private function createBlankContact() { - $new_contact = ClientContacstFactory::create($this->quote->company_id, $this->quote->user_id); + $new_contact = ClientContactFactory::create($this->quote->company_id, $this->quote->user_id); $new_contact->client_id = $this->quote->client_id; $new_contact->contact_key = Str::random(40); $new_contact->is_primary = true; From b4b017277338913d16a3840da04245e3c8a047c9 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Tue, 24 Aug 2021 20:14:59 +1000 Subject: [PATCH 4/4] Minor fixes for recurring --- app/Jobs/RecurringInvoice/SendRecurring.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Jobs/RecurringInvoice/SendRecurring.php b/app/Jobs/RecurringInvoice/SendRecurring.php index 6ee4bf3b3954..63ce5c2e030f 100644 --- a/app/Jobs/RecurringInvoice/SendRecurring.php +++ b/app/Jobs/RecurringInvoice/SendRecurring.php @@ -72,7 +72,8 @@ class SendRecurring implements ShouldQueue $invoice->date = now()->format('Y-m-d'); $invoice->due_date = $this->recurring_invoice->calculateDueDate(now()->format('Y-m-d')); - + $invoice->recurring_id = $this->recurring_invoice->id; + if($invoice->client->getSetting('auto_email_invoice')) { $invoice = $invoice->service()