Bug 15845: Renewal date in circulation.pl is not always correct and not even used
If you have a patron category with a hard renewal date, the enrolllment period will be zero. You cannot calculate the renewal date as is done in the script currently. Even more, the renewaldate template var is not even used. Test plan: [1] Verify that checkin/checkout works as expected. [2] Git grep on renewaldate [3] Check the code in circulation.pl for "$renew" Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
This commit is contained in:
parent
d1ead7313c
commit
393308907c
1 changed files with 0 additions and 8 deletions
|
@ -279,13 +279,6 @@ if ($borrowernumber) {
|
||||||
my ( $today_year, $today_month, $today_day) = Today();
|
my ( $today_year, $today_month, $today_day) = Today();
|
||||||
my ($warning_year, $warning_month, $warning_day) = split /-/, $borrower->{'dateexpiry'};
|
my ($warning_year, $warning_month, $warning_day) = split /-/, $borrower->{'dateexpiry'};
|
||||||
my ( $enrol_year, $enrol_month, $enrol_day) = split /-/, $borrower->{'dateenrolled'};
|
my ( $enrol_year, $enrol_month, $enrol_day) = split /-/, $borrower->{'dateenrolled'};
|
||||||
# Renew day is calculated by adding the enrolment period to today
|
|
||||||
my ( $renew_year, $renew_month, $renew_day);
|
|
||||||
if ($enrol_year*$enrol_month*$enrol_day>0) {
|
|
||||||
( $renew_year, $renew_month, $renew_day) =
|
|
||||||
Add_Delta_YM( $enrol_year, $enrol_month, $enrol_day,
|
|
||||||
0 , $borrower->{'enrolmentperiod'});
|
|
||||||
}
|
|
||||||
# if the expiry date is before today ie they have expired
|
# if the expiry date is before today ie they have expired
|
||||||
if ( !$borrower->{'dateexpiry'} || $warning_year*$warning_month*$warning_day==0
|
if ( !$borrower->{'dateexpiry'} || $warning_year*$warning_month*$warning_day==0
|
||||||
|| Date_to_Days($today_year, $today_month, $today_day )
|
|| Date_to_Days($today_year, $today_month, $today_day )
|
||||||
|
@ -297,7 +290,6 @@ if ($borrowernumber) {
|
||||||
noissues => ($force_allow_issue) ? 0 : "1",
|
noissues => ($force_allow_issue) ? 0 : "1",
|
||||||
forceallow => $force_allow_issue,
|
forceallow => $force_allow_issue,
|
||||||
expired => "1",
|
expired => "1",
|
||||||
renewaldate => "$renew_year-$renew_month-$renew_day",
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
# check for NotifyBorrowerDeparture
|
# check for NotifyBorrowerDeparture
|
||||||
|
|
Loading…
Reference in a new issue