From 31175cbdabee5fb56a4403081a305da8925bcbde Mon Sep 17 00:00:00 2001 From: Adrien Saurat Date: Thu, 22 Mar 2012 10:20:14 +0100 Subject: [PATCH] Bug 7737: applies date filters on vendor pages Signed-off-by: Paul Poulain --- acqui/booksellers.pl | 6 ------ acqui/supplier.pl | 6 ------ .../intranet-tmpl/prog/en/modules/acqui/booksellers.tt | 5 +++-- koha-tmpl/intranet-tmpl/prog/en/modules/acqui/supplier.tt | 5 +++-- 4 files changed, 6 insertions(+), 16 deletions(-) diff --git a/acqui/booksellers.pl b/acqui/booksellers.pl index 025fbd1fb7..5a1c2480d1 100755 --- a/acqui/booksellers.pl +++ b/acqui/booksellers.pl @@ -56,7 +56,6 @@ use C4::Biblio; use C4::Output; use CGI; -use C4::Dates qw/format_date/; use C4::Acquisition qw/ GetBasketsInfosByBookseller /; use C4::Bookseller qw/ GetBookSellerFromId GetBookSeller /; use C4::Members qw/GetMember/; @@ -126,11 +125,6 @@ for my $vendor (@suppliers) { ) ) ) { - for my $date_field (qw( creationdate closedate)) { - if ( $basket->{$date_field} ) { - $basket->{$date_field} = format_date( $basket->{$date_field} ); - } - } foreach (qw(total_items total_biblios expected_items)) { $basket->{$_} ||= 0; } diff --git a/acqui/supplier.pl b/acqui/supplier.pl index fdeef06f5b..6746d8d444 100755 --- a/acqui/supplier.pl +++ b/acqui/supplier.pl @@ -46,7 +46,6 @@ use C4::Auth; use C4::Contract qw/GetContract/; use C4::Biblio; use C4::Output; -use C4::Dates qw/format_date /; use CGI; use C4::Bookseller qw( GetBookSellerFromId DelBookseller ); @@ -79,11 +78,6 @@ if ( $op eq 'display' ) { my $contracts = GetContract( { booksellerid => $booksellerid } ); - for ( @{$contracts} ) { - $_->{contractstartdate} = format_date( $_->{contractstartdate} ); - $_->{contractenddate} = format_date( $_->{contractenddate} ); - } - $template->param( booksellerid => $booksellerid, name => $supplier->{'name'}, diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/booksellers.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/booksellers.tt index 0e6aaa34bf..b17bc54297 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/booksellers.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/booksellers.tt @@ -1,3 +1,4 @@ +[% USE KohaDates %] [% INCLUDE 'doc-head-open.inc' %] Koha › Search for vendor [% supplier %] [% INCLUDE 'doc-head-close.inc' %] @@ -110,10 +111,10 @@ $(document).ready(function() { [% basket.authorisedby_firstname %] [% basket.authorisedby_surname %] - [% basket.creationdate %] + [% basket.creationdate | $KohaDates %] [% IF ( basket.closedate ) %] - closed on [% basket.closedate %] + closed on [% basket.closedate | $KohaDates %] View [% ELSE %] [% IF ( basket.active ) %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/supplier.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/supplier.tt index 05b7fac08c..7260f558ae 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/supplier.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/supplier.tt @@ -1,3 +1,4 @@ +[% USE KohaDates %] [% INCLUDE 'doc-head-open.inc' %] Koha › Vendor [% bookselname %] [% INCLUDE 'doc-head-close.inc' %] @@ -217,8 +218,8 @@ if (f.company.value == "") { [% contract.contractname %] [% contract.contractdescription %] - [% contract.contractstartdate %] - [% contract.contractenddate %] + [% contract.contractstartdate | $KohaDates %] + [% contract.contractenddate | $KohaDates %] Edit Delete -- 2.39.5