mirror of
				https://github.com/fspc/Yellow-Bike-Database.git
				synced 2025-10-31 08:55:36 -04:00 
			
		
		
		
	Changes the logic so that price is read for stand time transactions.
This commit is contained in:
		
							parent
							
								
									6b8cdbe0af
								
							
						
					
					
						commit
						0ef4138aa4
					
				| @ -717,9 +717,26 @@ $(function() { | |||||||
| 					} | 					} | ||||||
| 				}); // membership post
 | 				}); // membership post
 | ||||||
| 
 | 
 | ||||||
|  | 				// Stand Time	- if a paid member, nothing is owed
 | ||||||
|  | 				if ( $("#trans_type_info").text() === "Stand Time" ) { | ||||||
|  | 					$.post("json/transaction.php", { stand_time: 1, contact_id: this.value, shop_id: shop_id }, function (data) { | ||||||
|  | 						if (data) { | ||||||
|  | 							var obj = $.parseJSON(data); | ||||||
|  | 							amount.val(""); | ||||||
|  | 							if(!obj.membership) {					 | ||||||
|  | 								amount.val(obj.total + ".00"); | ||||||
|  | 								price = obj.total; | ||||||
|  | 							} | ||||||
|  | 							$("#stand_time_total").text(obj.hours + " hours " + obj.minutes + " minutes"); | ||||||
|  | 						} else { | ||||||
|  | 							amount.val(data);	 | ||||||
|  | 							$("#stand_time_total").empty(); | ||||||
|  | 							$(".ui-spinner").hide();	 | ||||||
|  | 						} | ||||||
|  | 					}); // stand time pos		
 | ||||||
|  | 				}				 | ||||||
| 								 | 								 | ||||||
| 				// How many hours does this volunteer have?													
 | 				// How many hours does this volunteer have?													
 | ||||||
| 											 |  | ||||||
| 				$.post("json/transaction.php", { volunteer_benefits: 1, contact_id: this.value }, function (data) { 								 | 				$.post("json/transaction.php", { volunteer_benefits: 1, contact_id: this.value }, function (data) { 								 | ||||||
| 														 | 														 | ||||||
| 					var year = d.getFullYear(); | 					var year = d.getFullYear(); | ||||||
| @ -844,23 +861,6 @@ $(function() { | |||||||
| 											 | 											 | ||||||
| 				}); // volunteers post
 | 				}); // volunteers post
 | ||||||
| 				 | 				 | ||||||
| 				// Stand Time	- if a paid member, nothing is owed
 |  | ||||||
| 				if ( $("#trans_type_info").text() === "Stand Time" ) { |  | ||||||
| 					$.post("json/transaction.php", { stand_time: 1, contact_id: this.value, shop_id: shop_id }, function (data) { |  | ||||||
| 						if (data) { |  | ||||||
| 							var obj = $.parseJSON(data); |  | ||||||
| 							amount.val(""); |  | ||||||
| 							if(!obj.membership) {					 |  | ||||||
| 								amount.val(obj.total + ".00"); |  | ||||||
| 							} |  | ||||||
| 							$("#stand_time_total").text(obj.hours + " hours " + obj.minutes + " minutes"); |  | ||||||
| 						} else { |  | ||||||
| 							amount.val(data);	 |  | ||||||
| 							$("#stand_time_total").empty(); |  | ||||||
| 							$(".ui-spinner").hide();	 |  | ||||||
| 						} |  | ||||||
| 					}); // stand time pos		
 |  | ||||||
| 				}			 |  | ||||||
| 			 | 			 | ||||||
| 			} // if not no_selection		
 | 			} // if not no_selection		
 | ||||||
| 		 | 		 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user