From 012b4bc5742859ee5a2edfe963056c4ee54897c4 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Wed, 20 May 2015 11:31:18 -0400 Subject: [PATCH] Bug 12066: New renew page in staff client doesn't record branch in statistics Test Plan: 1) Apply this patch 2) Renew an item via circ/renew.pl 3) Note the branch code of your logged in library is set as the branch in the generated statistic line Signed-off-by: Bernardo Gonzalez Kriegel Tested pre and post patch, now branch is saved No errors Signed-off-by: Katrin Fischer Signed-off-by: Mason James --- circ/renew.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/circ/renew.pl b/circ/renew.pl index 26c7bf0c5b..f1409d7879 100755 --- a/circ/renew.pl +++ b/circ/renew.pl @@ -83,7 +83,8 @@ if ($barcode) { ); } if ($can_renew) { - my $date_due = AddRenewal( undef, $item->itemnumber() ); + my $branchcode = C4::Context->userenv ? C4::Context->userenv->{'branch'} : undef; + my $date_due = AddRenewal( undef, $item->itemnumber(), $branchcode ); $template->param( date_due => $date_due ); } }