1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 21:22:58 +01:00

Merge pull request #6507 from turbo124/v5-develop

Fixes for translations
This commit is contained in:
David Bomba 2021-08-24 20:15:23 +10:00 committed by GitHub
commit 82a4b19d6a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 3 deletions

View File

@ -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
{
@ -478,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';
@ -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;

View File

@ -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()

View File

@ -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;