mirror of
https://github.com/fspc/Yellow-Bike-Database.git
synced 2026-09-03 10:21:38 -04:00
Won't charge stand time if a member. Simplified callback reusing funtion.
This commit is contained in:
+5
-3
@@ -727,12 +727,14 @@ $(function() {
|
||||
|
||||
}); // volunteers post
|
||||
|
||||
// Stand Time
|
||||
// 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(obj.total + ".00");
|
||||
var obj = $.parseJSON(data);
|
||||
if(!obj.membership) {
|
||||
amount.val(obj.total + ".00");
|
||||
}
|
||||
$("#stand_time_total").text(obj.hours + " hours " + obj.minutes + " minutes");
|
||||
} else {
|
||||
amount.val(data);
|
||||
|
||||
Reference in New Issue
Block a user