Add setting for taxrate and billingcharge

This commit is contained in:
weiweitoo
2018-07-20 18:47:19 +08:00
parent 4bb40e3643
commit 73c36dd8e3
14 changed files with 328 additions and 1 deletions
@@ -0,0 +1,32 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateSettingBillingChargeTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('setting_billing_charges', function (Blueprint $table) {
$table->increments('id');
$table->double('billing_charge_rate',8,2);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('setting_billing_charges');
}
}
@@ -0,0 +1,32 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateSettingTaxRateTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('setting_tax_rates', function (Blueprint $table) {
$table->increments('id');
$table->double('tax_rate',8,2);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('setting_tax_rates');
}
}
+2
View File
@@ -26,6 +26,8 @@ class DatabaseSeeder extends Seeder
$this->call(SettingMalaysiaBankSeeder::class);
$this->call(SettingBeneficiarySeeder::class);
$this->call(SettingActiveBankSeeder::class);
$this->call(SettingTaxRateSeeder::class);
$this->call(SettingBillingChargeSeeder::class);
DB::statement('SET FOREIGN_KEY_CHECKS=1;');
}
}
@@ -0,0 +1,18 @@
<?php
use Illuminate\Database\Seeder;
class SettingBillingChargeSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
DB::table('setting_billing_charges')->insert([
'billing_charge_rate' => '1.2',
]);
}
}
+18
View File
@@ -0,0 +1,18 @@
<?php
use Illuminate\Database\Seeder;
class SettingTaxRateSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
DB::table('setting_tax_rates')->insert([
'tax_rate' => '1.1',
]);
}
}