Bugzilla – Attachment 22865 Details for
Bug 11182
Warnings in circulation
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
bug_11182: get rid of some warnings
bug11182-get-rid-of-some-warnings.patch (text/plain), 3.37 KB, created by
Srdjan Jankovic
on 2013-11-12 07:15:51 UTC
(
hide
)
Description:
bug_11182: get rid of some warnings
Filename:
MIME Type:
Creator:
Srdjan Jankovic
Created:
2013-11-12 07:15:51 UTC
Size:
3.37 KB
patch
obsolete
>From 877e9a56326e301bcc45641360eb71d3d568cd05 Mon Sep 17 00:00:00 2001 >From: Srdjan <srdjan@catalyst.net.nz> >Date: Fri, 1 Nov 2013 20:17:40 +1300 >Subject: [PATCH] bug_11182: get rid of some warnings > >To test - circulation: >* For a child patron, check that "Upgrade to adult" link on the "More" > drop-down is clickable >* Set sys pref FineNotifyAtCheckin to yes (Notify), and check in an > overdue item that attracts fine. Fine amount should be displayed. >--- > circ/circulation.pl | 2 +- > circ/returns.pl | 23 +++++++++++++++-------- > 2 files changed, 16 insertions(+), 9 deletions(-) > >diff --git a/circ/circulation.pl b/circ/circulation.pl >index 9769731..8f7068a 100755 >--- a/circ/circulation.pl >+++ b/circ/circulation.pl >@@ -482,7 +482,7 @@ sub build_issue_data { > ($it->{'charge'}, $it->{'itemtype_charge'}) = GetIssuingCharges( > $it->{'itemnumber'}, $it->{'borrowernumber'} > ); >- $it->{'charge'} = sprintf("%.2f", $it->{'charge'}); >+ $it->{'charge'} = sprintf("%.2f", $it->{'charge'}) if defined $it->{'charge'}; > my ($can_renew, $can_renew_error) = CanBookBeRenewed( > $it->{'borrowernumber'},$it->{'itemnumber'} > ); >diff --git a/circ/returns.pl b/circ/returns.pl >index 93f36f2..9abe985 100755 >--- a/circ/returns.pl >+++ b/circ/returns.pl >@@ -49,7 +49,8 @@ use Koha::Calendar; > > my $query = new CGI; > >-if (!C4::Context->userenv){ >+my $userenv = C4::Context->userenv; >+if (!$userenv){ > my $sessionID = $query->cookie("CGISESSID"); > my $session = get_session($sessionID); > if ($session->param('branch') eq 'NO_LIBRARY_SET'){ >@@ -74,11 +75,10 @@ my ( $template, $librarian, $cookie ) = get_template_and_user( > #Global vars > my $branches = GetBranches(); > my $printers = GetPrinters(); >+my $userenv_branch = $userenv->{'branch'} // ''; >+my $printer = $userenv->{'branchprinter'} // ''; > >-my $printer = C4::Context->userenv ? C4::Context->userenv->{'branchprinter'} : ""; > my $overduecharges = (C4::Context->preference('finesMode') && C4::Context->preference('finesMode') ne 'off'); >- >-my $userenv_branch = C4::Context->userenv->{'branch'} || ''; > # > # Some code to handle the error if there is no branch or printer setting..... > # >@@ -266,7 +266,7 @@ if ($barcode) { > > if ( C4::Context->preference("FineNotifyAtCheckin") ) { > my ( $od, $issue, $fines ) = GetMemberIssuesAndFines( $borrower->{'borrowernumber'} ); >- if ($fines > 0) { >+ if ($fines && $fines > 0) { > $template->param( fines => sprintf("%.2f",$fines) ); > $template->param( fineborrowernumber => $borrower->{'borrowernumber'} ); > } >@@ -536,11 +536,18 @@ foreach ( sort { $a <=> $b } keys %returneditems ) { > } > push @riloop, \%ri; > } >+my ($genbrname, $genprname); >+if (my $b = $branches->{$userenv_branch}) { >+ $genbrname = $b->{'branchname'}; >+} >+if (my $p = $printers->{$printer}) { >+ $genprname = $p->{'printername'}; >+} > $template->param( > riloop => \@riloop, >- genbrname => $branches->{$userenv_branch}->{'branchname'}, >- genprname => $printers->{$printer}->{'printername'}, >- branchname => $branches->{$userenv_branch}->{'branchname'}, >+ genbrname => $genbrname, >+ genprname => $genprname, >+ branchname => $genbrname, > printer => $printer, > errmsgloop => \@errmsgloop, > exemptfine => $exemptfine, >-- >1.8.1.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 11182
:
22662
|
22864
|
22865
|
24171
|
24179
|
24181
|
24196
|
24198
|
24209
|
24516
|
24517
|
24518
|
24519
|
24520
|
24522
|
24523
|
24524
|
24955
|
24956
|
24957
|
24958