[Bug 24603] New: Allow to cancel charges in patron accounting
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24603 Bug ID: 24603 Summary: Allow to cancel charges in patron accounting Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: ASSIGNED Severity: enhancement Priority: P5 - low Component: Fines and fees Assignee: julian.maurice@biblibre.com Reporter: julian.maurice@biblibre.com QA Contact: testopia@bugs.koha-community.org There is already a button to void a payment. It should be possible to cancel a charge too. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24603 --- Comment #1 from Julian Maurice <julian.maurice@biblibre.com> --- Created attachment 98534 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=98534&action=edit Bug 24603: Allow to cancel charges in patron accounting There is already a button to void a payment. It should be possible to cancel a charge too. This patch adds a button in patron's accounting section (Transactions tab) that allow to cancel charges. Charges that have been fully or partially paid cannot be cancelled. It also fixes Koha::Account::Line::is_credit by looking at credit_type_code instead of amount (amount can be 0 for voided payments) It also fixes the tests for Koha::Account::Line::void when database does not contain the borrowernumber 51 (the default in t::lib::Mocks::mock_userenv) Test plan: 1. Go to a patron's accounting section 2. Create a manual invoice 3. In Transactions tab, you should see a 'Cancel charge' button. Click on it. It should now be marked as cancelled 4. Create another manual invoice 5. Pay it (partially or fully) 6. Notice that the 'Cancel charge' button is not available 7. Void the payment 8. 'Cancel charge' button is available again. Click on it and verify that it still works 9. prove t/db_dependent/Koha/Account/Lines.t -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24603 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24603 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #98534|0 |1 is obsolete| | --- Comment #2 from David Nind <david@davidnind.com> --- Created attachment 98551 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=98551&action=edit Bug 24603: Allow to cancel charges in patron accounting There is already a button to void a payment. It should be possible to cancel a charge too. This patch adds a button in patron's accounting section (Transactions tab) that allow to cancel charges. Charges that have been fully or partially paid cannot be cancelled. It also fixes Koha::Account::Line::is_credit by looking at credit_type_code instead of amount (amount can be 0 for voided payments) It also fixes the tests for Koha::Account::Line::void when database does not contain the borrowernumber 51 (the default in t::lib::Mocks::mock_userenv) Test plan: 1. Go to a patron's accounting section 2. Create a manual invoice 3. In Transactions tab, you should see a 'Cancel charge' button. Click on it. It should now be marked as cancelled 4. Create another manual invoice 5. Pay it (partially or fully) 6. Notice that the 'Cancel charge' button is not available 7. Void the payment 8. 'Cancel charge' button is available again. Click on it and verify that it still works 9. prove t/db_dependent/Koha/Account/Lines.t Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24603 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24603 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Patch doesn't apply CC| |kyle@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24603 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #98551|0 |1 is obsolete| | --- Comment #3 from Julian Maurice <julian.maurice@biblibre.com> --- Created attachment 102005 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=102005&action=edit Bug 24603: Allow to cancel charges in patron accounting There is already a button to void a payment. It should be possible to cancel a charge too. This patch adds a button in patron's accounting section (Transactions tab) that allow to cancel charges. Charges that have been fully or partially paid cannot be cancelled. It also fixes Koha::Account::Line::is_credit by looking at credit_type_code instead of amount (amount can be 0 for voided payments) It also fixes the tests for Koha::Account::Line::void when database does not contain the borrowernumber 51 (the default in t::lib::Mocks::mock_userenv) Test plan: 1. Go to a patron's accounting section 2. Create a manual invoice 3. In Transactions tab, you should see a 'Cancel charge' button. Click on it. It should now be marked as cancelled 4. Create another manual invoice 5. Pay it (partially or fully) 6. Notice that the 'Cancel charge' button is not available 7. Void the payment 8. 'Cancel charge' button is available again. Click on it and verify that it still works 9. prove t/db_dependent/Koha/Account/Lines.t Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24603 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24603 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |martin.renvoize@ptfs-europe |y.org |.com CC| |martin.renvoize@ptfs-europe | |.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24603 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|martin.renvoize@ptfs-europe |testopia@bugs.koha-communit |.com |y.org Blocks| |14825 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14825 [Bug 14825] Accounts Rewrite Omnibus -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24603 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |martin.renvoize@ptfs-europe |y.org |.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24603 --- Comment #4 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Looking here... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24603 --- Comment #5 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- The logic here doesn't feel right to me I'm afraid. I've worked hard in recent releases to improve the consistency of our accounts records.. taking the 'double-entry accounting' approach. In such an approach accountlines, once set, should not be altered and instead, all alterations/updates should be recorded as additional lines and offset against the original. The exception to that rule is where the final amount is not yet set when the line is initially created (the only case so far is fines where we have accruing fines which are updated via the 'adjust' method). I was intending to eventually update the void method to prevent it from updating the original payment line as losing that detail in the line itself can be a red flag when accountants come to audit the system. Could we perhaps either update VOID to allow voiding of charges and apply a similar treatment here.. or utilise the 'reduce' method I added recently? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24603 --- Comment #6 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 106772 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=106772&action=edit Bug 24603: (follow-up) Update to double entry accounting This patch updates the logic to create a cancellation accountline and apply it to the charge line so we correction record the transaction in terms of double entry accounting standards. Test plan: 1. Go to a patron's accounting section 2. Create a manual invoice 3. In Transactions tab, you should see a 'Cancel charge' button. Click on it. It should now be marked as cancelled 4. A cancellation line should be associated with the original charge. 5. Create another manual invoice 6. Pay it (partially or fully) 7. Notice that the 'Cancel charge' button is not available 8. Void the payment 9. 'Cancel charge' button is available again. Click on it and verify that it still works 10. prove t/db_dependent/Koha/Account/Lines.t -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24603 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks|14825 |17596 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14825 [Bug 14825] Accounts Rewrite Omnibus https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17596 [Bug 17596] Simplify accounting UI in staff client [OMNIBUS] -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24603 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24603 --- Comment #7 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Setting back to NSO to get Julians take on my follow-up -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24603 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Patch doesn't apply --- Comment #8 from Julian Maurice <julian.maurice@biblibre.com> --- Thanks for the patch Martin, but I cannot apply it ("could not build fake ancestor" error). Can you rebase it please ? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24603 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #102005|0 |1 is obsolete| | --- Comment #9 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 111217 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=111217&action=edit Bug 24603: Allow to cancel charges in patron accounting There is already a button to void a payment. It should be possible to cancel a charge too. This patch adds a button in patron's accounting section (Transactions tab) that allow to cancel charges. Charges that have been fully or partially paid cannot be cancelled. It also fixes Koha::Account::Line::is_credit by looking at credit_type_code instead of amount (amount can be 0 for voided payments) It also fixes the tests for Koha::Account::Line::void when database does not contain the borrowernumber 51 (the default in t::lib::Mocks::mock_userenv) Test plan: 1. Go to a patron's accounting section 2. Create a manual invoice 3. In Transactions tab, you should see a 'Cancel charge' button. Click on it. It should now be marked as cancelled 4. Create another manual invoice 5. Pay it (partially or fully) 6. Notice that the 'Cancel charge' button is not available 7. Void the payment 8. 'Cancel charge' button is available again. Click on it and verify that it still works 9. prove t/db_dependent/Koha/Account/Lines.t Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24603 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #106772|0 |1 is obsolete| | --- Comment #10 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 111218 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=111218&action=edit Bug 24603: (follow-up) Update to double entry accounting This patch updates the logic to create a cancellation accountline and apply it to the charge line so we correction record the transaction in terms of double entry accounting standards. Test plan: 1. Go to a patron's accounting section 2. Create a manual invoice 3. In Transactions tab, you should see a 'Cancel charge' button. Click on it. It should now be marked as cancelled 4. A cancellation line should be associated with the original charge. 5. Create another manual invoice 6. Pay it (partially or fully) 7. Notice that the 'Cancel charge' button is not available 8. Void the payment 9. 'Cancel charge' button is available again. Click on it and verify that it still works 10. prove t/db_dependent/Koha/Account/Lines.t -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24603 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Needs Signoff --- Comment #11 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- I've rebased, but just in case there's also a branch on gitlab: https://gitlab.com/mrenvoize/Koha/-/commits/bug_24603 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24603 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24603 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #111217|0 |1 is obsolete| | --- Comment #12 from David Nind <david@davidnind.com> --- Created attachment 111255 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=111255&action=edit Bug 24603: Allow to cancel charges in patron accounting There is already a button to void a payment. It should be possible to cancel a charge too. This patch adds a button in patron's accounting section (Transactions tab) that allow to cancel charges. Charges that have been fully or partially paid cannot be cancelled. It also fixes Koha::Account::Line::is_credit by looking at credit_type_code instead of amount (amount can be 0 for voided payments) It also fixes the tests for Koha::Account::Line::void when database does not contain the borrowernumber 51 (the default in t::lib::Mocks::mock_userenv) Test plan: 1. Go to a patron's accounting section 2. Create a manual invoice 3. In Transactions tab, you should see a 'Cancel charge' button. Click on it. It should now be marked as cancelled 4. Create another manual invoice 5. Pay it (partially or fully) 6. Notice that the 'Cancel charge' button is not available 7. Void the payment 8. 'Cancel charge' button is available again. Click on it and verify that it still works 9. prove t/db_dependent/Koha/Account/Lines.t Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24603 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #111218|0 |1 is obsolete| | --- Comment #13 from David Nind <david@davidnind.com> --- Created attachment 111256 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=111256&action=edit Bug 24603: (follow-up) Update to double entry accounting This patch updates the logic to create a cancellation accountline and apply it to the charge line so we correction record the transaction in terms of double entry accounting standards. Test plan: 1. Go to a patron's accounting section 2. Create a manual invoice 3. In Transactions tab, you should see a 'Cancel charge' button. Click on it. It should now be marked as cancelled 4. A cancellation line should be associated with the original charge. 5. Create another manual invoice 6. Pay it (partially or fully) 7. Notice that the 'Cancel charge' button is not available 8. Void the payment 9. 'Cancel charge' button is available again. Click on it and verify that it still works 10. prove t/db_dependent/Koha/Account/Lines.t Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24603 --- Comment #14 from David Nind <david@davidnind.com> --- This might be an edge case, but if you: - Partially pay a charge (pay $5 off a $15 charge) - Pay the rest of the charge (pay $10 off a $15 charge) - Void one of the payments for the charge - Then you cannot cancel the charge - This option comes back when you void the other partial payment My notes from testing; - updatedatabase required -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24603 --- Comment #15 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- (In reply to David Nind from comment #14)
This might be an edge case, but if you: - Partially pay a charge (pay $5 off a $15 charge) - Pay the rest of the charge (pay $10 off a $15 charge) - Void one of the payments for the charge - Then you cannot cancel the charge - This option comes back when you void the other partial payment
My notes from testing; - updatedatabase required
I believe this is the expected behaviour. You can only cancel a charge if it has not been paid off (partially or fully). So the action of voiding all payments against it would make it act as though that was the case and as such it should be cancellable. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24603 --- Comment #16 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Thanks for testing :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24603 --- Comment #17 from David Nind <david@davidnind.com> --- Thanks Martin! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24603 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Patch doesn't apply --- Comment #18 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I am sorry, but this currently no longer applies: Apply? [(y)es, (n)o, (i)nteractive] y Applying: Bug 24603: Allow to cancel charges in patron accounting Applying: Bug 24603: (follow-up) Update to double entry accounting error: sha1 information is lacking or useless (koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt). error: could not build fake ancestor Patch failed at 0001 Bug 24603: (follow-up) Update to double entry accounting The copy of the patch that failed is found in: .git/rebase-apply/patch When you have resolved this problem run "git bz apply --continue". If you would prefer to skip this patch, instead run "git bz apply --skip". To restore the original branch and stop patching run "git bz apply --abort". Patch left in /tmp/Bug-24603-follow-up-Update-to-double-entry-account-FBn5S8.patch I'd also love an explanation on how void, cancel and other options differ! (little confused there) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24603 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Signed Off --- Comment #19 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Grr, that sha1 issue is a nightmare to solve.. I'll stick it on a branch for you instead, that easier: https://gitlab.com/mrenvoize/Koha/-/tree/bug_24603 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24603 --- Comment #20 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- (In reply to Katrin Fischer from comment #18)
I'd also love an explanation on how void, cancel and other options differ! (little confused there)
OK, I must admit, I did wonder this myself and had a conversation with Julian about it.. must have been IRC as I don't see it in the comments above. So.. Void: This can only be applied to 'payments' and it will reverse the whole payment process and affect the payment line amounts itself. If the payment has been applied against any debts, then those debts will have their amounts reset to the value they had before the payment was applied to them. The final payment line will read 'VOID' as it's status and will have an amount and amountoutstanding of '0'.. It's basically meant for "correcting mistakes". (I don't like this method as at present it's the only one that doesn't respect double-entry accounting as it changes the accountline in question directly without adding a distinct 'VOID' line to the system to offset it.) Cancel: This can only be applied to 'charges' and only charges that have not yet had any payment/credit applied against them. Other Options (May as well list them all): Forgive - Is automatically applied to 'overdue charges' depending on settings; for example, if the item is marked as lost and lost charge is added instead. Discount - Can only be applied to 'charges', records a discount line that is applied against the outstanding amount on the charge. Used to give a patron an agree discount on the list price of the charge. (Currently this is manually added) Pay - Can only be applied to 'charges', used to pay either the whole or part of the outstanding debt Writeoff - Can only be applied to 'charges', records a 'writeoff' line that is applied against the list price of the charge. In British libraries at least, this signifies when they've 'Given up' on getting the money from the patron. Payout - Can only be applied to 'credits', where the patron has excess credit on their account for one reason or another (Perhaps they paid a fine in full before a backdated return was added). Allows the library to pay the credit back out to the patron. Refund - Can be applied to a debt that has been paid off already. This is used to grant a patron credit/payout a cash amount when the library has decided they have wrongly charged a patron for some reason and the patron has already paid. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24603 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |Manual --- Comment #21 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hi Martin, thx! Adding the manual keyword here as I tihnk your explanations would be great to have in there. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24603 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #111255|0 |1 is obsolete| | --- Comment #22 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 111794 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=111794&action=edit Bug 24603: Allow to cancel charges in patron accounting There is already a button to void a payment. It should be possible to cancel a charge too. This patch adds a button in patron's accounting section (Transactions tab) that allow to cancel charges. Charges that have been fully or partially paid cannot be cancelled. It also fixes Koha::Account::Line::is_credit by looking at credit_type_code instead of amount (amount can be 0 for voided payments) It also fixes the tests for Koha::Account::Line::void when database does not contain the borrowernumber 51 (the default in t::lib::Mocks::mock_userenv) Test plan: 1. Go to a patron's accounting section 2. Create a manual invoice 3. In Transactions tab, you should see a 'Cancel charge' button. Click on it. It should now be marked as cancelled 4. Create another manual invoice 5. Pay it (partially or fully) 6. Notice that the 'Cancel charge' button is not available 7. Void the payment 8. 'Cancel charge' button is available again. Click on it and verify that it still works 9. prove t/db_dependent/Koha/Account/Lines.t Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> https://bugs.koha-community.org/show_bug.cgi?id=24063 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24603 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #111256|0 |1 is obsolete| | --- Comment #23 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 111795 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=111795&action=edit Bug 24603: (follow-up) Update to double entry accounting This patch updates the logic to create a cancellation accountline and apply it to the charge line so we correction record the transaction in terms of double entry accounting standards. Test plan: 1. Go to a patron's accounting section 2. Create a manual invoice 3. In Transactions tab, you should see a 'Cancel charge' button. Click on it. It should now be marked as cancelled 4. A cancellation line should be associated with the original charge. 5. Create another manual invoice 6. Pay it (partially or fully) 7. Notice that the 'Cancel charge' button is not available 8. Void the payment 9. 'Cancel charge' button is available again. Click on it and verify that it still works 10. prove t/db_dependent/Koha/Account/Lines.t Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> https://bugs.koha-community.org/show_bug.cgi?id=24063 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24603 --- Comment #24 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 111796 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=111796&action=edit Bug 24603: Fix number of unit tests Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> https://bugs.koha-community.org/show_bug.cgi?id=24063 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24603 --- Comment #25 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 111797 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=111797&action=edit Bug 24603: (QA follow-up) Make the new credit type translatable and shorten description a bit Adding the new offset type and credit type to the include so it can be translated. Also suggest shortening the db description a bit. Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> https://bugs.koha-community.org/show_bug.cgi?id=24063 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24603 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24603 --- Comment #26 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 111914 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=111914&action=edit Bug 24603: (QA follow-up) Add translation to OPAC Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24603 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |26697 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26697 [Bug 26697] Types and descriptions of charges only show in English in the OPAC -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24603 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Patch doesn't apply CC| |jonathan.druart@bugs.koha-c | |ommunity.org --- Comment #27 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Please rebase error: sha1 information is lacking or useless (koha-tmpl/intranet-tmpl/prog/en/includes/accounts.inc). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24603 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #111794|0 |1 is obsolete| | --- Comment #28 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 113048 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=113048&action=edit Bug 24603: Allow to cancel charges in patron accounting There is already a button to void a payment. It should be possible to cancel a charge too. This patch adds a button in patron's accounting section (Transactions tab) that allow to cancel charges. Charges that have been fully or partially paid cannot be cancelled. It also fixes Koha::Account::Line::is_credit by looking at credit_type_code instead of amount (amount can be 0 for voided payments) It also fixes the tests for Koha::Account::Line::void when database does not contain the borrowernumber 51 (the default in t::lib::Mocks::mock_userenv) Test plan: 1. Go to a patron's accounting section 2. Create a manual invoice 3. In Transactions tab, you should see a 'Cancel charge' button. Click on it. It should now be marked as cancelled 4. Create another manual invoice 5. Pay it (partially or fully) 6. Notice that the 'Cancel charge' button is not available 7. Void the payment 8. 'Cancel charge' button is available again. Click on it and verify that it still works 9. prove t/db_dependent/Koha/Account/Lines.t Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> https://bugs.koha-community.org/show_bug.cgi?id=24063 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24603 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #111795|0 |1 is obsolete| | --- Comment #29 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 113049 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=113049&action=edit Bug 24603: (follow-up) Update to double entry accounting This patch updates the logic to create a cancellation accountline and apply it to the charge line so we correction record the transaction in terms of double entry accounting standards. Test plan: 1. Go to a patron's accounting section 2. Create a manual invoice 3. In Transactions tab, you should see a 'Cancel charge' button. Click on it. It should now be marked as cancelled 4. A cancellation line should be associated with the original charge. 5. Create another manual invoice 6. Pay it (partially or fully) 7. Notice that the 'Cancel charge' button is not available 8. Void the payment 9. 'Cancel charge' button is available again. Click on it and verify that it still works 10. prove t/db_dependent/Koha/Account/Lines.t Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> https://bugs.koha-community.org/show_bug.cgi?id=24063 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24603 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #111796|0 |1 is obsolete| | --- Comment #30 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 113050 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=113050&action=edit Bug 24603: Fix number of unit tests Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> https://bugs.koha-community.org/show_bug.cgi?id=24063 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24603 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #111797|0 |1 is obsolete| | --- Comment #31 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 113051 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=113051&action=edit Bug 24603: (QA follow-up) Make the new credit type translatable and shorten description a bit Adding the new offset type and credit type to the include so it can be translated. Also suggest shortening the db description a bit. Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> https://bugs.koha-community.org/show_bug.cgi?id=24063 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24603 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #111914|0 |1 is obsolete| | --- Comment #32 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 113052 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=113052&action=edit Bug 24603: (QA follow-up) Add translation to OPAC Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24603 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Passed QA --- Comment #33 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Rebased as requested... soooo many rebases at the minute.. great to see master catching up on the queue. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24603 --- Comment #34 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 113113 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=113113&action=edit Bug 24603: Adjust permissions for cancel-charge.pl members/cancel-charge.pl should have the same permissions check than boraccount (borrowers => edit_borrowers was missing) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24603 --- Comment #35 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 113114 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=113114&action=edit Bug 24603: Simplify tests using TestBuilder -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24603 --- Comment #36 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Comment on attachment 113049 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=113049 Bug 24603: (follow-up) Update to double entry accounting Review of attachment 113049: --> (https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=24603&attachment=113049) ----------------------------------------------------------------- ::: Koha/Account/Line.pm @@ +324,4 @@
}
+ # Check for mandatory parameters + my @mandatory = ( 'staff_id', 'branch' );
Should not be "branch", but "branchcode" I'd say. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24603 --- Comment #37 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- + # Make sure it has not be paid yet + return if $self->amount != $self->amountoutstanding; Won't this fail when comparing floats? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24603 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |ASSIGNED --- Comment #38 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Julian, can you review the last 2 patches and answer the last 2 comments please? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24603 --- Comment #39 from Julian Maurice <julian.maurice@biblibre.com> --- (In reply to Jonathan Druart from comment #37)
+ # Make sure it has not be paid yet + return if $self->amount != $self->amountoutstanding;
Won't this fail when comparing floats?
I think we should be safe, as they're stored as DECIMAL (a fixed-point type, not floating-point), and the initial value of those two columns are exactly the same. So when they come from the database they should still be equal, unless a payment have been made. (In reply to Jonathan Druart from comment #36)
Should not be "branch", but "branchcode" I'd say.
I think that's a question for Martin -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24603 --- Comment #40 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Follow-up patches look reasonable to me. branch Vs branchcode ... Branch is consistent with all other methods in the Koha::Account~ area at the moment.. I wouldn't be against a distinct bug to convert all to branchcode (or library_id for a strict consistency) but I would prefer not to change a single case here for consistency. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24603 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24603 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24603 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24603 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |20.11.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24603 --- Comment #41 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Pushed to master for 20.11, thanks to everybody involved! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24603 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |release-notes-needed -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24603 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the| |This allows to cancel release notes| |charges that have not been | |paid in full or partially | |yet. A cancelled charge | |will show up as cancelled | |in the account. Voiding a | |paid charge first will then | |allow to cancel it | |afterwards. Keywords|release-notes-needed | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24603 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com --- Comment #42 from Lucas Gass <lucas@bywatersolutions.com> --- enhancement will not be backported to 20.05.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24603 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |27075 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27075 [Bug 27075] "Cancel charge" doesn't seem to appear in po files or on translate -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24603 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks|17596 |17735 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17596 [Bug 17596] Simplify accounting UI in staff client [OMNIBUS] https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17735 [Bug 17735] Merge boraccount and pay pages into one -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24603 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |29457 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29457 [Bug 29457] Fee Cancellation records the wrong manager_id -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org