From 5ca3118f569e35c604177209c41e99653d31018c Mon Sep 17 00:00:00 2001 From: wolfpac444 Date: Tue, 22 Apr 2003 10:22:19 +0000 Subject: [PATCH] Added format_date() to the scripts. --- acqui/acquire.pl | 10 +++++----- acqui/basket.pl | 3 ++- acqui/order.pl | 3 ++- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/acqui/acquire.pl b/acqui/acquire.pl index 62ff2b8e1a..0b0ec90860 100755 --- a/acqui/acquire.pl +++ b/acqui/acquire.pl @@ -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, diff --git a/acqui/basket.pl b/acqui/basket.pl index 8625f2c94f..98f058c004 100755 --- a/acqui/basket.pl +++ b/acqui/basket.pl @@ -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, diff --git a/acqui/order.pl b/acqui/order.pl index 4c55a4383e..4970f10a0a 100755 --- a/acqui/order.pl +++ b/acqui/order.pl @@ -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; -- 2.39.5