Improves the presentation.

This commit is contained in:
Jonathan Rosenbaum
2017-07-23 19:57:43 +00:00
parent eaefff480c
commit a05575999c
3 changed files with 23 additions and 8 deletions
+14 -3
View File
@@ -652,6 +652,11 @@ $(function() {
var quantity_error = $("#quantity_error");
var check_number_error = $("#check_number_error");
//var check_number = $("#check_number").on("input");
// hardwire label for Stand Time
if ( $("#trans_type_info").text() === "Stand Time" ) {
$("#paid_label").text("Amount Owed:");
}
// Things to do before pressing the save / close button
@@ -724,9 +729,15 @@ $(function() {
// Stand Time
if ( $("#trans_type_info").text() === "Stand Time" ) {
$.post("json/transaction.php", { stand_time: 1, contact_id: this.value, shop_id: shop_id }, function (data) {
amount.val(data + ".00");
$.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");
$("#stand_time_total").text(obj.hours + " hours " + obj.minutes + " minutes");
} else {
amount.val(data);
$("#stand_time_total").empty();
}
}); // stand time pos
}