Lines 50-55
use Koha::DateUtils;
Link Here
|
50 |
use Koha::Calendar; |
50 |
use Koha::Calendar; |
51 |
use Koha::Borrower::Debarments; |
51 |
use Koha::Borrower::Debarments; |
52 |
use Koha::Database; |
52 |
use Koha::Database; |
|
|
53 |
use Koha::Logger; |
53 |
use Carp; |
54 |
use Carp; |
54 |
use List::MoreUtils qw( uniq ); |
55 |
use List::MoreUtils qw( uniq ); |
55 |
use Date::Calc qw( |
56 |
use Date::Calc qw( |
Lines 2787-2792
sub AddRenewal {
Link Here
|
2787 |
my $datedue = shift; |
2788 |
my $datedue = shift; |
2788 |
my $lastreneweddate = shift || DateTime->now(time_zone => C4::Context->tz)->ymd(); |
2789 |
my $lastreneweddate = shift || DateTime->now(time_zone => C4::Context->tz)->ymd(); |
2789 |
|
2790 |
|
|
|
2791 |
my $logger = Koha::Logger->get("C4::Circulation::AddRenewal"); |
2792 |
$logger->trace( "PARAMS: " . Dumper( { borrowernumber => $borrowernumber, itemnumber => $itemnumber, branch => $branch, datedue => $datedue, lastreneweddate => $lastreneweddate } ) ); |
2793 |
|
2790 |
my $item = GetItem($itemnumber) or return; |
2794 |
my $item = GetItem($itemnumber) or return; |
2791 |
my $biblio = GetBiblioFromItemNumber($itemnumber) or return; |
2795 |
my $biblio = GetBiblioFromItemNumber($itemnumber) or return; |
2792 |
|
2796 |
|
Lines 2892-2898
sub AddRenewal {
Link Here
|
2892 |
borrowernumber => $borrowernumber, |
2896 |
borrowernumber => $borrowernumber, |
2893 |
ccode => $item->{'ccode'}} |
2897 |
ccode => $item->{'ccode'}} |
2894 |
); |
2898 |
); |
2895 |
return $datedue; |
2899 |
|
|
|
2900 |
$logger->trace("RETURNING $datedue"); |
2901 |
return $datedue; |
2896 |
} |
2902 |
} |
2897 |
|
2903 |
|
2898 |
sub GetRenewCount { |
2904 |
sub GetRenewCount { |