LP#860685 List Actions and Print List fix
authorJason Etheridge <jason@esilibrary.com>
Tue, 27 Sep 2011 15:56:51 +0000 (11:56 -0400)
committerMike Rylander <mrylander@gmail.com>
Thu, 27 Oct 2011 17:36:02 +0000 (13:36 -0400)
List Actions and Print List broken in Check In interface when not using "Fast
Entry (Asynchronous)", due to the way we're using list.refresh_row.  This fixes
the internal list state for tracking retrieved versus un-retrieved list rows.

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Open-ILS/xul/staff_client/server/circ/checkin.js

index d967d5a..e92b6b0 100644 (file)
@@ -510,7 +510,8 @@ circ.checkin.prototype = {
                 if (typeof params.on_retrieve == 'function') params.on_retrieve(row);
                 obj.update_no_change_label(params.my_node,row);
                 var bill = row.my.mbts;
-                if (bill && document.getElementById('fine_tally')) {
+                if (bill && document.getElementById('fine_tally') && ! row.already_tallied) {
+                    params.row.already_tallied = true;
                     var amount = util.money.cents_as_dollars(
                         Number( util.money.dollars_float_to_cents_integer( document.getElementById('fine_tally').getAttribute('amount') ) ) 
                         + Number( util.money.dollars_float_to_cents_integer( bill.balance_owed() ) )
@@ -581,6 +582,7 @@ circ.checkin.prototype = {
                         } 
                     },
                     'to_top' : true,
+                    'flesh_immediately' : !async,
                     'on_append' : function(rparams) { obj.row_map[ rparams.unique_row_counter ] = rparams; },
                     'on_remove' : function(unique_row_counter) { delete obj.row_map[ unique_row_counter ]; }
             } );
@@ -681,6 +683,7 @@ circ.checkin.prototype = {
             }
             row_params['retrieve_id'] = retrieve_id;
             row_params['row'] =  {
+                'already_tallied' : false,
                 'my' : {
                     'circ' : checkin.circ,
                     'mbts' : checkin.circ ? checkin.circ.billable_transaction().summary() : null,