https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42986 --- Comment #6 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 201565 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201565&action=edit Bug 42986: Fix Uncaught TypeError on paycollect This patch introduces a check if the variable change is defined, before its property innerHTML is accessed. When calling "Write off selected" an Uncaught TypeError is thrown on form submission when accessing change.innerHTML as the variable change is undefined. This regression was introduced by bug 42466 in a new submit handler which did not check if 'change' was defined at all. Test plan: 1. In the staff interface, go to a patron's account 2. Go to Accounting > Create manual invoice 3. Fill out the manual invoice form with an amount 4. Click Save 5. Go to Make a payment 6. Click "Write off selected" (not write off on a single row) 7. IMPORTANT : Open the browser console 8. Click Confirm 9. apply patch and redo steps 1 - 8. Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.