Main Koha release repository https://koha-community.org
Find a file
Julian Maurice 8d2259b674 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>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-10 15:00:09 +01:00
acqui Bug 26584: Remove unused C4::Acquisition::CloseBasket function 2020-11-05 15:24:20 +01:00
admin Bug 14866: Make high holds work with different item types 2020-11-06 15:55:17 +01:00
api Bug 26718: Rename "reading history" to "checkout history" 2020-11-04 12:59:33 +01:00
authorities Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
basket Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
bin Bug 20582: Turn Koha into a Mojolicious application 2020-10-06 12:00:04 +02:00
C4 Bug 14866: Trivial code simplification 2020-11-06 15:55:17 +01:00
catalogue Bug 26032: (follow-up) show 'is new' filter only if items.new_status is used 2020-11-04 12:59:32 +01:00
cataloguing Bug 26605: Correctly URI-encode query string in call number browse plugin 2020-11-02 11:03:09 +01:00
circ Bug 23091: Add template handling for new messages 2020-11-06 15:55:17 +01:00
clubs Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
course_reserves Bug 25898: Fix new occurrences 2020-10-15 13:56:41 +02:00
debian Bug 24633: (follow-up) Tweak sample plugin targets 2020-11-06 15:55:17 +01:00
docs Bug 25067: Move PO file manipulation code into gulp tasks 2020-11-06 09:46:11 +01:00
errors Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
etc Bug 24633: (follow-up) Tweak sample plugin targets 2020-11-06 15:55:17 +01:00
ill Bug 23173: (follow-up) Small improvements in efficiency 2020-04-06 11:05:09 +01:00
installer Bug 14866: DBRev 20.06.00.063 2020-11-06 15:55:18 +01:00
Koha Bug 24603: Allow to cancel charges in patron accounting 2020-11-10 15:00:09 +01:00
koha-tmpl Bug 24603: Allow to cancel charges in patron accounting 2020-11-10 15:00:09 +01:00
labels Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
members Bug 24603: Allow to cancel charges in patron accounting 2020-11-10 15:00:09 +01:00
misc Bug 25067: Fix perlcritic errors 2020-11-06 17:06:44 +01:00
offline_circ Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
opac Bug 26904: OPAC password recovery allows regexp in email 2020-11-09 16:18:25 +01:00
patron_lists Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
patroncards Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
plugins Bug 24633: Add support for gitlab searching of plugins 2020-11-06 15:55:17 +01:00
pos Bug 24786: Update point of sale to use session register 2020-11-06 15:39:59 +01:00
reports Bug 24665: Add support for filtering by cash register 2020-11-06 15:55:17 +01:00
reserve Bug 24412: (follow-up) prevent request.pl from failing 2020-11-06 15:55:17 +01:00
reviews Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
rotating_collections Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
serials Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
services Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
skel
suggestion Bug 26738: (bug 24819 follow-up) Fix manager selection 2020-11-04 12:59:32 +01:00
svc Bug 24412: (follow-up) prevent error in svc/holds 2020-11-06 15:55:17 +01:00
t Bug 24603: Allow to cancel charges in patron accounting 2020-11-10 15:00:09 +01:00
tags Bug 24663: Remove authnotrequired if set to 0 2020-09-03 10:40:35 +02:00
tmp/modified_authorities
tools Bug 25167: (QA follow-up) Don't add a new variable 2020-11-03 10:57:35 +01:00
virtualshelves Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
xt Bug 26971: Remove obsolete test file translatable-templates.t 2020-11-09 11:20:43 +01:00
.editorconfig Bug 24774: Set JSON indentation of 2 spaces in .editorconfig 2020-03-19 09:24:52 +00:00
.eslintrc.json
.gitignore
.htaccess
.mailmap Bug 26621: Adjust .mailmap to reduce the number of invalid authors 2020-10-15 12:56:30 +02:00
.perlcriticrc Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
.scss-lint.yml
about.pl Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
app.psgi Bug 20582: Fix PSGI file when behind a reverse proxy 2020-10-06 12:00:04 +02:00
changelanguage.pl Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
cpanfile Bug 25067: Move PO file manipulation code into gulp tasks 2020-11-06 09:46:11 +01:00
fix-perl-path.PL Bug 21395: Make perlcritic happy 2020-06-29 12:37:02 +02:00
gulpfile.js Bug 25067: Move PO file manipulation code into gulp tasks 2020-11-06 09:46:11 +01:00
help.pl Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
INSTALL Bug 26617: Update INSTALL file to include koha-testing-docker and Gitlab links 2020-10-15 12:56:30 +02:00
Koha.pm Bug 14866: DBRev 20.06.00.063 2020-11-06 15:55:18 +01:00
koha_perl_deps.pl Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
kohaversion.pl Bug 26384: Fix executable flags 2020-09-11 09:56:56 +02:00
LICENSE
mainpage.pl Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
Makefile.PL Bug 20582: Map app.psgi file and bin directory in Makefile.PL 2020-10-06 18:14:30 +02:00
MANIFEST.SKIP
package.json Bug 25067: Move PO file manipulation code into gulp tasks 2020-11-06 09:46:11 +01:00
README
README.md
README.robots
rewrite-config.PL Bug 26290: Make Makefile.PL aware of SMTP configs 2020-10-02 15:27:18 +02:00
yarn.lock Bug 25067: Move PO file manipulation code into gulp tasks 2020-11-06 09:46:11 +01:00

Koha is a free software integrated library system (ILS).

Koha is distributed under the GNU GPL version 3 or later.

Note: This is a synced mirror of the official Koha repo.

Note: Koha does not accept pull requests from git hosting sites.

Note: This project has its own bug tracker, to report a bug or submit a patch visit http://bugs.koha-community.org.

For guidelines on submitting patches for Koha please visit https://wiki.koha-community.org/wiki/SubmitingAPatch

The developers handbook can be found at https://wiki.koha-community.org/wiki/Developer_handbook

http://koha-community.org/

Koha Logo