Added format_date() to the scripts.
authorwolfpac444 <wolfpac444>
Tue, 22 Apr 2003 10:22:19 +0000 (10:22 +0000)
committerwolfpac444 <wolfpac444>
Tue, 22 Apr 2003 10:22:19 +0000 (10:22 +0000)
acqui/acquire.pl
acqui/basket.pl
acqui/order.pl

index 62ff2b8..0b0ec90 100755 (executable)
@@ -33,6 +33,7 @@ use C4::Auth;
 use C4::Interface::CGI::Output;
 use C4::Database;
 use HTML::Template;
+use C4::Date;
 
 my $input=new CGI;
 my $id=$input->param('id');
@@ -46,8 +47,7 @@ my $catview=$input->param('catview');
 my $gst=$input->param('gst');
 my ($count,@results)=ordersearch($search,$id,$biblio,$catview);
 my ($count2,@booksellers)=bookseller($results[0]->{'booksellerid'});
-my @date=split('-',$results[0]->{'entrydate'});
-my $date="$date[2]/$date[1]/$date[0]";
+my $date = $results[0]->{'entrydate'};
 
 my ($template, $loggedinuser, $cookie)
     = get_template_and_user({template_name => "acqui/acquire.tmpl",
@@ -140,10 +140,10 @@ if ($count == 1){
                gst => $gst,
                catview => ($catview ne 'yes'?1:0),
                name => $booksellers[0]->{'name'},
-               date => $date,
+               date => format_date($date),
                title => $results[0]->{'title'},
                author => $results[0]->{'author'},
-               copyrightdate => $results[0]->{'copyrightdate'},
+               copyrightdate => format_date($results[0]->{'copyrightdate'}),
                CGIitemtype => $CGIitemtype,
                CGIbranch => $CGIbranch,
                isbn => $results[0]->{'isbn'},
@@ -177,7 +177,7 @@ if ($count == 1){
                push @loop,\%line;
        }
        $template->param( loop => \@loop,
-                                               date => $date,
+                                               date => format_date($date),
                                                name => $booksellers[0]->{'name'},
                                                id => $id,
                                                invoice => $invoice,
index 8625f2c..98f058c 100755 (executable)
@@ -32,6 +32,7 @@ use C4::Interface::CGI::Output;
 use C4::Database;
 use HTML::Template;
 use C4::Catalogue;
+use C4::Date;
 use strict;
 
 my $query =new CGI;
@@ -95,7 +96,7 @@ for (my $i=0;$i<$count;$i++){
 }
 $template->param(basket => $basket,
                                                authorisedby => $results[0]->{'authorisedby'},
-                                               entrydate =>$results[0]->{'entrydate'},
+                                               entrydate => format_date($results[0]->{'entrydate'}),
                                                id=> $results[0]->{'booksellerid'},
                                                name => $booksellers[0]->{'name'},
                                                books_loop => \@books_loop,
index 4c55a43..4970f10 100755 (executable)
@@ -33,6 +33,7 @@ use C4::Interface::CGI::Output;
 use C4::Database;
 use HTML::Template;
 use C4::Catalogue;
+use C4::Date;
 
 my $query=new CGI;
 my ($template, $loggedinuser, $cookie)
@@ -71,7 +72,7 @@ for (my $i=0; $i<$count; $i++) {
                $inner_line{basketno} =$orders->[$i2]->{'basketno'};
                $inner_line{total} =$orders->[$i2]->{'count(*)'};
                $inner_line{authorisedby} = $orders->[$i2]->{'authorisedby'};
-               $inner_line{entrydate} = $orders->[$i2]->{'entrydate'};
+               $inner_line{entrydate} = format_date($orders->[$i2]->{'entrydate'});
                push @loop_basket, \%inner_line;
        }
        $line{loop_basket} = \@loop_basket;