Translations in reminders

This commit is contained in:
David Bomba 2021-08-19 08:02:28 +10:00
parent 9fcaaf6302
commit 3f7018c407
2 changed files with 37 additions and 0 deletions

View File

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

View File

@ -0,0 +1,32 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class UseCommaAsDecimalPlaceCompaniesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('companies', function (Blueprint $table) {
$table->boolean('use_comma_as_decimal_place')->default(0);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
//
}
}