To recreate: 1. Have an item with a replacement cost checked out to a patron 2. Set the ClaimReturnedChargeFee sys pref to "Ask if a lost fee should be charged" 3. Make a claim and check the box for charging. 4. Claim happens but no charge occurs.
In modal-claims.inc: let fee = $('#claims-returned-charge-lost-fee').attr('checked') ? true : false; attr() won't always evaluate to true and I think prop() is a much better choice in this circumstance.
Created attachment 150237 [details] [review] Bug 33613: Use prop() to evaluate checkbox To test: 1. Have an item with a replacement cost checked out to a patron 2. Set the ClaimReturnedChargeFee sys pref to "Ask if a lost fee should be charged" 3. Make a claim and check the box for charging. 4. Claim happens but no charge occurs. 5. Apply patch and try again. 6. A charge should now occur.
Hi Lucas. While this works, I'm getting this behavour: 1. When clicking on 'Claim returned' button, I get a spinning icon in place of the button and an error in the web developer console: Uncaught TypeError: value.match is not a function. 2. Even though the button is pressed just once, there are two entries in the Details section under the claims tab - in the Check out section claims tab it only appears once. This was tested using Firefox. David Testing notes (using KTD): 1. To set up claims to work: set system preference ClaimReturnedLostValue to 1 2. From a patron's checkout list, Check out > Checkouts tab - click on the Claim returned button in the return claims column: - Get spinning icon in place of the button - In the web developer tools console: Uncaught TypeError: value.match is not a function
David, I see that too! It looks like it is happening with or without this patch. I filed a seperate bug for it: Bug 33616
(In reply to Lucas Gass from comment #4) > David, > > I see that too! It looks like it is happening with or without this patch. I > filed a seperate bug for it: > > Bug 33616 Thanks Lucas, Sign off for this one coming.
Created attachment 150252 [details] [review] Bug 33613: Use prop() to evaluate checkbox To test: 1. Have an item with a replacement cost checked out to a patron 2. Set the ClaimReturnedChargeFee sys pref to "Ask if a lost fee should be charged" 3. Make a claim and check the box for charging. 4. Claim happens but no charge occurs. 5. Apply patch and try again. 6. A charge should now occur. Signed-off-by: David Nind <david@davidnind.com>
Created attachment 150802 [details] [review] Bug 33613: Use prop() to evaluate checkbox To test: 1. Have an item with a replacement cost checked out to a patron 2. Set the ClaimReturnedChargeFee sys pref to "Ask if a lost fee should be charged" 3. Make a claim and check the box for charging. 4. Claim happens but no charge occurs. 5. Apply patch and try again. 6. A charge should now occur. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Hinemoea Viault <hinemoea.viault@inlibro.com>
Created attachment 150829 [details] [review] Bug 33613: Use prop() to evaluate checkbox To test: 1. Have an item with a replacement cost checked out to a patron 2. Set the ClaimReturnedChargeFee sys pref to "Ask if a lost fee should be charged" 3. Make a claim and check the box for charging. 4. Claim happens but no charge occurs. 5. Apply patch and try again. 6. A charge should now occur. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Hinemoea Viault <hinemoea.viault@inlibro.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Pushed to master for 23.05. Nice work everyone, thanks!
Nice work everyone! Pushed to stable for 22.11.x
Missing dependencies for 22.05.x, no backport.