1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-29 04:37:11 +02:00

Merge pull request #5867 from turbo124/v5-stable

5.1.68
This commit is contained in:
David Bomba 2021-06-01 07:42:44 +10:00 committed by GitHub
commit 0da9d9b1c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
21 changed files with 75539 additions and 75355 deletions

View File

@ -1 +1 @@
5.1.67 5.1.68

View File

@ -68,7 +68,7 @@ class CompanySettings extends BaseSettings
public $inclusive_taxes = false; //@implemented public $inclusive_taxes = false; //@implemented
public $quote_footer = ''; //@implmented public $quote_footer = ''; //@implmented
public $translations; //@TODO not used anywhere public $translations;
public $counter_number_applied = 'when_saved'; // when_saved , when_sent //@implemented public $counter_number_applied = 'when_saved'; // when_saved , when_sent //@implemented
public $quote_number_applied = 'when_saved'; // when_saved , when_sent //@implemented public $quote_number_applied = 'when_saved'; // when_saved , when_sent //@implemented

View File

@ -15,6 +15,7 @@ use App\Events\Client\ClientWasCreated;
use App\Events\Client\ClientWasUpdated; use App\Events\Client\ClientWasUpdated;
use App\Factory\ClientFactory; use App\Factory\ClientFactory;
use App\Filters\ClientFilters; use App\Filters\ClientFilters;
use App\Http\Requests\Client\AdjustClientLedgerRequest;
use App\Http\Requests\Client\CreateClientRequest; use App\Http\Requests\Client\CreateClientRequest;
use App\Http\Requests\Client\DestroyClientRequest; use App\Http\Requests\Client\DestroyClientRequest;
use App\Http\Requests\Client\EditClientRequest; use App\Http\Requests\Client\EditClientRequest;
@ -636,10 +637,13 @@ class ClientController extends BaseController
* ), * ),
* ) * )
*/ */
//@deprecated - not available
public function adjustLedger(Request $request, Client $client) public function adjustLedger(AdjustClientLedgerRequest $request, Client $client)
{ {
// $adjustment = $request->input('adjustment');
// $notes = $request->input('notes');
// $client->service()->updateBalance
} }
} }

View File

@ -99,9 +99,10 @@ class PreviewController extends BaseController
$entity_obj->load('client'); $entity_obj->load('client');
App::setLocale($entity_obj->client->primary_contact()->preferredLocale());
App::forgetInstance('translator'); App::forgetInstance('translator');
Lang::replace(Ninja::transformTranslations($entity_obj->client->getMergedSettings())); $t = app('translator');
App::setLocale($entity_obj->client->primary_contact()->preferredLocale());
$t->replace(Ninja::transformTranslations($entity_obj->client->getMergedSettings()));
$html = new HtmlEngine($entity_obj->invitations()->first()); $html = new HtmlEngine($entity_obj->invitations()->first());
@ -151,7 +152,8 @@ class PreviewController extends BaseController
private function blankEntity() private function blankEntity()
{ {
App::forgetInstance('translator'); App::forgetInstance('translator');
Lang::replace(Ninja::transformTranslations(auth()->user()->company()->settings)); $t = app('translator');
$t->replace(Ninja::transformTranslations(auth()->user()->company()->settings));
DB::beginTransaction(); DB::beginTransaction();

View File

@ -163,7 +163,7 @@ class SetupController extends Controller
/* Create the first account. */ /* Create the first account. */
if (Account::count() == 0) { if (Account::count() == 0) {
CreateAccount::dispatchNow($request->all()); CreateAccount::dispatchNow($request->all(), $request->getClientIp());
} }
VersionCheck::dispatchNow(); VersionCheck::dispatchNow();

View File

@ -34,7 +34,9 @@ class PortalComposer
$view->with($this->portalData()); $view->with($this->portalData());
if (auth()->user()) { if (auth()->user()) {
Lang::replace(Ninja::transformTranslations(auth()->user()->client->getMergedSettings())); App::forgetInstance('translator');
$t = app('translator');
$t->replace(Ninja::transformTranslations(auth()->user()->client->getMergedSettings()));
} }
} }

View File

@ -25,6 +25,7 @@ use App\Models\RecurringInvoice;
use App\Models\RecurringInvoiceInvitation; use App\Models\RecurringInvoiceInvitation;
use App\Models\User; use App\Models\User;
use App\Models\VendorContact; use App\Models\VendorContact;
use App\Utils\Ninja;
use App\Utils\Traits\MakesHash; use App\Utils\Traits\MakesHash;
use Illuminate\Bus\Queueable; use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Contracts\Queue\ShouldQueue;
@ -489,6 +490,10 @@ class CompanyExport implements ShouldQueue
$zip->addFromString("backup.json", json_encode($this->export_data)); $zip->addFromString("backup.json", json_encode($this->export_data));
$zip->close(); $zip->close();
if(Ninja::isHosted()) {
Storage::disk(config('filesystems.default'))->put('backups/'.$file_name, file_get_contents($zip_path));
}
$nmo = new NinjaMailerObject; $nmo = new NinjaMailerObject;
$nmo->mailable = new DownloadBackup(Storage::disk(config('filesystems.default'))->url('backups/'.$file_name), $this->company); $nmo->mailable = new DownloadBackup(Storage::disk(config('filesystems.default'))->url('backups/'.$file_name), $this->company);
$nmo->to_user = $this->user; $nmo->to_user = $this->user;
@ -498,6 +503,7 @@ class CompanyExport implements ShouldQueue
NinjaMailerJob::dispatch($nmo); NinjaMailerJob::dispatch($nmo);
UnlinkFile::dispatch(config('filesystems.default'), 'backups/'.$file_name)->delay(now()->addHours(1)); UnlinkFile::dispatch(config('filesystems.default'), 'backups/'.$file_name)->delay(now()->addHours(1));
UnlinkFile::dispatch('public', 'backups/'.$file_name)->delay(now()->addHours(1));
} }
} }

View File

@ -93,17 +93,19 @@ class CreateEntityPdf implements ShouldQueue
public function handle() public function handle()
{ {
/* Set the locale*/
App::setLocale($this->contact->preferredLocale());
/* Forget the singleton*/ /* Forget the singleton*/
App::forgetInstance('translator'); App::forgetInstance('translator');
/* Init a new copy of the translator*/ /* Init a new copy of the translator*/
$t = app('translator'); $t = app('translator');
/* Set the locale*/
App::setLocale($this->contact->preferredLocale());
// nlog($this->entity->client->getMergedSettings());
/* Set customized translations _NOW_ */ /* Set customized translations _NOW_ */
Lang::replace(Ninja::transformTranslations($this->entity->client->getMergedSettings())); $t->replace(Ninja::transformTranslations($this->entity->client->getMergedSettings()));
$this->entity->service()->deletePdf(); $this->entity->service()->deletePdf();

View File

@ -154,9 +154,9 @@ class NinjaMailerJob implements ShouldQueue
App::forgetInstance('mail.manager'); //singletons must be destroyed! App::forgetInstance('mail.manager'); //singletons must be destroyed!
App::forgetInstance('mailer'); App::forgetInstance('mailer');
App::forgetInstance('laravelgmail'); App::forgetInstance('laravelgmail');
$t = app('translator');
/* Inject custom translations if any exist */ /* Inject custom translations if any exist */
Lang::replace(Ninja::transformTranslations($this->nmo->settings)); $t->replace(Ninja::transformTranslations($this->nmo->settings));
switch ($this->nmo->settings->email_sending_method) { switch ($this->nmo->settings->email_sending_method) {
case 'default': case 'default':

View File

@ -44,7 +44,8 @@ class CreditEmailEngine extends BaseEmailEngine
public function build() public function build()
{ {
App::forgetInstance('translator'); App::forgetInstance('translator');
Lang::replace(Ninja::transformTranslations($this->client->getMergedSettings())); $t = app('translator');
$t->replace(Ninja::transformTranslations($this->client->getMergedSettings()));
if (is_array($this->template_data) && array_key_exists('body', $this->template_data) && strlen($this->template_data['body']) > 0) { if (is_array($this->template_data) && array_key_exists('body', $this->template_data) && strlen($this->template_data['body']) > 0) {
$body_template = $this->template_data['body']; $body_template = $this->template_data['body'];

View File

@ -47,7 +47,8 @@ class InvoiceEmailEngine extends BaseEmailEngine
{ {
App::forgetInstance('translator'); App::forgetInstance('translator');
Lang::replace(Ninja::transformTranslations($this->client->getMergedSettings())); $t = app('translator');
$t->replace(Ninja::transformTranslations($this->client->getMergedSettings()));
if (is_array($this->template_data) && array_key_exists('body', $this->template_data) && strlen($this->template_data['body']) > 0) { if (is_array($this->template_data) && array_key_exists('body', $this->template_data) && strlen($this->template_data['body']) > 0) {
$body_template = $this->template_data['body']; $body_template = $this->template_data['body'];

View File

@ -45,7 +45,8 @@ class QuoteEmailEngine extends BaseEmailEngine
public function build() public function build()
{ {
App::forgetInstance('translator'); App::forgetInstance('translator');
Lang::replace(Ninja::transformTranslations($this->client->getMergedSettings())); $t = app('translator');
$t->replace(Ninja::transformTranslations($this->client->getMergedSettings()));
if (is_array($this->template_data) && array_key_exists('body', $this->template_data) && strlen($this->template_data['body']) > 0) { if (is_array($this->template_data) && array_key_exists('body', $this->template_data) && strlen($this->template_data['body']) > 0) {
$body_template = $this->template_data['body']; $body_template = $this->template_data['body'];

View File

@ -106,7 +106,8 @@ class TemplateEngine
} }
App::forgetInstance('translator'); App::forgetInstance('translator');
Lang::replace(Ninja::transformTranslations($this->settings)); $t = app('translator');
$t->replace(Ninja::transformTranslations($this->settings));
return $this; return $this;
} }

View File

@ -14,8 +14,8 @@ return [
'require_https' => env('REQUIRE_HTTPS', true), 'require_https' => env('REQUIRE_HTTPS', true),
'app_url' => rtrim(env('APP_URL', ''), '/'), 'app_url' => rtrim(env('APP_URL', ''), '/'),
'app_domain' => env('APP_DOMAIN', 'invoicing.co'), 'app_domain' => env('APP_DOMAIN', 'invoicing.co'),
'app_version' => '5.1.67', 'app_version' => '5.1.68',
'app_tag' => '5.1.67-release', 'app_tag' => '5.1.68-release',
'minimum_client_version' => '5.0.16', 'minimum_client_version' => '5.0.16',
'terms_version' => '1.0.1', 'terms_version' => '1.0.1',
'api_secret' => env('API_SECRET', ''), 'api_secret' => env('API_SECRET', ''),

View File

@ -5,7 +5,7 @@ const CACHE_NAME = 'flutter-app-cache';
const RESOURCES = { const RESOURCES = {
"version.json": "9fe5b22a16f39b766c8fdc35a24b3efa", "version.json": "9fe5b22a16f39b766c8fdc35a24b3efa",
"favicon.ico": "51636d3a390451561744c42188ccd628", "favicon.ico": "51636d3a390451561744c42188ccd628",
"main.dart.js": "55df523d1b81bba3d88e7b77511c7a87", "main.dart.js": "4ed39edfd85c4ac1e202b7c83715f20d",
"/": "23224b5e03519aaa87594403d54412cf", "/": "23224b5e03519aaa87594403d54412cf",
"assets/packages/material_design_icons_flutter/lib/fonts/materialdesignicons-webfont.ttf": "174c02fc4609e8fc4389f5d21f16a296", "assets/packages/material_design_icons_flutter/lib/fonts/materialdesignicons-webfont.ttf": "174c02fc4609e8fc4389f5d21f16a296",
"assets/AssetManifest.json": "659dcf9d1baf3aed3ab1b9c42112bf8f", "assets/AssetManifest.json": "659dcf9d1baf3aed3ab1b9c42112bf8f",

Binary file not shown.

After

Width:  |  Height:  |  Size: 622 KiB

75778
public/main.dart.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

75030
public/main.foss.dart.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -10,7 +10,7 @@
<div class="grid lg:grid-cols-3"> <div class="grid lg:grid-cols-3">
@if($account && !$account->isPaid()) @if($account && !$account->isPaid())
<div class="hidden lg:block col-span-1 bg-red-100 h-screen"> <div class="hidden lg:block col-span-1 bg-red-100 h-screen">
<img src="{{ asset('images/bg-home2018b.jpg') }}" <img src="{{ asset('images/client-portal-new-image.jpg') }}"
class="w-full h-screen object-cover" class="w-full h-screen object-cover"
alt="Background image"> alt="Background image">
</div> </div>