Bugzilla – Attachment 26729 Details for
Bug 7413
Allow OPAC renewal x days before due date
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 7413: Add "No renewal before" to the circulation and fine rules
Bug-7413-Add-No-renewal-before-to-the-circulation-.patch (text/plain), 6.47 KB, created by
Brendan Gallagher
on 2014-04-01 21:56:43 UTC
(
hide
)
Description:
Bug 7413: Add "No renewal before" to the circulation and fine rules
Filename:
MIME Type:
Creator:
Brendan Gallagher
Created:
2014-04-01 21:56:43 UTC
Size:
6.47 KB
patch
obsolete
>From e10c607aa77ebd637c5b57cd7a39bef8585aba31 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Holger=20Mei=C3=9Fner?= <h.meissner.82@web.de> >Date: Wed, 12 Feb 2014 17:16:40 +0100 >Subject: [PATCH] Bug 7413: Add "No renewal before" to the circulation and > fine rules >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >This patch adds a column "No renewal before" to the circulation and >fine rules table. > >To test: >1) Add or edit some issuing rules. >2) Confirm that an empty entry, zero and non-numerical values for > "No renewal before" are saved as undefined. >3) Confirm that numerical values can be entered and saved. > >Sponsored-by: Hochschule für Gesundheit (hsg), Germany >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com> >--- > admin/smart-rules.pl | 10 ++++++---- > koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt | 3 +++ > 2 files changed, 9 insertions(+), 4 deletions(-) > >diff --git a/admin/smart-rules.pl b/admin/smart-rules.pl >index 5d4166d..6721ea4 100755 >--- a/admin/smart-rules.pl >+++ b/admin/smart-rules.pl >@@ -101,8 +101,8 @@ elsif ($op eq 'delete-branch-item') { > # save the values entered > elsif ($op eq 'add') { > my $sth_search = $dbh->prepare('SELECT COUNT(*) AS total FROM issuingrules WHERE branchcode=? AND categorycode=? AND itemtype=?'); >- my $sth_insert = $dbh->prepare('INSERT INTO issuingrules (branchcode, categorycode, itemtype, maxissueqty, renewalsallowed, renewalperiod, reservesallowed, issuelength, lengthunit, hardduedate, hardduedatecompare, fine, finedays, firstremind, chargeperiod,rentaldiscount, overduefinescap) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)'); >- my $sth_update=$dbh->prepare("UPDATE issuingrules SET fine=?, finedays=?, firstremind=?, chargeperiod=?, maxissueqty=?, renewalsallowed=?, renewalperiod=?, reservesallowed=?, issuelength=?, lengthunit = ?, hardduedate=?, hardduedatecompare=?, rentaldiscount=?, overduefinescap=? WHERE branchcode=? AND categorycode=? AND itemtype=?"); >+ my $sth_insert = $dbh->prepare('INSERT INTO issuingrules (branchcode, categorycode, itemtype, maxissueqty, renewalsallowed, renewalperiod, norenewalbefore, reservesallowed, issuelength, lengthunit, hardduedate, hardduedatecompare, fine, finedays, firstremind, chargeperiod,rentaldiscount, overduefinescap) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)'); >+ my $sth_update=$dbh->prepare("UPDATE issuingrules SET fine=?, finedays=?, firstremind=?, chargeperiod=?, maxissueqty=?, renewalsallowed=?, renewalperiod=?, norenewalbefore=?, reservesallowed=?, issuelength=?, lengthunit = ?, hardduedate=?, hardduedatecompare=?, rentaldiscount=?, overduefinescap=? WHERE branchcode=? AND categorycode=? AND itemtype=?"); > > my $br = $branch; # branch > my $bor = $input->param('categorycode'); # borrower category >@@ -114,6 +114,8 @@ elsif ($op eq 'add') { > my $maxissueqty = $input->param('maxissueqty'); > my $renewalsallowed = $input->param('renewalsallowed'); > my $renewalperiod = $input->param('renewalperiod'); >+ my $norenewalbefore = $input->param('norenewalbefore'); >+ $norenewalbefore = undef if $norenewalbefore == 0; > my $reservesallowed = $input->param('reservesallowed'); > $maxissueqty =~ s/\s//g; > $maxissueqty = undef if $maxissueqty !~ /^\d+/; >@@ -129,9 +131,9 @@ elsif ($op eq 'add') { > $sth_search->execute($br,$bor,$cat); > my $res = $sth_search->fetchrow_hashref(); > if ($res->{total}) { >- $sth_update->execute($fine, $finedays,$firstremind, $chargeperiod, $maxissueqty, $renewalsallowed, $renewalperiod, $reservesallowed, $issuelength,$lengthunit, $hardduedate,$hardduedatecompare,$rentaldiscount,$overduefinescap, $br,$bor,$cat); >+ $sth_update->execute($fine, $finedays,$firstremind, $chargeperiod, $maxissueqty, $renewalsallowed, $renewalperiod, $norenewalbefore, $reservesallowed, $issuelength,$lengthunit, $hardduedate,$hardduedatecompare,$rentaldiscount,$overduefinescap, $br,$bor,$cat); > } else { >- $sth_insert->execute($br,$bor,$cat,$maxissueqty,$renewalsallowed, $renewalperiod, $reservesallowed,$issuelength,$lengthunit,$hardduedate,$hardduedatecompare,$fine,$finedays,$firstremind,$chargeperiod,$rentaldiscount,$overduefinescap); >+ $sth_insert->execute($br,$bor,$cat,$maxissueqty,$renewalsallowed, $renewalperiod, $norenewalbefore, $reservesallowed,$issuelength,$lengthunit,$hardduedate,$hardduedatecompare,$fine,$finedays,$firstremind,$chargeperiod,$rentaldiscount,$overduefinescap); > } > } > elsif ($op eq "set-branch-defaults") { >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt >index 1c83cc0..7f2611f 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt >@@ -150,6 +150,7 @@ for="tobranch"><strong>Clone these rules to:</strong></label> <input type="hidde > <th>Suspension in days (day)</th> > <th>Renewals allowed (count)</th> > <th>Renewal period</th> >+ <th>No renewal before</th> > <th>Holds allowed (count)</th> > <th>Rental discount (%)</th> > <th colspan="2"> </th> >@@ -207,6 +208,7 @@ for="tobranch"><strong>Clone these rules to:</strong></label> <input type="hidde > <td>[% rule.finedays %]</td> > <td>[% rule.renewalsallowed %]</td> > <td>[% rule.renewalperiod %]</td> >+ <td>[% rule.norenewalbefore %]</td> > <td>[% rule.reservesallowed %]</td> > <td>[% rule.rentaldiscount %]</td> > <td><a href="#" class="editrule">Edit</a></td> >@@ -256,6 +258,7 @@ for="tobranch"><strong>Clone these rules to:</strong></label> <input type="hidde > <td><input type="text" name="finedays" id="fined" size="3" /> </td> > <td><input type="text" name="renewalsallowed" id="renewalsallowed" size="2" /></td> > <td><input type="text" name="renewalperiod" id="renewalperiod" size="3" /></td> >+ <td><input type="text" name="norenewalbefore" id="norenewalbefore" size="3" /></td> > <td><input type="text" name="reservesallowed" id="reservesallowed" size="2" /></td> > <td><input type="text" name="rentaldiscount" id="rentaldiscount" size="2" /></td> > <td colspan="2"> >-- >1.7.10.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 7413
:
24685
|
24686
|
24687
|
24688
|
24689
|
24926
|
24927
|
24928
|
24929
|
24930
|
25166
|
25247
|
25248
|
25249
|
25250
|
25251
|
25252
|
25855
|
25856
|
25857
|
25858
|
25859
|
25860
|
26726
|
26727
|
26728
| 26729 |
26730
|
26731
|
26732
|
26733