Koha-clms/installer/data/mysql
Nick Clemens 70d2deb103 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>
2021-08-31 10:27:52 +02:00
..
atomicupdate Bug 28774: Don't store blank values for rental discount 2021-08-31 10:27:52 +02:00
db_revs Bug 28373: DBRev 21.06.00.020 2021-08-31 10:27:52 +02:00
en Bug 24387: Fix sample_news.yml installer file 2021-08-16 11:55:55 +02:00
fr-CA Bug 24387: Remove sample_news.for other languages 2021-08-16 11:55:55 +02:00
fr-FR Bug 24387: Remove sample_news.for other languages 2021-08-16 11:55:55 +02:00
localization Bug 28108: Replace one remaining occurrence 2021-05-10 15:52:53 +02:00
mandatory Bug 28373: Add PassItemMarcToXSLT system preference 2021-08-31 08:49:04 +02:00
nb-NO Bug 24387: Remove sample_news.for other languages 2021-08-16 11:55:55 +02:00
backfill_statistics.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
fix_unclosed_nonaccruing_fines_bug17135.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
kohastructure.sql Bug 22690: (QA follow-up) Add relationships to linktracker 2021-08-27 11:02:41 +02:00
labels_upgrade.pl Bug 21395: Make perlcritic happy 2020-06-29 12:37:02 +02:00
patroncards_upgrade.pl Bug 21395: Make perlcritic happy 2020-06-29 12:37:02 +02:00
update22to30.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
updatedatabase.pl Bug 25078: Keep atomic updates in "atomicupdate" dir 2021-08-16 11:55:56 +02:00