mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange.git
synced 2026-08-21 13:24:27 +00:00
add service_charge to bookings
This commit is contained in:
@@ -216,9 +216,9 @@ class InvoiceController extends Controller
|
||||
$total = array_reduce($subtotalArray, function ($v1, $v2) {
|
||||
return $v1 + $v2;
|
||||
});
|
||||
if ($total != $booking->amount) {
|
||||
if ($total != $booking->bia) {
|
||||
return response()->json([
|
||||
'message' => 'Booking amount expected is '.$booking->amount.'. Your Invoice amount is '.$total
|
||||
'message' => 'Booking amount expected is '.$booking->bia.'. Your Invoice amount is '.$total
|
||||
], 400);
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class AddServiceChargeToBookings extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('bookings', function (Blueprint $table) {
|
||||
$table->double('service_charge')->default(null)->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('bookings', function (Blueprint $table) {
|
||||
$table->dropColumn('service_charge');
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user