|
|
@ -608,7 +608,7 @@ $(function() { |
|
|
|
} // end function save_or_close
|
|
|
|
|
|
|
|
// invoke when volunteer hours run out for a member with a qualifying transaction
|
|
|
|
function volunteer_hours_to_membership_discount(price) { |
|
|
|
function volunteer_hours_to_membership_discount(price, membership_obj) { |
|
|
|
|
|
|
|
var discount = (price * (membership_obj.membership_discount / 100).toFixed(2)).toFixed(2); |
|
|
|
var discount_price = (price - discount).toFixed(2); |
|
|
@ -1155,7 +1155,7 @@ $(function() { |
|
|
|
if (remaining === ui.value && remaining !== 0 && ui.value !== 0) { |
|
|
|
if ( typeof amount.val() !== 'undefined') { |
|
|
|
var price = amount.cleanVal(); |
|
|
|
volunteer_hours_to_membership_discount(price); |
|
|
|
volunteer_hours_to_membership_discount(price, membership_obj); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -1201,7 +1201,7 @@ $(function() { |
|
|
|
if (remaining === Number(val) && remaining !== 0 && Number(val) !== 0) { |
|
|
|
if ( typeof amount.val() !== 'undefined') { |
|
|
|
var price = amount.cleanVal(); |
|
|
|
volunteer_hours_to_membership_discount(price); |
|
|
|
volunteer_hours_to_membership_discount(price, membership_obj); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|