mirror of
https://github.com/fspc/Yellow-Bike-Database.git
synced 2025-02-22 08:53:23 -05:00
What I thought was a desired equitable behavior for eab was actually a bug. Now behavior is predictable. Only checks for 0.00 and 0, so 0.0 would create an issue, but unlikely to happen.
This commit is contained in:
parent
ca4085109c
commit
2380d6a6d4
@ -88,11 +88,6 @@ define("SPECIAL_VOLUNTEER_DISCOUNT",50); // PERCENTAGE
|
||||
// e.g. for sweat equity limit of $200 for contact_id 500: array(500 => 200)
|
||||
$custom_sweat_equity_limit = array();
|
||||
|
||||
// Determines the behaviour of Bicycles (transaction_type_id) for volunteer to earn-a-bike purchases.
|
||||
// Keeping things equitable, if a patron decides to purchase a bike, rather than earning it,
|
||||
// that counts to the EAB limit for the year.
|
||||
define("EARN_A_BIKE_LIMIT",1);
|
||||
|
||||
// Determine if stand time behaviour will be based on the SWEAT_EQUITY_LIMIT with discounts applied,
|
||||
// or 1 to 1 (1hr of volunteering === 1hr of free stand time) regardless of the SWEAT_EQUITY_LIMIT
|
||||
define("REDEEM_ONE_TO_ONE", true);
|
||||
|
@ -89,7 +89,6 @@ $(function() {
|
||||
}
|
||||
} );
|
||||
|
||||
|
||||
// paid or not?
|
||||
$(":checked").parent("td").prev().children().not("#payment_type_label").hide(); // need to watch that not introduction bugs
|
||||
$(".paid").click(function() {
|
||||
@ -1036,6 +1035,7 @@ $(function() {
|
||||
|
||||
sold_to.change(function() {
|
||||
|
||||
//sold_to.hide();
|
||||
amount.prop("disabled","");
|
||||
var membership_obj; //reuse this object
|
||||
|
||||
@ -1521,12 +1521,18 @@ $(function() {
|
||||
} else {
|
||||
vhr = parseFloat($("#redeemable_hours").val());
|
||||
}
|
||||
|
||||
|
||||
// Don't require paid to be selected, only amount >= 0
|
||||
// Don't require paid to be selected, only amount >= 0
|
||||
//
|
||||
// Here is where equitable behaviour for earned bikes could be turned off/on
|
||||
// However, it actually was a feature induced bug or undesired depending how you look at it,
|
||||
// see #78 and #80,
|
||||
// because vhr always became 0 when amount was added if spinner was not used
|
||||
var max_bike_earned = 0, maximum_allowable_earned_bikes;
|
||||
if ($("#transaction_type").val() === "Bicycles") {
|
||||
// hours were redeemed and this is a Bicycle transaction
|
||||
if (vhr !== "0.00") {
|
||||
if (vhr !== "0.00" && vhr !== 0) {
|
||||
max_bike_earned = 1;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user