When canceling a lineitem with a cancel reason that
keep debits = true, make sure we don't delete those copies.
Signed-off-by: Chris Sharp <csharp@georgialibraries.org>
Signed-off-by: John Amundson <jamundson@cwmars.org>
Signed-off-by: Jason Stephenson <jason@sigio.com>
or return 0;
# gathering any real copies for deletion
- if ($lid->eg_copy_id) {
+ # if there is a copy ID and the cancel reason keeps debits,
+ # do not delete.
+ if ($lid->eg_copy_id && ! $U->is_true($cancel_reason->keep_debits)) {
$lid->eg_copy_id->isdeleted('t');
push @$copies, $lid->eg_copy_id;
}