mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange.git
synced 2026-08-23 06:14:12 +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;
|
||||
|
||||
Reference in New Issue
Block a user