Currencies can now be enabled and disabled.

This commit is contained in:
James Cole
2018-11-10 10:04:46 +01:00
parent daa8aa5c9d
commit e491dda229
25 changed files with 457 additions and 51 deletions

View File

@@ -0,0 +1,34 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
/**
* Class ChangesForV479
*/
class ChangesForV479 extends Migration
{
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
//
}
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table(
'transaction_currencies',
function (Blueprint $table) {
$table->boolean('enabled')->default(0)->after('deleted_at');
}
);
}
}

View File

@@ -32,7 +32,7 @@ class TransactionCurrencySeeder extends Seeder
{
$currencies = [];
// european currencies
$currencies[] = ['code' => 'EUR', 'name' => 'Euro', 'symbol' => '€', 'decimal_places' => 2];
$currencies[] = ['code' => 'EUR', 'name' => 'Euro', 'symbol' => '€', 'decimal_places' => 2,'enabled' => 1];
$currencies[] = ['code' => 'HUF', 'name' => 'Hungarian forint', 'symbol' => 'Ft', 'decimal_places' => 2];
$currencies[] = ['code' => 'GBP', 'name' => 'British Pound', 'symbol' => '£', 'decimal_places' => 2];
$currencies[] = ['code' => 'UAH', 'name' => 'Ukrainian hryvnia', 'symbol' => '₴', 'decimal_places' => 2];