Browse Source

Mozilla, not chrome, picked up on the strict javascript requirement.

* some javascript libraries failed, but not all
* put volunteer_hours_to_membership_discount() in the right place, right above redeemable().
* Fixed!
devel
Jonathan Rosenbaum 7 years ago
parent
commit
34650c9be0
  1. 35
      js/transaction.js

35
js/transaction.js

@ -607,6 +607,23 @@ $(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) {
var discount = (price * (membership_obj.membership_discount / 100).toFixed(2)).toFixed(2);
var discount_price = (price - discount).toFixed(2);
if ( $("#transaction_type").val() !== "Stand Time" ) {
$("#membership_discount").text("Member pays $" + discount_price).show();
$("#membership_discount_price").text(discount_price);
$("#redeemable_hours").spinner("disable");
//amount.prop("disabled","disabled");
} else {
$("#membership_discount").empty();
$("#membership_discount_price").empty();
}
} // end function volunteer_hours_to_membership_discount
// volunteer hours magic
function redeemable(obj, spinner_value, event, volunteer) {
@ -1234,23 +1251,7 @@ $(function() {
}
}); // volunteers post
// invoke when volunteer hours run out for a member with a qualifying transaction
function volunteer_hours_to_membership_discount(price) {
var discount = (price * (membership_obj.membership_discount / 100).toFixed(2)).toFixed(2);
var discount_price = (price - discount).toFixed(2);
if ( $("#transaction_type").val() !== "Stand Time" ) {
$("#membership_discount").text("Member pays $" + discount_price).show();
$("#membership_discount_price").text(discount_price);
$("#redeemable_hours").spinner("disable");
//amount.prop("disabled","disabled");
} else {
$("#membership_discount").empty();
$("#membership_discount_price").empty();
}
} // end function volunteer_hours_to_membership_discount
// Free stand time use for 30 days if purchased bike recently
if ($("#transaction_type").val() === "Stand Time") {

Loading…
Cancel
Save