X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=blobdiff_plain;f=circ%2Fbranchoverdues.pl;h=31e2b44a4348ef6d4b94fdc57939500b069f3d30;hb=5d6c092921919526ade501facb1220f8a108a08f;hp=5c1dcafea65449278d6219a8e517c547cbc7088f;hpb=aef1dd15fbe37a8a9c30ba4b38f7ecd6c1fea54d;p=koha_fer diff --git a/circ/branchoverdues.pl b/circ/branchoverdues.pl index 5c1dcafea6..31e2b44a43 100755 --- a/circ/branchoverdues.pl +++ b/circ/branchoverdues.pl @@ -22,12 +22,13 @@ use C4::Context; use CGI; use C4::Output; use C4::Auth; -use C4::Dates qw/format_date/; use C4::Overdues; # AddNotifyLine use C4::Biblio; use C4::Koha; use C4::Debug; use C4::Branch; +use Koha::DateUtils; +use Data::Dumper; =head1 branchoverdues.pl @@ -97,7 +98,6 @@ elsif ( $input->param('action') eq 'remove' ) { my @overduesloop; my @getoverdues = GetOverduesForBranch( $default, $location ); -use Data::Dumper; $debug and warn "HERE : $default / $location" . Dumper(@getoverdues); # search for location authorised value my ($tag,$subfield) = GetMarcFromKohaField('items.location',''); @@ -114,7 +114,8 @@ foreach my $num (@getoverdues) { if ($record){ $overdueforbranch{'subtitle'} = GetRecordValue('subtitle',$record,'')->[0]->{subfield}; } - $overdueforbranch{'date_due'} = format_date( $num->{'date_due'} ); + my $dt = dt_from_string($num->{date_due}, 'sql'); + $overdueforbranch{'date_due'} = output_pref($dt); $overdueforbranch{'title'} = $num->{'title'}; $overdueforbranch{'description'} = $num->{'description'}; $overdueforbranch{'barcode'} = $num->{'barcode'}; @@ -128,6 +129,7 @@ foreach my $num (@getoverdues) { $overdueforbranch{'itemcallnumber'} = $num->{'itemcallnumber'}; $overdueforbranch{'borrowernumber'} = $num->{'borrowernumber'}; $overdueforbranch{'itemnumber'} = $num->{'itemnumber'}; + $overdueforbranch{'cardnumber'} = $num->{'cardnumber'}; # now we add on the template, the differents values of notify_level # FIXME: numerical comparison, not string eq. @@ -151,7 +153,6 @@ foreach my $num (@getoverdues) { # initiate the templates for the overdueloop $template->param( overduesloop => \@overduesloop, - show_date => format_date(C4::Dates->today('iso')), location => $location, );