mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange.git
synced 2026-08-28 08:44:16 +00:00
fixing totals to include service charge for x2 payments
This commit is contained in:
@@ -43,16 +43,22 @@ class BookingController extends Controller
|
||||
if($difference_in_seconds < 0 ){
|
||||
$booking->timeout = 0;
|
||||
}
|
||||
|
||||
// TODO : transfer_amount change name to bia
|
||||
$booking->transfer_amount = $booking->bia;
|
||||
|
||||
$booking->track_status = "(". $booking->status ."/7)";
|
||||
|
||||
$booking->service_charge = 0;
|
||||
if ($booking->term == "x2_cash" || $booking->term == "x2_cheque" || $booking->term == "x2_ba"){
|
||||
$booking->track_status = "(". $booking->status ."/5)";
|
||||
if ($booking->amount < 10000){
|
||||
$booking->service_charge = 20;
|
||||
$booking->amount += 20;
|
||||
$booking->bia = number_format((float)$booking->bia + ($booking->service_charge/$booking->rate), 2, '.', '');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// TODO : transfer_amount change name to bia
|
||||
$booking->transfer_amount = $booking->bia;
|
||||
|
||||
switch ($booking->status) {
|
||||
case 1:
|
||||
$status_desc = "Order in progress";
|
||||
@@ -101,16 +107,23 @@ class BookingController extends Controller
|
||||
if($difference_in_seconds < 0 ){
|
||||
$booking->timeout = 0;
|
||||
}
|
||||
|
||||
// TODO : transfer_amount change name to bia
|
||||
$booking->transfer_amount = $booking->bia;
|
||||
|
||||
$booking->track_status = "(". $booking->status ."/7)";
|
||||
|
||||
// all x2 until step 5 only
|
||||
if ($booking->term == "x2_cash" || $booking->term == "x2_cheque" || $booking->term == "x2_ba") {
|
||||
$booking->service_charge = 0;
|
||||
if ($booking->term == "x2_cash" || $booking->term == "x2_cheque" || $booking->term == "x2_ba"){
|
||||
$booking->track_status = "(". $booking->status ."/5)";
|
||||
if ($booking->amount < 10000){
|
||||
$booking->service_charge = 20;
|
||||
$booking->amount += 20;
|
||||
$booking->bia = number_format((float)$booking->bia + ($booking->service_charge/$booking->rate), 2, '.', '');
|
||||
}
|
||||
}
|
||||
|
||||
// TODO : transfer_amount change name to bia
|
||||
$booking->transfer_amount = $booking->bia;
|
||||
|
||||
$booking->status_desc = "Order Completed";
|
||||
$booking->marking = $booking->user->marking;
|
||||
}
|
||||
@@ -135,17 +148,22 @@ class BookingController extends Controller
|
||||
$booking->timeout = 0;
|
||||
}
|
||||
|
||||
// TODO : transfer_amount change name to bia
|
||||
$booking->transfer_amount = $booking->bia;
|
||||
|
||||
$term = $booking->term;
|
||||
$booking->service_charge = 0;
|
||||
if ($booking->term == "x2_cash" || $booking->term == "x2_cheque" || $booking->term == "x2_ba"){
|
||||
$booking->track_status = "(". $booking->admin_status ."/6)";
|
||||
if ($booking->amount < 10000){
|
||||
$booking->service_charge = 20;
|
||||
$booking->amount += 20;
|
||||
$booking->bia = number_format((float)$booking->bia + ($booking->service_charge/$booking->rate), 2, '.', '');
|
||||
}
|
||||
}
|
||||
else{
|
||||
$booking->track_status = "(". $booking->admin_status ."/7)";
|
||||
}
|
||||
|
||||
// TODO : transfer_amount change name to bia
|
||||
$booking->transfer_amount = $booking->bia;
|
||||
|
||||
switch ($booking->admin_status) {
|
||||
case 1:
|
||||
$status_desc = "Waiting customer upload bank slip";
|
||||
@@ -203,14 +221,22 @@ class BookingController extends Controller
|
||||
// TODO : transfer_amount change name to bia
|
||||
$booking->transfer_amount = $booking->bia;
|
||||
|
||||
$term = $booking->term;
|
||||
$booking->service_charge = 0;
|
||||
if ($booking->term == "x2_cash" || $booking->term == "x2_cheque" || $booking->term == "x2_ba"){
|
||||
$booking->track_status = "(". $booking->admin_status ."/6)";
|
||||
if ($booking->amount < 10000){
|
||||
$booking->service_charge = 20;
|
||||
$booking->amount += 20;
|
||||
$booking->bia = number_format((float)$booking->bia + ($booking->service_charge/$booking->rate), 2, '.', '');
|
||||
}
|
||||
}
|
||||
else{
|
||||
$booking->track_status = "(". $booking->admin_status ."/7)";
|
||||
}
|
||||
|
||||
// TODO : transfer_amount change name to bia
|
||||
$booking->transfer_amount = $booking->bia;
|
||||
|
||||
$booking->marking = $booking->user->marking;
|
||||
$booking->status_desc = "Booking Completed";
|
||||
}
|
||||
@@ -257,6 +283,15 @@ class BookingController extends Controller
|
||||
$booking->invoice_path = Storage::url($invoice->invoice_path);
|
||||
}
|
||||
|
||||
if($booking){
|
||||
if ($booking->amount >= 10000 && ($booking->term == 'x2_cash' || $booking->term == 'x2_cheque' || $booking->term == 'x2_ba')) {
|
||||
$booking->service_charge = 0;
|
||||
} else {
|
||||
$booking->service_charge = 20;
|
||||
$booking->bia = number_format((float)$booking->bia + ($booking->service_charge/$booking->rate), 2, '.', '');
|
||||
}
|
||||
}
|
||||
|
||||
// set timeout
|
||||
$date1 = new DateTime($booking->created_at);
|
||||
$date2 = new DateTime();
|
||||
@@ -314,6 +349,15 @@ class BookingController extends Controller
|
||||
$booking->invoice_path = Storage::url($invoice->invoice_path);
|
||||
}
|
||||
|
||||
if($booking){
|
||||
if ($booking->amount >= 10000 && ($booking->term == 'x2_cash' || $booking->term == 'x2_cheque' || $booking->term == 'x2_ba')) {
|
||||
$booking->service_charge = 0;
|
||||
} else {
|
||||
$booking->service_charge = 20;
|
||||
$booking->bia = number_format((float)$booking->bia + ($booking->service_charge/$booking->rate), 2, '.', '');
|
||||
}
|
||||
}
|
||||
|
||||
// set timeout
|
||||
$date1 = new DateTime($booking->created_at);
|
||||
$date2 = new DateTime();
|
||||
@@ -381,7 +425,7 @@ class BookingController extends Controller
|
||||
if ($amount >= 10000 && ($term == 'x2_cash' || $term == 'x2_cheque' || $term == 'x2_ba')) {
|
||||
$svcharge = 0;
|
||||
} else {
|
||||
$svcharge = 0;
|
||||
$svcharge = 20;
|
||||
//$svcharge = 0; // UPDATE ON : 15-8-2018 from PM
|
||||
}
|
||||
|
||||
@@ -720,7 +764,7 @@ class BookingController extends Controller
|
||||
break;
|
||||
}
|
||||
|
||||
if ($amount >= 20000 && ($term == 'x2_cash' || $term == 'x2_cheque' || $term == 'x2_ba')) {
|
||||
if ($amount >= 10000 && ($term == 'x2_cash' || $term == 'x2_cheque' || $term == 'x2_ba')) {
|
||||
$svcharge = 0;
|
||||
} else {
|
||||
$svcharge = 20;
|
||||
|
||||
@@ -351,7 +351,7 @@
|
||||
<el-table :data="bookingTableComplete">
|
||||
<el-table-column label="Ref No." width="100" >
|
||||
<el-button size="mini" @click="handleEdit(scope.$index, scope.row)">Update</el-button>
|
||||
<el-button slot-scope="scope" type="text" @click="(event) => { BookingStatus(scope.row.status, scope.row.id) }"> {{ scope.row.id }}</el-button>
|
||||
<el-button slot-scope="scope" type="text" @click="(event) => { BookingStatus(scope.row.status, scope.row.id, scope.row.term) }"> {{ scope.row.id }}</el-button>
|
||||
</el-table-column>
|
||||
<el-table-column label="DateTime" prop="created_at" width="180" sortable/>
|
||||
<el-table-column :filters="[{text: 'X1 cash', value: 'x1_cash'}, {text: 'X1 ba', value: 'x1_ba'}, {text: 'X1 cheque', value: 'x1_cheque'}]" :filter-method="filterHandler" label="Term" prop="term" width="100"/> -->
|
||||
@@ -376,7 +376,7 @@
|
||||
<!-- <el-table-column prop="timeout" label="Bankin Timeout" /> -->
|
||||
<el-table-column :filters="[{ text: 'Success', value: 'Success' }, { text: 'Pending', value: 'Pending' }]" :filter-method="filterTag"
|
||||
label="" width="180" filter-placement="bottom-end">
|
||||
<el-button slot-scope="scope" type="text" @click="(event) => { BookingStatus(scope.row.status, scope.row.id) }"> View Status </el-button>
|
||||
<el-button slot-scope="scope" type="text" @click="(event) => { BookingStatus(scope.row.status, scope.row.id, scope.row.term) }"> View Status </el-button>
|
||||
<!-- <template slot-scope="scope">
|
||||
<el-button size="mini" @click="handleEdit(scope.$index, scope.row)">View Status</el-button>
|
||||
<el-button size="mini" type="danger" @click="BookingStatus(scope.$index, scope.row)">Cancel</el-button>
|
||||
@@ -817,12 +817,15 @@ export default {
|
||||
params: {id: booking_id }
|
||||
});
|
||||
break;
|
||||
} else {
|
||||
this.$router.push({
|
||||
name: 'booking.user.uploadpo',
|
||||
params: {id: booking_id }
|
||||
});
|
||||
break;
|
||||
}
|
||||
this.$router.push({
|
||||
name: 'booking.user.uploadpo',
|
||||
params: {id: booking_id }
|
||||
});
|
||||
break;
|
||||
|
||||
|
||||
|
||||
case '6':
|
||||
this.$router.push({
|
||||
|
||||
Reference in New Issue
Block a user