From 455ed7671805e84c9f9dc25fe9ba83725ab4b8b1 Mon Sep 17 00:00:00 2001 From: Liz Rea Date: Fri, 17 Jan 2014 22:09:30 +1300 Subject: [PATCH] [SIGNED OFF] 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 bd9e1cc..42e00b9 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -2907,16 +2907,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 -- 1.8.3.2