mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange.git
synced 2026-08-24 14:54:38 +00:00
supplier booking (multiple booking removed)
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
use Faker\Generator as Faker;
|
||||
|
||||
$factory->define(App\SupplierBookingItem::class, function (Faker $faker) {
|
||||
return [
|
||||
//
|
||||
];
|
||||
});
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class SupplierbookingCustomerbookingTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('supplierbooking_customerbooking', function (Blueprint $table) {
|
||||
$table->integer('supplierbooking_id')->unsigned();
|
||||
$table->integer('booking_id')->unsigned();
|
||||
|
||||
$table->foreign('supplierbooking_id')->references('id')->on('supplier_bookings');
|
||||
$table->foreign('booking_id')->references('id')->on('bookings');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('supplierbooking_customerbooking');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class CreateBookingSuppliersTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('supplier_bookings', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->string('payment_method');
|
||||
$table->double('transfer_amount');
|
||||
$table->double('rate');
|
||||
$table->double('rebate');
|
||||
$table->double('amountInRMB');
|
||||
$table->double('rmbBankAmount');
|
||||
|
||||
$table->integer('book_id')->unsigned();
|
||||
$table->foreign('book_id')->references('id')->on('bookings');
|
||||
|
||||
$table->integer('supplier_id')->unsigned();
|
||||
$table->foreign('supplier_id')->references('id')->on('setting_suppliers');
|
||||
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('booking_suppliers');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class CreateSupplierBookingItemsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('supplier_booking_items', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->string('china_bankslip_url');
|
||||
$table->integer('book_id')->unsigned();
|
||||
$table->foreign('book_id')->references('id')->on('bookings');
|
||||
$table->double('bank_in_amount');
|
||||
$table->increments('date');
|
||||
$table->increments('details');
|
||||
$table->integer('supplierbooking_id')->unsigned();
|
||||
$table->foreign('supplierbooking_id')->references('id')->on('supplier_bookings');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('supplier_booking_items');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user