if(increment) {
// local checkout occurred. Add to the total and the session.
- this.circSummary.total += 1; // TODO += increment for checkins
+ this.circSummary.total += increment;
this.circSummary.session += 1;
}
{ async : true,
params : [
this.authtoken, {
- patron_id : this.patron.id(),
copy_barcode : args.barcode,
- void_overdues : args.void_overdues,
- backdate : args.backdate
+ backdate : args.backdate,
+ void_overdues : args.void_overdues
}
],
oncomplete : function(r) {
var date = dojo.date.stamp.fromISOString(circ.due_date());
this.byName(row, 'due_date').innerHTML =
dojo.date.locale.format(date, {selector : 'date'});
+
+ // if a patron is loaded and we just checked an item
+ // in for this patron, decrement the items-out count by 1
+ if (this.patron && this.patron.id() == circ.usr())
+ this.updateCircSummary(-1);
}
// put new circs at the top of the list
var tbody = this.checkinTbody;
tbody.insertBefore(row, tbody.getElementsByTagName('tr')[0]);
-
- this.updateCircSummary();
}
SelfCheckManager.prototype.handleCheckinResult = function(item, result) {
this.updateHoldsSummary();
}
- this.updateCircSummary(true);
+ this.updateCircSummary(1);
} else if(action == 'renew') {