Bug 29184: Fix warn about undefined replacecost
authorNick Clemens <nick@bywatersolutions.com>
Wed, 6 Oct 2021 12:48:23 +0000 (12:48 +0000)
committerTomas Cohen Arazi <tomascohen@theke.io>
Thu, 8 Sep 2022 17:50:30 +0000 (10:50 -0700)
commite6ae63e6316a5b01607c74b722829851af1167d5
treec4631ae3d8e0c7cb10022f34e38cc2ba92d5831b
parentdf2ebba9c854e9c8370ce7e9e47491c1cb495ba6
Bug 29184: Fix warn about undefined replacecost

This patch simply sets the cost to 0 if undefined

To test:
1 - Create a new item with no replacement cost set
2 - Check the item out to a patron
3 - Mark the item lost
4 - Note in plack-intranet-error.log:
    [2021/10/06 12:43:26] [WARN] Use of uninitialized value $replacementprice in numeric gt (>) at /kohadevbox/koha/C4/Accounts.pm line 114.
5 - Apply patch
6 - Repeat
7 - No warn

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
C4/Accounts.pm