[Koha-devel] "Damaged" values

Robin Sheat robin at catalyst.net.nz
Wed Feb 8 23:08:18 CET 2012


Paul schreef op wo 08-02-2012 om 14:37 [-0500]:
> 0       Not damaged     Not damaged
> 3       Normal wear     Normal wear


> However, in both staff interface and OPAC, "normal wear" items are 
> appearing as damaged

> I assume (maybe incorrectly) that the value of "damaged" is read by 
> detail.pl starting line 196:
> 
>      if ($item->{damaged}) {

So the nutshell version of what's going on:

The Perl line above says essentially "if the damaged value != 0,
then..."

So by having "normal wear" at 3, it thinks its damaged. My suggestion to
change this would perhaps to be to change that line so that it's

if ($item->{damaged} > 0) {

and then you could set 'normal wear' to -1 and it wouldn't show as
damaged.

-- 
Robin Sheat
Catalyst IT Ltd.
✆ +64 4 803 2204
GPG: 5957 6D23 8B16 EFAB FEF8  7175 14D3 6485 A99C EB6D
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: </pipermail/koha-devel/attachments/20120209/e20f43fb/attachment.pgp>


More information about the Koha-devel mailing list