diff --git a/app/Http/Controllers/BookingController.php b/app/Http/Controllers/BookingController.php index 0aa06493..3951c6ff 100644 --- a/app/Http/Controllers/BookingController.php +++ b/app/Http/Controllers/BookingController.php @@ -130,6 +130,12 @@ class BookingController extends Controller public function show($id) { $booking = Booking::where('user_id',Auth::user()->id)->where('id', $id)->first(); + // just added to try + $user_bankslip = $booking->userBankSlip()->first(); + + if ($user_bankslip){ + $booking->user_bankslip_path = Storage::url($user_bankslip->bankslip_path); + } if($booking){ $date1 = new DateTime($booking->created_at); @@ -143,8 +149,8 @@ class BookingController extends Controller } return $booking; } - } - + } + public function adminShow($id) { $booking = Booking::where('id', $id)->first(); diff --git a/database/migrations/2018_06_28_011717_rename_booking_foreignkey_in_po_table.php b/database/migrations/2018_06_28_011717_rename_booking_foreignkey_in_po_table.php index 27f8b18a..c4f1c189 100644 --- a/database/migrations/2018_06_28_011717_rename_booking_foreignkey_in_po_table.php +++ b/database/migrations/2018_06_28_011717_rename_booking_foreignkey_in_po_table.php @@ -15,7 +15,6 @@ class RenameBookingForeignkeyInPoTable extends Migration { Schema::table('purchase_orders', function($table) { - $table->dropForeign('book_id'); $table->integer('booking_id')->unsigned(); $table->foreign('booking_id')->references('id')->on('bookings'); }); diff --git a/database/seeds/DatabaseSeeder.php b/database/seeds/DatabaseSeeder.php index 0834c81d..4c056176 100644 --- a/database/seeds/DatabaseSeeder.php +++ b/database/seeds/DatabaseSeeder.php @@ -17,6 +17,6 @@ class DatabaseSeeder extends Seeder $this->call(UserRoleSeeder::class); $this->call(RateTableSeeder::class); $this->call(BookTableSeeder::class); - $this->call(CreditTableSeeder::class); + $this->call(SettingCreditSeeder::class); } } diff --git a/resources/assets/js/pages/booking/confirmation.vue b/resources/assets/js/pages/booking/confirmation.vue index 8e2ce4bf..4794b44d 100644 --- a/resources/assets/js/pages/booking/confirmation.vue +++ b/resources/assets/js/pages/booking/confirmation.vue @@ -14,7 +14,7 @@ Order Details - + +
+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
Order Number :
+
+
{{ booking_details.id }}
+
+
Date :
+
+
{{ booking_details.created_at }}
+
+
Customer Marking :
+
+
CIEF/150ECE
+
+
+
+
+
+
Term :
+
+
{{ booking_details.term }}
+
+
+
+
+
+ + +
+ + + + + +
+
+
+
+
+
+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
CNY/RMB :
+
+
CNY {{ booking_details.amount }}
+
+
+ Service Charge :
+
+
CNY {{ booking_details.service_charge }}
+
+
/ RATE :
+
+
{{ booking_details.rate }}
+
+
+
+
MYR {{ booking_details.bia }}
+
+
+
+
MYR {{ booking_details.bia }}
+
+
+
+
+
+ + +
+ + + + + +
+
+
+

@@ -40,7 +210,7 @@ - + @@ -55,6 +225,7 @@