Go to file
Nick Clemens d4e16785a3 Bug 28774: Don't store blank values for rental discount
This patch adds 'can_be_blank => 0' for the rentaldiscount rule to prevent
storing blank values in the database

Additionally, if there is no charge we do not need to check for a discount
and can simply return

To test:
1 - Set rental discount to "" to a rule in circulation rules
2 - Checkout an item that will follow this rule
3 - Check the intranet log:
    [WARN] Argument "" isn't numeric in subtraction (-) at /kohadevbox/koha/C4/Circulation.pm line 3385.
4 - Apply patch and restart all
5 - Update database
6 - Set the rule to "" again
7 - Check the DB, no rule is stored
    SELECT * FROM circulation_rules WHERE rule_name = 'rentaldiscount';
8 - Checkout the item again
9 - No warns in log

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 11ec644edf)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2021-09-08 10:42:58 -10:00
C4 Bug 28774: Don't store blank values for rental discount 2021-09-08 10:42:58 -10:00
Koha Bug 28774: Don't store blank values for rental discount 2021-09-08 10:42:58 -10:00
acqui Bug 28881: (bug 23376 follow-up) Fix suggestion display on order receive page 2021-09-08 10:10:46 -10:00
admin Bug 28567: Fix 0 vs "" vs undef on the admin library form 2021-08-11 09:16:02 -10:00
api Revert "Bug 28480: Add q parameters for GET /patrons" 2021-08-02 15:56:27 -10: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
catalogue Bug 28554: In itemsearch sort item types filter by description 2021-09-08 10:28:31 -10:00
cataloguing Bug 28533: Set subfields to 'undef' if whole field request in itemcallnumebr system preference 2021-08-11 09:58:14 -10:00
circ Bug 16785: Remove Autocomplete from overdues report filter 2021-05-20 15:07:59 +02: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 28620: Remove trailing space when logging with log4perl 2021-08-02 18:48:46 -10:00
docs Bug 28476: Update info in docs/teams.yaml file 2021-07-09 17:30:59 -10:00
errors Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
etc Bug 28620: Remove trailing space when logging with log4perl 2021-08-02 18:48:46 -10:00
ill Bug 22818: Add generation and sending of notices 2020-11-11 08:35:10 +01:00
installer Bug 28774: Don't store blank values for rental discount 2021-09-08 10:42:58 -10:00
koha-tmpl Bug 28891: (bug 23916 follow up) Always use 'Checkout on' as default Checkout history sort column 2021-09-08 10:35:04 -10:00
labels Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
members Bug 26940: don't reset debarredcomment on patron update 2021-04-29 11:47:16 +02:00
misc Update release notes for 20.11.09 release 2021-08-24 16:28:39 -10:00
offline_circ Bug 24083: Add support for unseen_renewals 2020-11-11 16:09:58 +01:00
opac Bug 28885: Skip invalid biblios for OpacBrowseResults 2021-09-08 10:38:01 -10:00
patron_lists Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
patroncards Bug 27716: Update permissions for patroncards creator 2021-03-19 16:25:37 +01:00
plugins Bug 24633: Add support for gitlab searching of plugins 2020-11-06 15:55:17 +01:00
pos Bug 28181: Filter out archived debit types in point of sale 2021-05-12 16:38:02 +02:00
reports Bug 28570: Remove log to /tmp file from bor_issues_top.pl 2021-08-02 10:12:14 -10:00
reserve Bug 28779: (QA follow-up) More specific message and soem cleanup 2021-08-13 10:23:16 -10: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 7806: Fix remaining occurrences of 0000-00-00 2021-03-04 10:24:48 +01:00
services Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
skel
…
suggestion Bug 7806: Fix remaining occurrences of 0000-00-00 2021-03-04 10:24:48 +01:00
svc Bug 27061: Remove duplicate permission check in svc/mana/search 2021-05-11 12:09:40 +02:00
t Bug 28744: Regression tests 2021-09-08 10:36:27 -10:00
tags Bug 24663: Remove authnotrequired if set to 0 2020-09-03 10:40:35 +02:00
tmp/modified_authorities
…
tools Bug 28835: Fix ability to pass list contents to batch record modification 2021-08-13 10:12:45 -10: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 Bug 23834: Add default ESLint configuration 2019-11-03 08:02:39 +00:00
.gitignore Bug 20427: Convert OPAC LESS to SCSS 2018-08-09 15:17:07 +00:00
.htaccess
…
.mailmap Bug 28386: Disambiguate Tomas and Blou 2021-06-23 07:35:21 +02:00
.perlcriticrc Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
.scss-lint.yml Bug 21237: Clean up staff client SCSS 2018-08-24 16:23:25 +00: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 Increment version for 20.11.09 release 2021-08-24 16:09:50 -10:00
LICENSE
…
MANIFEST.SKIP
…
Makefile.PL Bug 26363: Provide a systemd unit file for koha-worker for source installs 2021-03-02 08:31:29 +01:00
README
…
README.md Bug 27092: Remove note about "synced repo" from README.md 2020-11-25 16:31:58 +01:00
README.robots
…
about.pl Bug 28386: Sort authors by lastname || firstname 2021-06-23 07:35:21 +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 28302: Forbid CGI::Compile 0.24 2021-05-18 12:14:19 +02:00
fix-perl-path.PL Bug 21395: Make perlcritic happy 2020-06-29 12:37:02 +02:00
gulpfile.js Bug 27072: Don't process staff interface CSS with rtlcss 2020-11-24 21:27:59 +01:00
help.pl Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02: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
mainpage.pl Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
package.json Bug 25067: Move PO file manipulation code into gulp tasks 2020-11-06 09:46:11 +01:00
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

README.md

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

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

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