Michele, I tried out your suggestion, and it worked well. I created a temp table with a list of the circulation id, copy id and bill id, current stop fine and stop fine time. Then I used that data to perform the updates on the various tables.
But while I was doing that, I decided to also try just voiding all the migrated replacement bills that had no payments made on them, to let the system re-generate everything and that also seemed like it works, with the added benefit of the bills being linked to the items, so they get removed automatically when the item is returned. I made the same temp table as my first try, and used that to set the void fields in money.billings to void out the bills. Then set the stop_fine and stop_fine_time to null for all the related circulations. Then I ran the fine generator which re-generated all the fines. Then I ran the markitemlost action trigger event definition, which moved the items to lost and adds the replacement bills. We have bills that are 6 years old, and some of the item prices have been changed since then, we are considering if we are ok with giving customers the new lower bill. If not then we can exclude those from the bill voiding. But that is only ~10% of the migrated bills, so the bulk of them will just work. We can also exclude bills that had partial payments pre-migration from being voided, so customers may owe less, but never more than they did before. I wish we would have known this back at migration time, it would have saved us a bunch of time to just let the system re-generate all the bills and fines for replacement charges from the start. Josh Stompro - LARL IT Director From: Open-ils-general [mailto:open-ils-general-boun...@list.georgialibraries.org] On Behalf Of Josh Stompro Sent: Wednesday, May 25, 2016 2:27 PM To: Evergreen Discussion Group Subject: Re: [OPEN-ILS-GENERAL] Billing - excluding migrated replacement costs from new bills Michele, Thank you very much, that sounds like a great solution. We only apply a single one time fine after the grace period, so all the circ transactions with migrated bills have either MAXFINES or NULL for the stop_fines value. All the nulls correspond with a no_fine recurring_fine_rule for patron types that we don’t charge fines. I’ll try it out and report back. Josh Stompro - LARL IT Director From: Open-ils-general [mailto:open-ils-general-boun...@list.georgialibraries.org] On Behalf Of Morgan, Michele Sent: Wednesday, May 25, 2016 2:09 PM To: Evergreen Discussion Group Subject: Re: [OPEN-ILS-GENERAL] Billing - excluding migrated replacement costs from new bills Hi Josh, What about updating action.circulation.stop_fines to LOST in the migrated circ transactions associated with the billed items? If the stop_fines is already LOST, they should be skipped by the trigger. What stop_fines value do those migrated transactions have currently? Hope this is helpful. -Michele -- Michele M. Morgan, Technical Assistant North of Boston Library Exchange, Danvers Massachusetts mmor...@noblenet.org<mailto:mmor...@noblenet.org> On Wed, May 25, 2016 at 9:37 AM, Josh Stompro <stomp...@exchange.larl.org<mailto:stomp...@exchange.larl.org>> wrote: Hello, we are getting ready to re-start our billing process, and I’m trying to figure out how to make sure we don’t double bill those that had migrated replacement/lost bills. When we migrated we requested that our billed items be brought in with checked out status, because that is what we were used to in Millennium. We didn’t understand the problem that would cause down the road. So now I’m seeing that if we just run the MarkItemsLost action trigger, customers that had replacement bills migrated will get a second bill for the same item, because all the copies have a checked out status. I think we should have brought those all in as lost status without an open circ transaction to match up with how Evergreen handles things. All our migrated bills came in as grocery bills that are not directly linked to the items. So the bills have to be removed manually when the items are returned, and if the bill is paid, staff have to remember to check in and mark the item lost and paid. So I think I have a few options. 1. Adjust the json filter file to exclude the copies that have migrated bills. Is it possible to do a not exists subquery in json query? I need to check the money.billable_xact+money.billings for a copy barcode in the billings.note field. 2. Change the status of all the items that were migrated in billed to lost and close out the circ so they get excluded that way? 3. Manually add entries to the action_trigger.events table so those circulations would be skipped? Does anyone have any suggestions? Thanks Josh Lake Agassiz Regional Library - Moorhead MN larl.org<http://larl.org> Josh Stompro | Office 218.233.3757 EXT-139<tel:218.233.3757%20EXT-139> LARL IT Director | Cell 218.790.2110<tel:218.790.2110>