Bug 10240: (follow-up) fix display issues
authorJared Camins-Esakov <jcamins@cpbibliography.com>
Tue, 3 Sep 2013 01:26:14 +0000 (21:26 -0400)
committerGalen Charlton <gmc@esilibrary.com>
Fri, 11 Oct 2013 01:57:04 +0000 (01:57 +0000)
Fix the following two issues:
1) After paying a fine when offline the fine amount becomes NaN.
2) For previous checkouts for a patron, the title and barcode
   fields have the wrong infomation in them (i.e. they have been swapped)

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
koha-tmpl/intranet-tmpl/prog/en/modules/circ/offline.tt

index 608db2a..18dd737 100644 (file)
@@ -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);
     });
 }