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 <kyle@bywatersolutions.com> Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
This commit is contained in:
parent
5bc1246b6d
commit
e6b348a89f
|
|
@ -3047,10 +3047,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);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue