From cbdba42df13835274a5d5f0b4c19bd989d26a5f0 Mon Sep 17 00:00:00 2001 From: Liz Rea Date: Fri, 17 Jan 2014 22:09:30 +1300 Subject: [PATCH] Bug 11573 - Make fine display more consistent for rentals To test: 1. Set up an item type with a rental charge 2. issue an item from that item type 3. Check fines - the rental charge does not show the title of the issued item 4. Renew that item, the renewal charge does show the title of the issued item 5. Apply the patch 6. Repeat steps 1-4, both should show the title of the issued item in the description. This change is proposed in order to get rid of some double ups in the title on the boraccount template. Signed-off-by: Katrin Fischer Tested with rental lines created before and after applying the patch. After applying the patch it's better, but old lines will still look ok. There is still a double up on the title on the 'pay' tab, as we get the title from the itemnumber and also display the description. I think getting all the information from the itemnumber for display would be a bit nicer in the future. Butthis is an improvement. Passes tests and QA script. --- C4/Circulation.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index ae53366..68d312c 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -3189,16 +3189,17 @@ sub AddIssuingCharge { my $dbh = C4::Context->dbh; my $nextaccntno = getnextacctno( $borrowernumber ); my $manager_id = 0; + my $item = GetBiblioFromItemNumber($itemnumber); $manager_id = C4::Context->userenv->{'number'} if C4::Context->userenv; my $query =" INSERT INTO accountlines (borrowernumber, itemnumber, accountno, date, amount, description, accounttype, amountoutstanding, manager_id) - VALUES (?, ?, ?,now(), ?, 'Rental', 'Rent',?,?) + VALUES (?, ?, ?,now(), ?, ?, 'Rent',?,?) "; my $sth = $dbh->prepare($query); - $sth->execute( $borrowernumber, $itemnumber, $nextaccntno, $charge, $charge, $manager_id ); + $sth->execute( $borrowernumber, $itemnumber, $nextaccntno, $charge, "$item->{'title'} $item->{'barcode'}", $charge, $manager_id ); } =head2 GetTransfers -- 2.1.4