X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=C4%2FCirculation.pm;h=7c9fe8925b99f755de9343082d702d03dbe8c182;hb=ba72e844b5c5197a9bfe8ea89c92b76d94f7e7e2;hp=9f86058082a6131c900d79b38649336a5b22f8d3;hpb=0e17926b61d462adb09f711a06e07c384ebe946c;p=koha.git diff --git a/C4/Circulation.pm b/C4/Circulation.pm index 9f86058082..7c9fe8925b 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -979,7 +979,7 @@ sub AddIssue { unless ($datedue) { my $itype = ( C4::Context->preference('item-level_itypes') ) ? $biblio->{'itype'} : $biblio->{'itemtype'}; my $loanlength = GetLoanLength( $borrower->{'categorycode'}, $itype, $branch ); - $datedue = CalcDateDue( C4::Dates->new( $issuedate, 'iso' ), $loanlength, $branch ); + $datedue = CalcDateDue( C4::Dates->new( $issuedate, 'iso' ), $loanlength, $branch, $borrower ); # if ReturnBeforeExpiry ON the datedue can't be after borrower expirydate if ( C4::Context->preference('ReturnBeforeExpiry') && $datedue->output('iso') gt $borrower->{dateexpiry} ) { @@ -1971,7 +1971,7 @@ sub AddRenewal { $item->{homebranch} # item's homebranch determines loanlength OR do we want the branch specified by the AddRenewal argument? ); #FIXME -- use circControl? - $datedue = CalcDateDue(C4::Dates->new(),$loanlength,$branch); # this branch is the transactional branch. + $datedue = CalcDateDue(C4::Dates->new(),$loanlength,$branch,$borrower); # this branch is the transactional branch. # The question of whether to use item's homebranch calendar is open. }