Merge branch 'master' of gitlab.com:CIEFWorldwideSdnBhd/exchange into fix/download-report

This commit is contained in:
Mohd Arief
2018-08-24 09:09:49 +08:00
2 changed files with 18 additions and 18 deletions
+16 -16
View File
@@ -22,30 +22,30 @@ class BookingController extends Controller
{
public function index(){
\DB::connection()->enableQueryLog();
$user = Auth::user();
$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', '<', '5')
->where(function ($query) {
$query->where('term', '=', 'x2_cheque')
->orwhere('term', '=', 'x2_ba')
->orwhere('term', '=', 'x2_cash');
});
})
->orwhere(function ($query) {
$query->where('status', '<', '7')
$query->where(function($query){
$query->where('status', '<', '5')
->where(function ($query) {
$query->where('term', '=', 'x1_cheque')
->orwhere('term', '=', 'x1_ba')
->orwhere('term', '=', 'x1_cash');
});
$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);
$queries = \DB::getQueryLog();
//return print_r($queries);
// reformat to fit frontend structure
foreach ($bookings as $booking) {
// set timeout
@@ -75,7 +75,7 @@ export default {
this.options_CIEF = malaysiaBankData.map(function(item){
return {
value : item.id,
label : item.company_name + " - " + item.acc_no,
label : item.company_name + " : " + item.bank_name + " : " + item.acc_no,
};
});
})
@@ -97,7 +97,7 @@ export default {
this.options_china_bank = chinaBankData.map(function(item){
return {
value : item.id,
label : item.company_name + " - " + item.acc_no,
label : item.company_name + " : " + item.bank_name + " : " + item.acc_no,
};
});
this.options_china_bank.unshift({