Bug 30788: Fix warning in Overdues.pm when fine is empty in circ rules
authorKatrin Fischer <katrin.fischer@bsz-bw.de>
Fri, 20 May 2022 07:43:15 +0000 (09:43 +0200)
committerLucas Gass <lucas@bywatersolutions.com>
Fri, 10 Jun 2022 14:53:54 +0000 (14:53 +0000)
commit4b3fe8ff3c7c6da9b56a3bc6066b867a1087af68
treee5a9f864fd36f3e0a79355754d4f4ace4a4df1fc
parent88f257ba55e4f0a4c58c0f64815b9995b7072080
Bug 30788: Fix warning in Overdues.pm when fine is empty in circ rules

Argument "" isn't numeric in multiplication (*) at /usr/share/koha/lib/C4/Overdues.pm

To test:
* Create a issuing rule where fine is empty, but a fine interval is set.
  Fine amount: empty
  To do this, remove the 0 displayed in the input field before saving.
  Fine charging interval: 5 or any other numeric value
  When to charge: Start of interval
  Fine grace period: 0
* Check out an item with the due date yester (use specify due date)
* Run misc/cronjobs/fines.pl -v
* You should see above warn in the output
* Apply patch
* Rerun fines.pl, there should be no warn.
* Run:
  t/db_dependent/Circulation/CalcFine.t
  t/db_dependent/Fines.t
  t/db_dependent/Circulation.t
  t/db_dependent/Overdues.t

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 368bdcf4e95e1cbb93f53f1d5dd976b98f59bf29)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
C4/Overdues.pm