View | Details | Raw Unified | Return to bug 6843
Collapse All | Expand All

(-)a/C4/Members.pm (-1 / +3 lines)
Lines 1687-1693 sub ExtendMemberSubscriptionTo { Link Here
1687
    my $dbh = C4::Context->dbh;
1687
    my $dbh = C4::Context->dbh;
1688
    my $borrower = GetMember('borrowernumber'=>$borrowerid);
1688
    my $borrower = GetMember('borrowernumber'=>$borrowerid);
1689
    unless ($date){
1689
    unless ($date){
1690
      $date=POSIX::strftime("%Y-%m-%d",localtime());
1690
      $date = (C4::Context->preference('BorrowerRenewalPeriodBase') eq 'dateexpiry') ?
1691
                                        C4::Dates->new($borrower->{'dateexpiry'}, 'iso')->output("iso") :
1692
                                        C4::Dates->new()->output("iso");
1691
      $date = GetExpiryDate( $borrower->{'categorycode'}, $date );
1693
      $date = GetExpiryDate( $borrower->{'categorycode'}, $date );
1692
    }
1694
    }
1693
    my $sth = $dbh->do(<<EOF);
1695
    my $sth = $dbh->do(<<EOF);
(-)a/installer/data/mysql/atomicupdate/bug_6843_Renew_membership_from_expiry_or_current_date.pl (+10 lines)
Line 0 Link Here
1
#! /usr/bin/perl
2
use strict;
3
use warnings;
4
use C4::Context;
5
my $dbh=C4::Context->dbh;
6
$dbh->do(<<ENDOFRENEWAL);
7
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('BorrowerRenewalPeriodBase', 'now', 'Set whether the borrower renewal date should be counted from the dateexpiry or from the current date ','dateexpiry|now','Choice');
8
ENDOFRENEWAL
9
print "Upgrade done (Added a system preference to allow renewal of Patron account either from todays date or from existing expiry date in the patrons account.)\n";
10
(-)a/installer/data/mysql/sysprefs.sql (+1 lines)
Lines 328-331 INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES(' Link Here
328
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('OpacKohaUrl','1',"Show 'Powered by Koha' text on OPAC footer.",NULL,NULL);
328
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('OpacKohaUrl','1',"Show 'Powered by Koha' text on OPAC footer.",NULL,NULL);
329
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('EasyAnalyticalRecords','0','If on, display in the catalogue screens tools to easily setup analytical record relationships','','YesNo');
329
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('EasyAnalyticalRecords','0','If on, display in the catalogue screens tools to easily setup analytical record relationships','','YesNo');
330
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacShowRecentComments',0,'If ON a link to recent comments will appear in the OPAC masthead',NULL,'YesNo');
330
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacShowRecentComments',0,'If ON a link to recent comments will appear in the OPAC masthead',NULL,'YesNo');
331
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('BorrowerRenewalPeriodBase', 'now', 'Set whether the borrower renewal date should be counted from the dateexpiry or from the current date ','dateexpiry|now','Choice');
331
332
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref (-1 / +6 lines)
Lines 107-109 Patrons: Link Here
107
               yes: Do
107
               yes: Do
108
               no: "Don't"
108
               no: "Don't"
109
         - store and display surnames in upper case.
109
         - store and display surnames in upper case.
110
- 
110
     -
111
         - When renewing borrowers, base the new expiry date on
112
         - pref: BorrowerRenewalPeriodBase
113
           choices:
114
               now: current date.
115
               dateexpiry: current membership expiry date.

Return to bug 6843