Bug 40932

Summary: Automated trigger for invoice closure
Product: Koha Reporter: Hannah Dunne-Howrie <hdunne-howrie>
Component: AcquisitionsAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low    
Version: unspecified   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:

Description Hannah Dunne-Howrie 2025-10-01 17:07:12 UTC
We would like to see the ability to set a trigger for a series of actions that would close an invoice automatically without us manually going into the invoice and ticking close and saving.

We want to see a workflow whereby once all items associated to an invoice, when they are all returned for the first time this would trigger a cron job to close the invoice. 

This would help us to automate our acquisitions checking processes. Currently a staff member has to run a report and check in with staff to make sure they have returned items and then they spend a considerable time checking through for each invoice to make sure items have been physically received and then closing the invoice. If we can automate this last step so that when all items are checked in for the first time, the invoice will automatically close. 

It would also be useful to have this automatic action as a cron job so that if something goes wrong we could interrupt the next run and correct. Also, the ability to reopen the invoice is also the other failsafe.
Comment 1 Katrin Fischer 2025-10-05 13:38:28 UTC
It sounds like this would be a good use case for a plugin that checks on item return if the invoice has already been closed etc. I think this would probably work with existing hooks.

Libraries handle the closing of invoices very differently and I think as a general behavior this might not make as much sense. 
There is also work underway for a new acq module.