mirror of
https://github.com/fspc/Yellow-Bike-Database.git
synced 2025-02-23 01:03:23 -05:00
Changes the logic so that price is read for stand time transactions.
This commit is contained in:
parent
6b8cdbe0af
commit
0ef4138aa4
@ -679,7 +679,7 @@ $(function() {
|
|||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
sold_to.change(function() {
|
sold_to.change(function() {
|
||||||
|
|
||||||
if (this.value !== "no_selection") {
|
if (this.value !== "no_selection") {
|
||||||
|
|
||||||
@ -717,10 +717,27 @@ $(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();
|
||||||
var bikes_earned = 0;
|
var bikes_earned = 0;
|
||||||
@ -843,24 +860,7 @@ $(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