[Koha-patches] [PATCH] New feature Number of Returned Items to Show
Michael Hafen
mdhafen at tech.washk12.org
Wed Feb 25 23:48:34 CET 2009
This adds a system preference controlled feature. This controls how
many returned items are shown on the check-in page.
---
admin/systempreferences.pl | 1 +
circ/returns.pl | 3 ++-
installer/data/mysql/en/mandatory/sysprefs.sql | 1 +
3 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/admin/systempreferences.pl b/admin/systempreferences.pl
index c9f6b35..531380f 100755
--- a/admin/systempreferences.pl
+++ b/admin/systempreferences.pl
@@ -141,6 +141,7 @@ $tabsysprefs{CircAutocompl} = "Circulation";
$tabsysprefs{AllowRenewalLimitOverride} = "Circulation";
$tabsysprefs{canreservefromotherbranches} = "Circulation";
$tabsysprefs{finesMode} = "Circulation";
+$tabsysprefs{numReturnedItemsToShow} = "Circulation";
$tabsysprefs{emailLibrarianWhenHoldIsPlaced} = "Circulation";
$tabsysprefs{globalDueDate} = "Circulation";
$tabsysprefs{holdCancelLength} = "Circulation";
diff --git a/circ/returns.pl b/circ/returns.pl
index e5c39be..24d76a3 100755
--- a/circ/returns.pl
+++ b/circ/returns.pl
@@ -82,11 +82,12 @@ my %returneditems;
my %riduedate;
my %riborrowernumber;
my @inputloop;
+my $returned_counter = ( C4::Context->preference('numReturnedItemsToShow') ) ? C4::Context->preference('numReturnedItemsToShow') : 20;
foreach ( $query->param ) {
(next) unless (/ri-(\d*)/);
my %input;
my $counter = $1;
- (next) if ( $counter > 20 );
+ (next) if ( $counter > $returned_counter );
my $barcode = $query->param("ri-$counter");
my $duedate = $query->param("dd-$counter");
my $borrowernumber = $query->param("bn-$counter");
diff --git a/installer/data/mysql/en/mandatory/sysprefs.sql b/installer/data/mysql/en/mandatory/sysprefs.sql
index 47a0c4b..716b50c 100644
--- a/installer/data/mysql/en/mandatory/sysprefs.sql
+++ b/installer/data/mysql/en/mandatory/sysprefs.sql
@@ -141,6 +141,7 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('emailLibrarianWhenHoldIsPlaced',0,'If ON, emails the librarian whenever a hold is placed',NULL,'YesNo');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('holdCancelLength','','Specify how many days before a hold is canceled',NULL,'Integer');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('libraryAddress','','The address to use for printing receipts, overdues, etc. if different than physical address',NULL,'free');
+INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('numReturnedItemsToShow','20','Number of returned items to show on the check-in page',NULL,'Integer');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('finesMode','test','Choose the fines mode, \'off\', \'test\' (emails admin report) or \'production\' (accrue overdue fines). Requires accruefines cronjob.','off|test|production','Choice');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('globalDueDate','','If set, allows a global static due date for all checkouts','10','free');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('itemBarcodeInputFilter','','If set, allows specification of a item barcode input filter','whitespace|T-prefix|cuecat','Choice');
--
1.5.6.3
More information about the Koha-patches
mailing list