From 3f7018c4074d73202ca8ce43a1acc6a7cbbbc054 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Thu, 19 Aug 2021 08:02:28 +1000 Subject: [PATCH] Translations in reminders --- app/Jobs/Util/ReminderJob.php | 5 +++ ...comma_as_decimal_place_companies_table.php | 32 +++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 database/migrations/2021_08_18_220124_use_comma_as_decimal_place_companies_table.php diff --git a/app/Jobs/Util/ReminderJob.php b/app/Jobs/Util/ReminderJob.php index 62835f456196..e4240b49ac82 100644 --- a/app/Jobs/Util/ReminderJob.php +++ b/app/Jobs/Util/ReminderJob.php @@ -25,6 +25,7 @@ use Illuminate\Foundation\Bus\Dispatchable; use Illuminate\Queue\InteractsWithQueue; use Illuminate\Queue\SerializesModels; use Illuminate\Support\Carbon; +use Illuminate\Support\Facades\App; class ReminderJob implements ShouldQueue { @@ -148,6 +149,10 @@ class ReminderJob implements ShouldQueue */ private function setLateFee($invoice, $amount, $percent) :Invoice { + App::forgetInstance('translator'); + $t = app('translator'); + $t->replace(Ninja::transformTranslations($invoice->client->getMergedSettings())); + $temp_invoice_balance = $invoice->balance; if ($amount <= 0 && $percent <= 0) { diff --git a/database/migrations/2021_08_18_220124_use_comma_as_decimal_place_companies_table.php b/database/migrations/2021_08_18_220124_use_comma_as_decimal_place_companies_table.php new file mode 100644 index 000000000000..d5330bea293b --- /dev/null +++ b/database/migrations/2021_08_18_220124_use_comma_as_decimal_place_companies_table.php @@ -0,0 +1,32 @@ +boolean('use_comma_as_decimal_place')->default(0); + }); + + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + // + } +}