Bug 18266: Fix internal error when paying fine for lost item without.. item
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 21 Mar 2017 15:24:28 +0000 (12:24 -0300)
committerKyle M Hall <kyle@bywatersolutions.com>
Fri, 31 Mar 2017 10:04:31 +0000 (10:04 +0000)
commitead7d86842d76e4619ebf7a4d9fa28998bad3442
tree183a3a0e6bb920658ef8445046d54d2a9b2f8597
parent574d48362d32c14920712ae35bdd28101785315c
Bug 18266: Fix internal error when paying fine for lost item without.. item

If a fine is created for a lost item but the itemnumber is not supplied,
the system will return it.
The item should not be mark as returned if there is no item linked to
the fine.

Test plan:
1. Turn StoreLastBorrower on
2. Create a manual invoice for a lost item, do not supply a barcode
3. Pay the fines 'Pay fines > Pay'

=> Without this patch applied you get
Can't call method "last_returned_by" on an undefined value at
/home/marc/koha/C4/Circulation.pm line 2188.

=> With this patch applied, you must not get the error.

Signed-off-by: Marc VĂ©ron <veron@veron.ch>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Koha/Account.pm