From f927e8eb36b5f64ec316a6b543739f6351887531 Mon Sep 17 00:00:00 2001 From: tipaul Date: Wed, 15 Sep 2004 16:27:18 +0000 Subject: [PATCH] bugfix for manually fixed duedate on issue. --- C4/Circulation/Circ2.pm | 5 +++-- circ/circulation.pl | 3 +++ koha-tmpl/intranet-tmpl/default/en/circ/circulation.tmpl | 3 +++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/C4/Circulation/Circ2.pm b/C4/Circulation/Circ2.pm index 6bb051f303..7a1fb13114 100755 --- a/C4/Circulation/Circ2.pm +++ b/C4/Circulation/Circ2.pm @@ -800,6 +800,7 @@ C<$date> contains the max date of return. calculated if empty. # sub issuebook { my ($env,$borrower,$barcode,$date) = @_; + warn "D : $date"; my $dbh = C4::Context->dbh; # my ($borrower, $flags) = &getpatroninformation($env, $borrowernumber, 0); my $iteminformation = getiteminformation($env, 0, $barcode); @@ -854,8 +855,8 @@ sub issuebook { my $datedue=time+($loanlength)*86400; my @datearr = localtime($datedue); my $dateduef = (1900+$datearr[5])."-".($datearr[4]+1)."-".$datearr[3]; - if ($env->{'datedue'}) { - $dateduef=$env->{'datedue'}; + if ($date) { + $dateduef=$date; } $sth->execute($borrower->{'borrowernumber'}, $iteminformation->{'itemnumber'}, $dateduef, $env->{'branchcode'}); $sth->finish; diff --git a/circ/circulation.pl b/circ/circulation.pl index 113c08ad6c..4d7200acee 100755 --- a/circ/circulation.pl +++ b/circ/circulation.pl @@ -148,6 +148,9 @@ if ($barcode) { NEEDSCONFIRMATION => 1); $noquestion = 0; } + $template->param(day => $day, + month => $month, + year => $year); if ($noerror && ($noquestion || $issueconfirmed)) { issuebook(\%env, $borrower, $barcode, $datedue); } diff --git a/koha-tmpl/intranet-tmpl/default/en/circ/circulation.tmpl b/koha-tmpl/intranet-tmpl/default/en/circ/circulation.tmpl index ee67e29dd0..123b0a1754 100644 --- a/koha-tmpl/intranet-tmpl/default/en/circ/circulation.tmpl +++ b/koha-tmpl/intranet-tmpl/default/en/circ/circulation.tmpl @@ -195,6 +195,9 @@ "> "> + "> + "> + "> -- 2.39.5