From: D Ruth Bavousett Date: Fri, 3 Aug 2012 14:53:23 +0000 (-0700) Subject: Bug 8569: Paying for lost item overwrites nonpublic notes. X-Git-Tag: v3.10.01~556 X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=commitdiff_plain;h=7d55969329761f2eadf9c14f493b07f0a3b5503d;hp=-c;p=koha_fer Bug 8569: Paying for lost item overwrites nonpublic notes. This patch modifies C4::Circulation::ReturnLostItem to append the Paid-for note to existing data, rather than overwriting it. Signed-off-by: Kyle M Hall --- 7d55969329761f2eadf9c14f493b07f0a3b5503d diff --git a/C4/Circulation.pm b/C4/Circulation.pm index cf7e927db5..8647943265 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -3064,10 +3064,12 @@ sub ReturnLostItem{ MarkIssueReturned( $borrowernumber, $itemnum ); my $borrower = C4::Members::GetMember( 'borrowernumber'=>$borrowernumber ); + my $item = C4::Items::GetItem( $itemnum ); + my $old_note = ($item->{'paidfor'} && ($item->{'paidfor'} ne q{})) ? $item->{'paidfor'}.' / ' : q{}; my @datearr = localtime(time); my $date = ( 1900 + $datearr[5] ) . "-" . ( $datearr[4] + 1 ) . "-" . $datearr[3]; my $bor = "$borrower->{'firstname'} $borrower->{'surname'} $borrower->{'cardnumber'}"; - ModItem({ paidfor => "Paid for by $bor $date" }, undef, $itemnum); + ModItem({ paidfor => $old_note."Paid for by $bor $date" }, undef, $itemnum); }