Bugzilla – Attachment 64988 Details for
Bug 18527
Add a system preference to exclude renewals from the quick slip
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18527 - Add a system preference to exclude renewals from the quick slip
Bug-18527---Add-a-system-preference-to-exclude-ren.patch (text/plain), 4.44 KB, created by
Baptiste Wojtkowski (bwoj)
on 2017-07-11 09:56:25 UTC
(
hide
)
Description:
Bug 18527 - Add a system preference to exclude renewals from the quick slip
Filename:
MIME Type:
Creator:
Baptiste Wojtkowski (bwoj)
Created:
2017-07-11 09:56:25 UTC
Size:
4.44 KB
patch
obsolete
>From 919d90df3cde23e06aff3ff93edab55218fc740b Mon Sep 17 00:00:00 2001 >From: Liz Rea <liz@catalyst.net.nz> >Date: Wed, 22 Mar 2017 11:37:22 +1300 >Subject: [PATCH] Bug 18527 - Add a system preference to exclude renewals from > the quick slip > >To test: > >Set up your test case: > >Issue 4 books to a borrower. >1 we leave alone, that's today's issue. >2 Renew one of them - that's today's renewal. >3 Back date the issue date on the third one, in the database. Do not renew it. This is an issue not from today that has not been renewed. >4 Back date the issue date on the fourth, and set a renew date in the past in the database. This is an issue not from today that has been renewed in the past. > >With the syspref ShowRenewalsQuickSlip set to "Show" >Print a quick slip for this borrower, you should see only issues 1 and 2. >3 and 4 should never appear on this slip. >This is the current behaviour of the quick slip, nothing should change. >This is also the default of the syspref. > >With the syspref ShowRenewalsQuickSlip set to "Don't show" >Print a quick slip for this borrower, you should see only issue 1 (today's issue) >Issues 2, 3, and 4 should not appear on this slip. >This is the new behaviour, and must be activated by changing the syspref. > >Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com> >--- > C4/Members.pm | 16 +++++++++++++--- > installer/data/mysql/sysprefs.sql | 1 + > .../prog/en/modules/admin/preferences/circulation.pref | 6 ++++++ > 3 files changed, 20 insertions(+), 3 deletions(-) > >diff --git a/C4/Members.pm b/C4/Members.pm >index 3726e00..a875db0 100644 >--- a/C4/Members.pm >+++ b/C4/Members.pm >@@ -1122,10 +1122,20 @@ sub IssueSlip { > $issue->{date_due} = $issue->{date_due_sql}; > if ($quickslip) { > my $today = output_pref({ dt => dt_from_string, dateformat => 'iso', dateonly => 1 }); >- if ( substr( $issue->{issuedate}, 0, 10 ) eq $today >- or substr( $issue->{lastreneweddate}, 0, 10 ) eq $today ) { >+ if ( C4::Context->preference("ShowRenewalsQuickslip") == 0 ) { >+ #we want today's issues, but not items renewed today >+ if ( (substr( $issue->{issuedate}, 0, 10 ) eq $today ) >+ && (substr( $issue->{lastreneweddate}, 0, 10 ) ne $today) ) { > $issue->{now} = 1; >- }; >+ } >+ } >+ else { >+ # we want all issues, including renewals, from today >+ if ( substr( $issue->{issuedate}, 0, 10 ) eq $today >+ or substr( $issue->{lastreneweddate}, 0, 10 ) eq $today ) { >+ $issue->{now} = 1; >+ } >+ } > } > } > >diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql >index 0bd8cac..f8dbba3 100644 >--- a/installer/data/mysql/sysprefs.sql >+++ b/installer/data/mysql/sysprefs.sql >@@ -479,6 +479,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('ShelfBrowserUsesLocation','1','1','Use the item location when finding items for the shelf browser.','YesNo'), > ('ShowAllCheckins', '0', '', 'Show all checkins', 'YesNo'), > ('ShowPatronImageInWebBasedSelfCheck','0','','If ON, displays patron image when a patron uses web-based self-checkout','YesNo'), >+('ShowRenewalsQuickslip','1','If OFF, do not show renewals on quick slips','','YesNo'), > ('ShowReviewer','full','none|full|first|surname|firstandinitial|username','Choose how a commenter\'s identity is presented alongside comments in the OPAC','Choice'), > ('ShowReviewerPhoto','1','','If ON, photo of reviewer will be shown beside comments in OPAC','YesNo'), > ('SlipCSS','',NULL,'Slips CSS url.','free'), >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref >index 90b2844..dc9be44 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref >@@ -150,6 +150,12 @@ Circulation: > yes: Allow > no: "Don't allow" > - patrons to submit notes about checked out items. >+ - >+ - pref: ShowRenewalsQuickslip >+ choices: >+ yes: Show >+ no: "Don't show" >+ - items renewed today on the circulation Quick Slip. > > Checkout Policy: > - >-- >2.7.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 18527
:
64714
|
64986
| 64988 |
64989