mirror of
https://gitlab.com/omair-personal/exchange.git
synced 2026-08-21 13:34:24 +00:00
4e0f1dbe0a
added exception if userbankslip not save show error added tax rate to supplier booking added order number and payment for to booking seeder
46 lines
1.2 KiB
PHP
46 lines
1.2 KiB
PHP
<?php
|
|
|
|
use Illuminate\Database\Seeder;
|
|
use Carbon\Carbon;
|
|
use App\User;
|
|
use App\Rate;
|
|
|
|
class BookTableSeeder extends Seeder
|
|
{
|
|
/**
|
|
* Run the database seeds.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function run()
|
|
{
|
|
$user = User::where("email", "user@example.com")->first();
|
|
$rate = Rate::all()->last();
|
|
|
|
DB::table('bookings')->insert([
|
|
'account_name' => 'milah',
|
|
'account_num' => '99898',
|
|
'bank_name' => 'maybank',
|
|
'bank_branch' => 'rembau',
|
|
'company_name' => 'ICEF',
|
|
'company_address' => 'selangor',
|
|
'bank_address' => 'cyber',
|
|
'swift_code' => 'qwe123',
|
|
'cnap' => '123asd',
|
|
'term' => 'x1_cash',
|
|
'amount' => 200,
|
|
'rmb_book_amount' => 200,
|
|
'bia' => 189,
|
|
'rate' => 1.2,
|
|
'rate_id' => $rate->id,
|
|
'user_id' => $user->id,
|
|
'status' => 2,
|
|
'admin_status' => 2,
|
|
'order_no' => '001',
|
|
'payment_for' => 'FULL PAYMENT',
|
|
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
|
|
'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),
|
|
]);
|
|
}
|
|
}
|