added confirmSupplier booking

removed droptable due to database contraints issue
fixed rename booking foreight key in po table issue
added supplierstable seeder
updated supplierreport frontend
updated upload po frontend
This commit is contained in:
Jack Goh
2018-06-28 14:46:30 +08:00
parent d054703170
commit 0cf92b9936
12 changed files with 98 additions and 17 deletions
@@ -30,6 +30,6 @@ class CreateUsersTable extends Migration
*/
public function down()
{
Schema::dropIfExists('users');
}
}
@@ -32,6 +32,6 @@ class CreateRatesTable extends Migration
*/
public function down()
{
Schema::dropIfExists('rates');
}
}
@@ -42,7 +42,7 @@ class CreateBookingsTable extends Migration
*/
public function down()
{
Schema::dropIfExists('bookings');
}
}
@@ -15,7 +15,8 @@ class RenameBookingForeignkeyInPoTable extends Migration
{
Schema::table('purchase_orders', function($table)
{
$table->dropForeign('book_id');
$table->dropForeign(['book_id']);
$table->dropColumn('book_id');
$table->integer('booking_id')->unsigned();
$table->foreign('booking_id')->references('id')->on('bookings');
});
+2 -1
View File
@@ -17,6 +17,7 @@ class DatabaseSeeder extends Seeder
$this->call(UserRoleSeeder::class);
$this->call(RateTableSeeder::class);
$this->call(BookTableSeeder::class);
$this->call(CreditTableSeeder::class);
$this->call(SettingCreditSeeder::class);
$this->call(SuppliersTableSeeder::class);
}
}
+21
View File
@@ -0,0 +1,21 @@
<?php
use Illuminate\Database\Seeder;
class SuppliersTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
DB::table('setting_suppliers')->insert([
'company_name' => 'WongKok PLT',
'gst_no' => 'GTS12232123',
'bank_name' => 'HSBC',
'acc_no' => '86774723848593'
]);
}
}