Bugzilla – Attachment 29124 Details for
Bug 12448
Ask for confirmation when checking out an item with rental fees
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 12448 - Fixes: confirmation when checking out an item with rental fees
Bug-12448---Fixes-confirmation-when-checking-out-a.patch (text/plain), 3.65 KB, created by
Maxime Beaulieu
on 2014-06-20 19:22:10 UTC
(
hide
)
Description:
Bug 12448 - Fixes: confirmation when checking out an item with rental fees
Filename:
MIME Type:
Creator:
Maxime Beaulieu
Created:
2014-06-20 19:22:10 UTC
Size:
3.65 KB
patch
obsolete
>From 1be57c9d8c8684e0b89ceeb0cc156578bb0ee022 Mon Sep 17 00:00:00 2001 >From: mbeaulieu <mbeaulieu@inlibro.com> >Date: Fri, 20 Jun 2014 15:16:43 -0400 >Subject: [PATCH] Bug 12448 - Fixes: confirmation when checking out an item > with rental fees > >Fixes: >Default behaviour changed to "Don't ask". >Adressed the punctuation issues. >Removed the currency symbols in the warning message. >Using "GetIssuingCharges()" to calculate the correct charge amount, including applicable discounts. >--- > C4/Circulation.pm | 12 +++++------- > installer/data/mysql/sysprefs.sql | 2 +- > .../prog/en/modules/circ/circulation.tt | 4 ++-- > 3 files changed, 8 insertions(+), 10 deletions(-) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index e33e5ea..c5cae12 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -906,17 +906,15 @@ sub CanBookBeIssued { > if ( $borrower->{'branchcode'} ne $userenv->{branch} ); > } > } >- >+ # > # CHECK IF THERE IS RENTAL CHARGES. RENTAL MUST BE CONFIRMED BY THE BORROWER >- my $sth = $dbh->prepare("SELECT rentalcharge FROM itemtypes WHERE itemtype = ?"); >- $sth->execute( $item->{'itemtype'} ); >- my $rentalCharge = $sth->fetchrow(); >+ # >+ my ($rentalCharge) = GetIssuingCharges( $item->{'itemnumber'}, $borrower->{'borrowernumber'} ); > my $rentalConfirmation = C4::Context->preference("RentalFeesCheckoutConfirmation"); > >- if ( $rentalCharge && $rentalConfirmation ) >+ if ( $rentalConfirmation && $rentalCharge != 0 ) > { >- $rentalCharge = sprintf("%.02f \$", $rentalCharge); >- $rentalCharge =~ s/\./,/; >+ $rentalCharge = sprintf("%.02f", $rentalCharge); > $needsconfirmation{RENTALCHARGE} = $rentalCharge; > } > >diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql >index 98ee138..76775b7 100644 >--- a/installer/data/mysql/sysprefs.sql >+++ b/installer/data/mysql/sysprefs.sql >@@ -332,7 +332,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('RenewalPeriodBase','date_due','date_due|now','Set whether the renewal date should be counted from the date_due or from the moment the Patron asks for renewal ','Choice'), > ('RenewalSendNotice','0','',NULL,'YesNo'), > ('RenewSerialAddsSuggestion','0',NULL,'If ON, adds a new suggestion at serial subscription renewal','YesNo'), >-('RentalFeesCheckoutConfirmation', '1', NULL , 'Allow user to confirme when checking out an item with rental fees.', 'YesNo'), >+('RentalFeesCheckoutConfirmation', '0', NULL , 'Allow user to confirme when checking out an item with rental fees.', 'YesNo'), > ('RentalsInNoissuesCharge','1',NULL,'Rental charges block checkouts (added to noissuescharge).','YesNo'), > ('RequestOnOpac','1',NULL,'If ON, globally enables patron holds on OPAC','YesNo'), > ('ReservesControlBranch','PatronLibrary','ItemHomeLibrary|PatronLibrary','Branch checked for members reservations rights','Choice'), >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >index faf3d81..fc3247d 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >@@ -203,11 +203,11 @@ var MSG_EXPORT_SELECT_CHECKOUTS = _("You must select checkout(s) to export"); > [% END %] > > [% IF ( DEBT ) %] >- <li>The patron has a debt of [% DEBT %]</li> >+ <li>The patron has a debt of [% DEBT %].</li> > [% END %] > > [% IF ( RENTALCHARGE ) %] >- <li>Rental charge for this item : [% RENTALCHARGE %]</li> >+ <li>Rental charge for this item: [% RENTALCHARGE %]</li> > [% END %] > > [% IF ( RENEW_ISSUE ) %] >-- >1.7.9.5
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 12448
:
28954
|
29123
|
29124
|
29182
|
29311
|
29312
|
29313
|
29361
|
29362
|
29363
|
29364
|
29367
|
29368
|
29371
|
29372
|
29373
|
29374
|
29543
|
30307
|
30515
|
30862
|
30864
|
33434