Bug 16873: Improve renewal error messages on self check
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Fri, 19 Aug 2016 11:01:32 +0000 (12:01 +0100)
committerKatrin Fischer <katrin.fischer.83@web.de>
Tue, 29 Nov 2016 23:06:35 +0000 (00:06 +0100)
commit53528e15802859ec49e9a908c2a6cf164da278b4
treec5e73fd4426d5034ee806a7dd32a100aca5e4512
parent479e5157f38d9d583467d1e44ec9f13a3dae0d81
Bug 16873: Improve renewal error messages on self check

When a patron is not allowed to renew from the self check module, the
only message displayed is "No renewals allowed".
It would be nicer to let him/her know that the renewal is not allowed
because it's a on-site checkout or automatic renewal.

To do so we can call CanBookBeRenewed instead of CanBookBeIssued and get
the renewal error.

Test plan:
0/ Switch off AllowSelfCheckReturns
1/ check out an item and tick "auto renewal"
2/ Go on the self check module
=> auto renewal message is displayed
3/ check out an item and tick "on-site checkout"
4/ Go on the self check module
=> on-site checkout message is displayed
5/ check out an item without ticking any checkboxes (regular checkout)
Renew it to reach the max renew allowed
6/ Go on the self check module
=> regular checkout message is displayed
7/ Switch on AllowSelfCheckReturns and repeat previous steps
=> "Return this item" button is displayed in addition of the renewal
error message

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt
opac/sco/sco-main.pl