This fixes a bug introduced by the 34650c9be fix.

* There is an issue if the spinner is used, when the transaction is complete, the function is called infinitely.
This commit is contained in:
Jonathan Rosenbaum
2017-11-26 04:44:27 +00:00
parent a56ec4d9ff
commit e99d2863b8
+3 -3
View File
@@ -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);
}
}
}