From f95f2d2b2ca8f0b9adcac7ee63a6740d8ede612e Mon Sep 17 00:00:00 2001 From: Jonathan Rosenbaum Date: Thu, 3 Aug 2017 21:23:13 +0000 Subject: [PATCH] This gets volunteer history select working correctly. --- js/transaction.js | 7 ++++++- json/transaction.php | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/js/transaction.js b/js/transaction.js index 42484f9..46b5026 100644 --- a/js/transaction.js +++ b/js/transaction.js @@ -1016,7 +1016,12 @@ $(function() { sold_to = $("#sold_to").val(); } else { sold_to = $("[name='sold_to']").val(); - } + } + + // Volunteer History query + $.post("json/transaction.php",{ volunteer_history_select: 1, contact_id: sold_to }, function(data) { + + }); var payment_type_group = $("input[name='payment_type']"), payment_type, check_number; if (payment_type_group.length) { diff --git a/json/transaction.php b/json/transaction.php index 1c3e553..fa28f2e 100644 --- a/json/transaction.php +++ b/json/transaction.php @@ -268,7 +268,7 @@ $stand_time_value = STAND_TIME_VALUE; $query = 'SELECT volunteer FROM contacts WHERE contact_id="' . $_POST['contact_id'] . '";'; $sql = mysql_query($query, $YBDB) or die(mysql_error()); $result = mysql_fetch_assoc($sql); - if ($result['history'] == "") { + if ($result['volunteer'] == "") { echo "First Volunteer History"; } else { // Description may have newlines