mirror of
				https://github.com/fspc/Yellow-Bike-Database.git
				synced 2025-10-31 08:55:36 -04:00 
			
		
		
		
	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:
		
							parent
							
								
									a56ec4d9ff
								
							
						
					
					
						commit
						e99d2863b8
					
				| @ -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); | ||||
| 										} | ||||
| 									}								    | ||||
| 								}						    | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user