From 1948ada78a0fa0377ad7451452e8e4d47e96cfd9 Mon Sep 17 00:00:00 2001
From: Jared Camins-Esakov <jcamins@cpbibliography.com>
Date: Mon, 2 Sep 2013 21:26:14 -0400
Subject: [PATCH] Bug 10240 follow-up: fix display

Fix the following two issues:
1) After paying a fine when offline the fine amount becomes NaN.
2) For previous checkouts for a pratron the title and barcode
   fields have the wrong infomation in them (i.e. they have been swapped)
---
 .../intranet-tmpl/prog/en/modules/circ/offline.tt  |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/offline.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/offline.tt
index 608db2a..18dd737 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/offline.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/offline.tt
@@ -257,7 +257,7 @@ function loadPatron(barcode) {
         $('#oldissuest tbody').empty();
         issuesidx.each(function (item) {
             $('#oldissues').show();
-            $('#oldissuest tbody').append("<tr><td>" + item.value.date_due + "</td><td>" + item.value.barcode + "</td><td>" + item.value.title + "</td><td>" + item.value.itype + "</td><td>" + item.value.issuedate + "</td><td>" + item.value.issuebranch + "</td><td>" + item.value.callnumber + "</td><td>" + "" + "</td></tr>");
+            $('#oldissuest tbody').append("<tr><td>" + item.value.date_due + "</td><td>" + item.value.title + "</td><td>" + item.value.barcode + "</td><td>" + item.value.itype + "</td><td>" + item.value.issuedate + "</td><td>" + item.value.issuebranch + "</td><td>" + item.value.callnumber + "</td><td>" + "" + "</td></tr>");
             $('.checkout-count').text(parseInt($('.checkout-count').text()) + 1);
         }, barcode);
     });
@@ -311,7 +311,7 @@ function recordFine(amount) {
     kohadb.recordTransaction(trans, function () {
         $('#session-payments').show();
         $('#session-payments tbody').prepend('<tr><td>' + amount + '</td><td>' + $.datepicker.formatDate(dateformat, timestamp) + timestamp.toTimeString() + '</td></tr>');
-        $('.fine-amount').text(parseInt($('.fine-amount').text) - amount);
+        $('.fine-amount').text(parseInt($('.fine-amount').text()) - amount);
     });
 }
 
-- 
1.7.9.5