Merge branch 'currency' into 'master'

Currency

See merge request CIEFWorldwideSdnBhd/exchange-2.0!10
This commit is contained in:
omair saleh
2020-11-30 13:27:35 +00:00
27 changed files with 816 additions and 10 deletions
@@ -20,6 +20,7 @@ class CreateCurrenciesTable extends Migration
$table->string('name')->nullable();
$table->string('short_code')->nullable();
$table->string('symbol')->nullable();
$table->float('selling', 20, 5)->nullable();
$table->timestamps();
$table->softDeletes();
});
@@ -0,0 +1,36 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateCurrencyLogsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('currency_logs', function (Blueprint $table) {
$table->id();
$table->bigInteger('currency_id')->unsigned()->nullable();
$table->foreign('currency_id')->references('id')->on('currencies')->onDelete('cascade');
$table->float('selling', 20, 5)->nullable();
$table->bigInteger('created_by')->unsigned()->nullable();
$table->foreign('created_by')->references('id')->on('users')->onDelete('cascade');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('currency_logs');
}
}
@@ -24,7 +24,6 @@ class AdminUserPermissionsTableSeeder extends Seeder
Permission::create(['name' => 'edit document', 'guard_name' => 'web']);
Permission::create(['name' => 'delete document', 'guard_name' => 'web']);
Permission::create(['name' => 'view standard_segment', 'guard_name' => 'web']);
Permission::create(['name' => 'add standard_segment', 'guard_name' => 'web']);
Permission::create(['name' => 'edit standard_segment', 'guard_name' => 'web']);
@@ -50,6 +49,11 @@ class AdminUserPermissionsTableSeeder extends Seeder
Permission::create(['name' => 'edit company_bank', 'guard_name' => 'web']);
Permission::create(['name' => 'delete company_bank', 'guard_name' => 'web']);
Permission::create(['name' => 'view currency', 'guard_name' => 'web']);
Permission::create(['name' => 'add currency', 'guard_name' => 'web']);
Permission::create(['name' => 'edit currency', 'guard_name' => 'web']);
Permission::create(['name' => 'delete currency', 'guard_name' => 'web']);
///////////////////////////////////////////////////////////////////////
$shadow_admin_role = Role::create([
+1
View File
@@ -19,6 +19,7 @@ class CurrenciesTableSeeder extends Seeder
'name' => 'Ringgit',
'short_code' => 'MYR',
'symbol' => 'RM',
'selling' => 1,
'created_at' => date('Y-m-d H:i:s'),
'updated_at' => date('Y-m-d H:i:s')
]