1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 05:02:36 +01:00

Add thai baht currency code.

This commit is contained in:
David Bomba 2023-07-12 19:15:52 +10:00
parent ef6dca6414
commit 75549a726c
2 changed files with 35 additions and 1 deletions

View File

@ -17,7 +17,7 @@ class EncryptedCast implements CastsAttributes
{
public function get($model, string $key, $value, array $attributes)
{
return strlen($value) > 1 ? decrypt($value) : null;
return is_string($value) && strlen($value) > 1 ? decrypt($value) : null;
}
public function set($model, string $key, $value, array $attributes)

View File

@ -0,0 +1,34 @@
<?php
use App\Models\Currency;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
$tb = Currency::find(21);
if($tb) {
$tb->symbol = '฿';
$tb->save();
}
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
//
}
};