Bug 7639 - system preference to forgive fines on lost items - QA Followup
authorKyle M Hall <kyle@bywatersolutions.com>
Tue, 23 Oct 2012 12:03:16 +0000 (08:03 -0400)
committerGalen Charlton <gmc@esilibrary.com>
Tue, 17 Sep 2013 15:21:10 +0000 (15:21 +0000)
Test Plan:
 1) Apply the patch
 2) Run updatedatabase.pl
 3) Set WhenLostForgiveFine to Forgive & WhenLostChargeReplacementFee to Charge
 4) Issue an item to a borrower, then set to lost from catalogue/moredetail.pl
 5) Observe the replacement fee has been charged
 6) Return the item
 7) Observe the charged fee has been forgiven
 8) Set WhenLostForgiveFine to Don't Forgive
 9) Repeat 4-6
10) Observe the charged fee has not been forgiven
11) Set WhenLostChargeReplacementFee to Don't Charge
12) Repeat 4
13) Observe that a fee was not charged

Signed-off-by: Alex Hatley <alexh@cctexas.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
cataloguing/additem.pl

index 2c9b1c7..0893f23 100755 (executable)
@@ -609,7 +609,10 @@ if ($op eq "additem") {
     }
   my $item = GetItem( $itemnumber );
     my $olditemlost =  $item->{'itemlost'};
-    my $newitemlost = $itemtosave->subfield('952','1');
+
+   my ($lost_tag,$lost_subfield) = GetMarcFromKohaField("items.itemlost",'');
+
+   my $newitemlost = $itemtosave->subfield( $lost_tag, $lost_subfield );
     if (($olditemlost eq '0' or $olditemlost eq '' ) and $newitemlost ge '1'){
   LostItem($itemnumber,'MARK RETURNED');
     }