Continue ignoring already-canceled lineitems during batch cancel so that
a) no unnecessary calls are made and b) staff can be alerted when no
viable lineitems were selected for the requested action.
Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
};
this._cancelLineitems = function(reason) {
- var id_list = this.getSelected(
- null, null, true, li_active_states);
+
+ // ignore canceled lineitems during batch lineitem cancel
+ var states = li_active_states.filter(
+ function(s) { return s != 'cancelled' });
+
+ var id_list = this.getSelected(null, null, true, states);
+
if (!id_list.length) {
alert(localeStrings.NO_LI_GENERAL);
return;