From d6aaa0f7ac687bcd649e30b48e2456c57bba37ce Mon Sep 17 00:00:00 2001 From: David Bomba Date: Sun, 13 Mar 2022 09:03:58 +1100 Subject: [PATCH 1/3] Fixes for customer translations for contact register page --- app/Http/Controllers/Auth/ContactRegisterController.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/Http/Controllers/Auth/ContactRegisterController.php b/app/Http/Controllers/Auth/ContactRegisterController.php index 0fd09ecbc2f8..a88efd10ee1e 100644 --- a/app/Http/Controllers/Auth/ContactRegisterController.php +++ b/app/Http/Controllers/Auth/ContactRegisterController.php @@ -17,8 +17,10 @@ use App\Http\Controllers\Controller; use App\Http\Requests\ClientPortal\RegisterRequest; use App\Models\Client; use App\Models\Company; +use App\Utils\Ninja; use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Hash; +use Illuminate\Support\Facades\App; class ContactRegisterController extends Controller { @@ -29,10 +31,15 @@ class ContactRegisterController extends Controller public function showRegisterForm(string $company_key = '') { + $key = request()->session()->has('company_key') ? request()->session()->get('company_key') : $company_key; $company = Company::where('company_key', $key)->firstOrFail(); + App::forgetInstance('translator'); + $t = app('translator'); + $t->replace(Ninja::transformTranslations($company->settings)); + return render('auth.register', ['company' => $company, 'account' => $company->account]); } From 93bff4cfbba1a76fea1fd5fa471e0dfedcc5286b Mon Sep 17 00:00:00 2001 From: David Bomba Date: Sun, 13 Mar 2022 12:14:40 +1100 Subject: [PATCH 2/3] Disable transaction events in self hosted --- app/Jobs/Ninja/TransactionLog.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Jobs/Ninja/TransactionLog.php b/app/Jobs/Ninja/TransactionLog.php index 8694f65c1990..06f9eef5a3ee 100644 --- a/app/Jobs/Ninja/TransactionLog.php +++ b/app/Jobs/Ninja/TransactionLog.php @@ -86,8 +86,8 @@ class TransactionLog implements ShouldQueue */ public function handle() { - // if(!Ninja::isHosted()) - // return; + if(!Ninja::isHosted()) + return; $this->setTransformer(); From 94730fe924ab63ad129e27492482181955365a9c Mon Sep 17 00:00:00 2001 From: David Bomba Date: Sun, 13 Mar 2022 12:18:20 +1100 Subject: [PATCH 3/3] Fixes for auto bill time scheduling --- app/Console/Kernel.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php index 1a1c9388512a..14f046edecaf 100644 --- a/app/Console/Kernel.php +++ b/app/Console/Kernel.php @@ -64,7 +64,7 @@ class Kernel extends ConsoleKernel $schedule->job(new RecurringExpensesCron)->dailyAt('00:10')->withoutOverlapping(); - $schedule->job(new AutoBillCron)->dailyAt('12:20')->withoutOverlapping(); + $schedule->job(new AutoBillCron)->dailyAt('06:00')->withoutOverlapping(); $schedule->job(new SchedulerCheck)->daily()->withoutOverlapping();