mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange.git
synced 2026-08-19 12:24:09 +00:00
Merge branch 'master' of gitlab.com:CIEFWorldwideSdnBhd/exchange into cancelBooking
This commit is contained in:
@@ -26,18 +26,27 @@ class BookingController extends Controller
|
||||
$bookings = Booking::select('user_id', 'id', 'created_at', 'status', 'rate', 'term', 'amount', 'bia', 'verification_status')
|
||||
->where('user_id', Auth::user()->id)
|
||||
->where(function ($query) {
|
||||
$query->where('status', '=', '6')
|
||||
->orwhere('status', '=', '4')
|
||||
->orwhere('status', '=', '3')
|
||||
->orwhere('status', '=', '2')
|
||||
->orwhere('status', '=', '1');
|
||||
})
|
||||
$query->where(function($query){
|
||||
$query->where('status', '<', '5')
|
||||
->where(function ($query) {
|
||||
$query->where('term', '=', 'x2_cheque')
|
||||
->orwhere('term', '=', 'x2_ba')
|
||||
->orwhere('term', '=', 'x2_cash');
|
||||
});
|
||||
})
|
||||
->orwhere(function ($query) {
|
||||
$query->where('status', '<', '7')
|
||||
->where(function ($query) {
|
||||
$query->where('term', '=', 'x1_cheque')
|
||||
->orwhere('term', '=', 'x1_ba')
|
||||
->orwhere('term', '=', 'x1_cash');
|
||||
});
|
||||
});
|
||||
})
|
||||
->orderby('updated_at','desc')
|
||||
->paginate(10);
|
||||
|
||||
|
||||
|
||||
|
||||
// reformat to fit frontend structure
|
||||
foreach ($bookings as $booking) {
|
||||
// set timeout
|
||||
@@ -176,12 +185,11 @@ class BookingController extends Controller
|
||||
$bookings = Booking::select('user_id', 'id', 'created_at', 'admin_status', 'rate', 'term', 'amount', 'bia', 'verification_status')
|
||||
->where('admin_status', '<', '6')
|
||||
->orwhere(function ($query) {
|
||||
$query->where('admin_status', '!=', '7');
|
||||
}, function ($query) {
|
||||
$query->where('term', '=', 'x1_cheque')
|
||||
->orwhere('term', '=', 'x1_ba')
|
||||
->orwhere('term', '=', 'x1_cash');
|
||||
})
|
||||
$query->where('admin_status', '=', '6')
|
||||
->where('term', '!=', 'x2_cheque')
|
||||
->where('term', '!=', 'x2_ba')
|
||||
->where('term', '!=', 'x2_cash');
|
||||
})
|
||||
|
||||
->orderby('updated_at','desc')
|
||||
->paginate(10);
|
||||
@@ -479,8 +487,8 @@ class BookingController extends Controller
|
||||
if ($amount >= 10000 && ($term == 'x2_cash' || $term == 'x2_cheque' || $term == 'x2_ba')) {
|
||||
$svcharge = 0;
|
||||
} else {
|
||||
//$svcharge = 20.00;
|
||||
$svcharge = 0; // UPDATE ON : 15-8-2018 from PM
|
||||
$svcharge = 20.00;
|
||||
//$svcharge = 0; // UPDATE ON : 15-8-2018 from PM
|
||||
}
|
||||
|
||||
$subtotal = round(($amount + $svcharge) / $rate, 2);
|
||||
@@ -800,8 +808,8 @@ class BookingController extends Controller
|
||||
if ($amount >= 10000 && ($term == 'x2_cash' || $term == 'x2_cheque' || $term == 'x2_ba')) {
|
||||
$svcharge = 0;
|
||||
} else {
|
||||
//$svcharge = 20.00;
|
||||
$svcharge = 0; // UPDATE ON : 15-8-2018 from PM
|
||||
$svcharge = 20.00;
|
||||
//$svcharge = 0; // UPDATE ON : 15-8-2018 from PM
|
||||
}
|
||||
|
||||
$subtotal = round(($amount + $svcharge) / $rate,2);
|
||||
|
||||
Reference in New Issue
Block a user