From b54cfe231200290eac683e047302da8ec74038ee Mon Sep 17 00:00:00 2001 From: Jonathan Rosenbaum Date: Sun, 8 Feb 2015 07:45:47 +0000 Subject: [PATCH] Handles anonymous correctly in history. 1) 1 if checked 2) undefined if unchecked. --- js/transaction.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/js/transaction.js b/js/transaction.js index bb2eb76..3110969 100644 --- a/js/transaction.js +++ b/js/transaction.js @@ -631,6 +631,13 @@ $(function() { } } ); } + + var anonymous; + if ($("#anonymous").prop("checked")) { + anonymous = 1; + } else { + anonymous = undefined; + } // store the transaction's history var transaction_history = []; @@ -648,7 +655,7 @@ $(function() { shop_id: $("#shop_id").val(), payment_type: payment_type, check_number: check_number, - anonymous: $("#anonymous").val() + anonymous: anonymous }; // check for prior transactions