LP#1414197 Serial Item Delete Improvements user/dbwells/lp1414197_serial_item_delete_improvements
authorDan Wells <dbw2@calvin.edu>
Fri, 6 Jul 2018 15:47:42 +0000 (11:47 -0400)
committerDan Wells <dbw2@calvin.edu>
Fri, 6 Jul 2018 15:47:42 +0000 (11:47 -0400)
commit46517ecd54485ef4811b8f800808c3d2ddd6f11a
treef8d20b66c654f9147327e27b9070e490366ad700
parentfde814620213488dd5376cfaf5f09a3787ae5192
LP#1414197 Serial Item Delete Improvements

If a serial item is received, then deleted without any further status,
it can leave the system in an inconsistent state:

1) If from a multi-item unit, the unit contents are not updated.
2) If from a single-item unit, the unit is not deleted.
3) If the last holding of its kind, holdings summaries are not updated.

Since 'resetting' items has all the necessary logic to handle the above
needs, this commit runs each deleted item through the reset code before
doing the actual delete.  This also gives the benefit of keeping the
logic centralized for future fixes/enhancements.

Signed-off-by: Dan Wells <dbw2@calvin.edu>
Open-ILS/src/perlmods/lib/OpenILS/Application/Serial.pm
Open-ILS/web/js/ui/default/staff/serials/directives/view-items-grid.js