Bugzilla – Attachment 128873 Details for
Bug 27946
Add a charge per article request to patron categories
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27946: Add UI handling of AR fees
Bug-27946-Add-UI-handling-of-AR-fees.patch (text/plain), 5.93 KB, created by
Tomás Cohen Arazi (tcohen)
on 2021-12-22 20:41:10 UTC
(
hide
)
Description:
Bug 27946: Add UI handling of AR fees
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2021-12-22 20:41:10 UTC
Size:
5.93 KB
patch
obsolete
>From 18c9361ef6618aa3fa027143d236c4c2ee333cf7 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Fri, 17 Dec 2021 10:32:04 -0300 >Subject: [PATCH] Bug 27946: Add UI handling of AR fees > >This patch: >- Adds a notice about the fee to be charged to the patron (staff and > OPAC) >- Adds the right UI description for ARTICLE_REQUEST_FEE debit types in > the UI. > >To test: >1. Have some article request fee rules >2. Play with placing an article request in OPAC and staff >=> SUCCESS: You see a message about the fee >=> SUCCESS: The fees are correctly applied to the patron >3. Sign off :-D >--- > circ/request-article.pl | 8 ++++++-- > koha-tmpl/intranet-tmpl/prog/en/includes/accounts.inc | 1 + > .../intranet-tmpl/prog/en/modules/circ/request-article.tt | 7 ++++++- > koha-tmpl/opac-tmpl/bootstrap/en/includes/accounts.inc | 1 + > .../bootstrap/en/modules/opac-request-article.tt | 7 +++++++ > opac/opac-request-article.pl | 3 +++ > 6 files changed, 24 insertions(+), 3 deletions(-) > >diff --git a/circ/request-article.pl b/circ/request-article.pl >index dbe91dd52f..6a6e63c1d2 100755 >--- a/circ/request-article.pl >+++ b/circ/request-article.pl >@@ -129,10 +129,14 @@ if ( !$patron && $patron_cardnumber ) { > } > } > >-if( $patron && !$patron->can_request_article) { >+if ( $patron && !$patron->can_request_article ) { > $patron = undef; >+ $template->param( error_message => 'article_request_limit_reached' ); >+} >+ >+if ( $patron ) { > $template->param( >- error_message => 'article_request_limit_reached' >+ article_request_fee => $patron->article_request_fee > ); > } > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/accounts.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/accounts.inc >index e57195717c..8fcb01ef64 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/accounts.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/accounts.inc >@@ -13,6 +13,7 @@ > [%- SWITCH debit_type.code -%] > [%- CASE 'ACCOUNT' -%]Account creation fee > [%- CASE 'ACCOUNT_RENEW' -%]Account renewal fee >+ [%- CASE 'ARTICLE_REQUEST' -%]Article scan request fee > [%- CASE 'LOST' -%]Lost item > [%- CASE 'MANUAL' -%]Manual fee > [%- CASE 'NEW_CARD' -%]New card >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/request-article.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/request-article.tt >index 56536b9fbd..618a3c62f0 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/request-article.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/request-article.tt >@@ -5,6 +5,7 @@ > [% USE Branches %] > [% USE ItemTypes %] > [% USE AuthorisedValues %] >+[% USE Price %] > [% SET footerjs = 1 %] > [% SET article_requests_view = 1 %] > [% SET biblionumber = biblio.biblionumber %] >@@ -143,7 +144,11 @@ > </form> > [% ELSE %] > [% IF biblio.can_article_request( patron ) %] >- >+ [% IF article_request_fee > 0 %] >+ <div class="dialog alert"> >+ Patron will be charged with <strong>[% article_request_fee | $Price %]</strong> for every request >+ </div> >+ [% END %] > <form id="place-article-request" method="post" action="/cgi-bin/koha/circ/request-article.pl"> > <input type="hidden" name="action" value="create" /> > <input type="hidden" name="biblionumber" id="biblionumber" value="[% biblio.biblionumber | html %]" /> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/accounts.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/accounts.inc >index ca749fb7c9..7bda0e8dc9 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/accounts.inc >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/accounts.inc >@@ -13,6 +13,7 @@ > [%- SWITCH debit_type_code -%] > [%- CASE 'ACCOUNT' -%]Account creation fee > [%- CASE 'ACCOUNT_RENEW' -%]Account renewal fee >+ [%- CASE 'ARTICLE_REQUEST' -%]Article scan request fee > [%- CASE 'LOST' -%]Lost item > [%- CASE 'MANUAL' -%]Manual fee > [%- CASE 'NEW_CARD' -%]New card >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-request-article.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-request-article.tt >index 613f0fa3e1..505336d379 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-request-article.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-request-article.tt >@@ -2,6 +2,7 @@ > [% USE Branches %] > [% USE ItemTypes %] > [% USE AdditionalContents %] >+[% USE Price %] > [% USE raw %] > [% INCLUDE 'doc-head-open.inc' %] > >@@ -57,6 +58,12 @@ > [% IF article_request_type == 'item_only' %] [% SET mandatory_fields = Koha.Preference('ArticleRequestsMandatoryFieldsItemOnly') %] [% END %] > > >+ [% IF article_request_fee > 0 %] >+ <div class="alert alert-warning"> >+ You will be charged with <strong>[% article_request_fee | $Price %]</strong> for every request >+ </div> >+ [% END %] >+ > <form id="place-article-request" method="post" action="/cgi-bin/koha/opac-request-article.pl"> > <legend class="sr-only">Place article request</legend> > <input type="hidden" name="action" value="create" /> >diff --git a/opac/opac-request-article.pl b/opac/opac-request-article.pl >index 1ef7184e0b..dcf9f214a5 100755 >--- a/opac/opac-request-article.pl >+++ b/opac/opac-request-article.pl >@@ -128,6 +128,9 @@ if(!$patron->can_request_article) { > ); > } > >+$template->param( article_request_fee => $patron->article_request_fee ) >+ if $action ne 'create'; >+ > $template->param( > biblio => $biblio, > patron => $patron, >-- >2.32.0
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 27946
:
120144
|
120145
|
120146
|
120147
|
122522
|
122529
|
122530
|
122531
|
122532
|
122552
|
123503
|
123504
|
123505
|
123506
|
123507
|
128660
|
128661
|
128662
|
128663
|
128664
|
128665
|
128868
|
128869
|
128870
|
128871
|
128872
|
128873
|
129141
|
129142
|
129143
|
129144
|
129145
|
129146
|
129147
|
129171
|
129172
|
129173
|
129174
|
129175
|
129176
|
129177