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

(-)a/C4/Members.pm (-1 / +3 lines)
Lines 1710-1716 sub ExtendMemberSubscriptionTo { Link Here
1710
    my $dbh = C4::Context->dbh;
1710
    my $dbh = C4::Context->dbh;
1711
    my $borrower = GetMember('borrowernumber'=>$borrowerid);
1711
    my $borrower = GetMember('borrowernumber'=>$borrowerid);
1712
    unless ($date){
1712
    unless ($date){
1713
      $date=POSIX::strftime("%Y-%m-%d",localtime());
1713
	$date = (C4::Context->preference('BorrowerRenewalPeriodBase') eq 'dateexpiry') ?
1714
                                        C4::Dates->new($borrower->{'dateexpiry'}, 'iso')->output("iso") :
1715
                                        C4::Dates->new()->output("iso");
1714
      $date = GetExpiryDate( $borrower->{'categorycode'}, $date );
1716
      $date = GetExpiryDate( $borrower->{'categorycode'}, $date );
1715
    }
1717
    }
1716
    my $sth = $dbh->do(<<EOF);
1718
    my $sth = $dbh->do(<<EOF);
(-)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/installer/data/mysql/updatedatabase.pl (+9 lines)
Lines 4550-4555 if (C4::Context->preference("Version") < TransformToNum($DBversion)) { Link Here
4550
    SetVersion ($DBversion);
4550
    SetVersion ($DBversion);
4551
}
4551
}
4552
4552
4553
$DBversion = "3.06.00.XXX";
4554
if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
4555
    $dbh->do(<<ENDOFRENEWAL);
4556
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');
4557
ENDOFRENEWAL
4558
    print "Upgrade to $DBversion done (Change the field)\n";
4559
    SetVersion ($DBversion);
4560
}
4561
4553
=head1 FUNCTIONS
4562
=head1 FUNCTIONS
4554
4563
4555
=head2 DropAllForeignKeys($table)
4564
=head2 DropAllForeignKeys($table)
(-)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