mirror of
https://github.com/fspc/Yellow-Bike-Database.git
synced 2025-02-22 17:03:22 -05:00
Fixes a bug with then newest introduced volunteer benefits math.
This commit is contained in:
parent
3f195f358b
commit
a2ae9907e4
@ -640,7 +640,7 @@ $(function() {
|
||||
exceeded_sweat_equity_limit = true;
|
||||
price_after_redeeming = price - (obj.volunteer_hour_value * ((obj.sweat_equity_limit / obj.volunteer_hour_value) - volunteer[year].volunteer_hours_redeemed));
|
||||
spinner_difference = (obj.sweat_equity_limit / obj.volunteer_hour_value) - volunteer[year].volunteer_hours_redeemed;
|
||||
//console.log(spinner_difference);
|
||||
//console.log(spinner_difference + " " + price_after_redeeming);
|
||||
}
|
||||
}
|
||||
|
||||
@ -692,7 +692,7 @@ $(function() {
|
||||
// volunteer hours redeemed if the redeemable_value <= obj.sweat_equity_limit
|
||||
} else {
|
||||
if (exceeded_sweat_equity_limit === true) {
|
||||
if (price_after_redeeming) {
|
||||
if (price_after_redeeming && price_after_redeeming && spinner_difference > 0) {
|
||||
amount.val(price_after_redeeming - (((spinner_value - spinner_difference) * obj.volunteer_hour_value) * (discount / 100).toFixed(2)));
|
||||
} else {
|
||||
amount.val(price - (redeemable_value * (discount / 100).toFixed(2)));
|
||||
|
Loading…
x
Reference in New Issue
Block a user