Comment 35 for bug 1170794

Revision history for this message
Blake GH (bmagic) wrote :

We've tested this patch:

https://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/rogan/lp1170794_deposits_and_renewals_oh_my

Just to be clear (because there are a couple of patches in this thread) - the patch that we have tested introduces a single line:

--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm
@@ -1086,6 +1086,7 @@ sub is_deposit_exempt {
     for my $grp (@$groups) {
         return 1 if $self->is_group_descendant($grp, $pid);
     }
+ return 1 if $self->is_renewal;
     return 0;
 }

With this patch, we can confirm that a circulation (with deposit) - does throw the exception "ITEM_DEPOSIT_PAID" staff about deposits upon renewal. Evergreen does not charge a second deposit on renewal. Furthermore, if the item is not renewed, Evergreen will inform the staff about the deposit (on checkin). Exactly what we want.

There is still an issue in the case where a deposited circulation goes through a renewal. And then finally returned. The checkin does not inform the staff of the deposit. I realize that this issue has been mentioned already, but I thought I would be clear about what code change we've tested and the outcome.

Just spitballing here:

Idea 1)

Can we move the billing stuff to the new circulation? (update money.billing set xact=new.xact where xact=?) same for money.payment?

Making the billing stuff follow the open circulation? Not a good idea? Some issues could come if there were other billing lines other than the deposit-related ones. But could those be snipered? Essentially moving the money matters with the circulation.

Idea 2)

On renewal, can Evergreen "pretend" that the library refunded the deposit (completing the original circulation deposit billing cycle) - and then make a new deposit billing (and payment if existed before) on the (re)enewed circulation?