Bugzilla – Attachment 82874 Details for
Bug 15422
Number of items to order on holds ratio report will not fulfill the holds ratio
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 15422: Consider partial copies needed as whole numbers
Bug-15422-Consider-partial-copies-needed-as-whole-.patch (text/plain), 1.26 KB, created by
Owen Leonard
on 2018-12-05 15:19:24 UTC
(
hide
)
Description:
Bug 15422: Consider partial copies needed as whole numbers
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2018-12-05 15:19:24 UTC
Size:
1.26 KB
patch
obsolete
>From 90060948d014983a82c8a70475953ddf0e143a23 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Tue, 4 Dec 2018 14:58:35 +0000 >Subject: [PATCH] Bug 15422: Consider partial copies needed as whole numbers > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> >--- > circ/reserveratios.pl | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > >diff --git a/circ/reserveratios.pl b/circ/reserveratios.pl >index dc04b33..530dfb6 100755 >--- a/circ/reserveratios.pl >+++ b/circ/reserveratios.pl >@@ -22,6 +22,7 @@ use Modern::Perl; > > use CGI qw ( -utf8 ); > use Date::Calc qw/Today Add_Delta_YM/; >+use POSIX qw( ceil ); > > use C4::Context; > use C4::Output; >@@ -151,7 +152,7 @@ $sth->execute(@query_params); > my @reservedata; > while ( my $data = $sth->fetchrow_hashref ) { > my $thisratio = $data->{reservecount} / $data->{itemcount}; >- my $ratiocalc = $data->{reservecount}/$ratio - $data->{itemcount}; >+ my $ratiocalc = ceil($data->{reservecount}/$ratio - $data->{itemcount}); > $ratiocalc >= 1 or next; # TODO: tighter targeting -- get ratio limit into SQL using HAVING clause > my $record = GetMarcBiblio({ biblionumber => $data->{biblionumber} }); > $data->{subtitle} = GetRecordValue('subtitle', $record, GetFrameworkCode($data->{biblionumber})); >-- >2.1.4
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 15422
:
82718
|
82842
|
82873
|
82874
|
92145
|
92146
|
93670
|
93671