From 15015f6a54fdbd859ddcead74acac5be8765db54 Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Thu, 3 Jan 2008 12:36:44 -0600 Subject: [PATCH] item rework: correct '' for various status fields Signed-off-by: Chris Cormack Signed-off-by: Joshua Ferraro --- C4/Items.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/C4/Items.pm b/C4/Items.pm index 602f3dfac1..e822ccb696 100644 --- a/C4/Items.pm +++ b/C4/Items.pm @@ -1550,10 +1550,10 @@ sub _set_defaults_for_add { } # various item status fields cannot be null - $item->{'notforloan'} = 0 unless exists $item->{'notforloan'} and defined $item->{'notforloan'}; - $item->{'damaged'} = 0 unless exists $item->{'damaged'} and defined $item->{'damaged'}; - $item->{'itemlost'} = 0 unless exists $item->{'itemlost'} and defined $item->{'itemlost'}; - $item->{'wthdrawn'} = 0 unless exists $item->{'wthdrawn'} and defined $item->{'wthdrawn'}; + $item->{'notforloan'} = 0 unless exists $item->{'notforloan'} and defined $item->{'notforloan'} and $item->{'notforloan'} ne ''; + $item->{'damaged'} = 0 unless exists $item->{'damaged'} and defined $item->{'damaged'} and $item->{'damaged'} ne ''; + $item->{'itemlost'} = 0 unless exists $item->{'itemlost'} and defined $item->{'itemlost'} and $item->{'itemlost'} ne ''; + $item->{'wthdrawn'} = 0 unless exists $item->{'wthdrawn'} and defined $item->{'wthdrawn'} and $item->{'wthdrawn'} ne ''; } =head2 _koha_new_item -- 2.39.5