Fix rounding
This commit is contained in:
parent
9854ec529d
commit
be3b79b729
@ -238,7 +238,7 @@ $database->action(function ($database) {
|
|||||||
// Add Stripe fees
|
// Add Stripe fees
|
||||||
// https://support.stripe.com/questions/passing-the-stripe-fee-on-to-customers
|
// https://support.stripe.com/questions/passing-the-stripe-fee-on-to-customers
|
||||||
if ($SETTINGS["prices"]["add_stripe_fees"]) {
|
if ($SETTINGS["prices"]["add_stripe_fees"]) {
|
||||||
$duecard = ($duecard + 0.30) / (1 - 0.029);
|
$duecard = number_format(($duecard + 0.30) / (1 - 0.029), 2) * 1.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "\nCost $dueusd total: $duecard to Stripe, $campcoupons as coupons\n";
|
echo "\nCost $dueusd total: $duecard to Stripe, $campcoupons as coupons\n";
|
||||||
|
@ -124,7 +124,7 @@ function updateTotal() {
|
|||||||
cardcharge = (cardcharge + 0.3) / (1 - 0.029);
|
cardcharge = (cardcharge + 0.3) / (1 - 0.029);
|
||||||
}
|
}
|
||||||
|
|
||||||
totalcharge = Math.max(cardcharge + couponcharge, 0);
|
totalcharge = Math.max(cardcharge + couponcharge, 0).toFixed(2);
|
||||||
|
|
||||||
// The server will refuse to finish the registration if this doesn't match
|
// The server will refuse to finish the registration if this doesn't match
|
||||||
// the backend-calculated amount, don't bother being a haxxor
|
// the backend-calculated amount, don't bother being a haxxor
|
||||||
|
Loading…
x
Reference in New Issue
Block a user