mirror of
https://gitlab.com/omair-personal/exchange.git
synced 2026-08-19 04:24:08 +00:00
fix user booking calculation
This commit is contained in:
@@ -595,9 +595,24 @@ class BookingController extends Controller
|
||||
$svcharge = 20.00;
|
||||
}
|
||||
|
||||
$subtotal = round($amount + $svcharge / $rate,2);
|
||||
$taxAmount = round($subtotal * $taxrate,2);
|
||||
$billingChargeAmount = round(($amount + $svcharge) * $billingChargeRate, 2);
|
||||
$subtotal = round(($amount + $svcharge) / $rate,2);
|
||||
|
||||
// TODO : refactor
|
||||
if ($taxrate !=0){
|
||||
$taxAmount = round($subtotal * $taxrate - $subtotal,2);
|
||||
}
|
||||
else{
|
||||
$taxAmount = 0;
|
||||
}
|
||||
|
||||
if ($billingChargeRate !=0){
|
||||
$billingChargeAmount = round(($amount + $svcharge) * $billingChargeRate - ($amount + $svcharge), 2);
|
||||
}
|
||||
else{
|
||||
$billingChargeAmount = 0;
|
||||
}
|
||||
|
||||
$billingChargeAmount = round((($amount / $rate) * $billingChargeRate) - ($amount / $rate), 2);
|
||||
$bankin_amount = round($subtotal + $taxAmount + $billingChargeAmount , 2);
|
||||
|
||||
return response()->json([
|
||||
|
||||
Reference in New Issue
Block a user