View | Details | Raw Unified | Return to bug 929
Collapse All | Expand All

(-)a/C4/Templates.pm (+1 lines)
Lines 58-63 sub new { Link Here
58
    my $template = Template->new(
58
    my $template = Template->new(
59
        {   EVAL_PERL    => 1,
59
        {   EVAL_PERL    => 1,
60
            ABSOLUTE     => 1,
60
            ABSOLUTE     => 1,
61
	    PLUGIN_BASE => 'Koha::Template::Plugin',
61
            INCLUDE_PATH => [
62
            INCLUDE_PATH => [
62
                "$htdocs/$theme/$lang/includes",
63
                "$htdocs/$theme/$lang/includes",
63
                "$htdocs/$theme/en/includes"
64
                "$htdocs/$theme/en/includes"
(-)a/Koha/Template/Plugin/KohaDates.pm (+31 lines)
Line 0 Link Here
1
package Koha::Template::Plugin::KohaDates;
2
3
# Copyright Catalyst IT 2011
4
5
# This file is part of Koha.
6
#
7
# Koha is free software; you can redistribute it and/or modify it under the
8
# terms of the GNU General Public License as published by the Free Software
9
# Foundation; either version 2 of the License, or (at your option) any later
10
# version.
11
#
12
# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
13
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
14
# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
15
#
16
# You should have received a copy of the GNU General Public License along
17
# with Koha; if not, write to the Free Software Foundation, Inc.,
18
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19
20
use Template::Plugin::Filter;
21
use base qw( Template::Plugin::Filter );
22
23
use C4::Dates;
24
25
sub filter {
26
    my ($self,$text) = @_;
27
    my $date = C4::Dates->new( $text, 'iso' );
28
    return $date->output("syspref");
29
}
30
31
1;
(-)a/acqui/ordered.pl (-2 lines)
Lines 97-104 while ( my $data = $sth->fetchrow_hashref ) { Link Here
97
        push @ordered, $data;
97
        push @ordered, $data;
98
        $total += $subtotal;
98
        $total += $subtotal;
99
    }
99
    }
100
    my $entrydate = C4::Dates->new( $data->{'entrydate'}, 'iso' );
101
    $data->{'entrydate'} = $entrydate->output("syspref");
102
}
100
}
103
$total = sprintf( "%.2f", $total );
101
$total = sprintf( "%.2f", $total );
104
102
(-)a/acqui/spent.pl (-4 lines)
Lines 98-107 while ( my $data = $sth->fetchrow_hashref ) { Link Here
98
        $data->{'freight'}   = sprintf( "%.2f", $data->{'freight'} );
98
        $data->{'freight'}   = sprintf( "%.2f", $data->{'freight'} );
99
        $data->{'unitprice'} = sprintf( "%.2f", $data->{'unitprice'} );
99
        $data->{'unitprice'} = sprintf( "%.2f", $data->{'unitprice'} );
100
        $total += $subtotal;
100
        $total += $subtotal;
101
        my $entrydate = C4::Dates->new( $data->{'entrydate'}, 'iso' );
102
        $data->{'entrydate'} = $entrydate->output("syspref");
103
        my $datereceived = C4::Dates->new( $data->{'datereceived'}, 'iso' );
104
        $data->{'datereceived'} = $datereceived->output("syspref");
105
        push @spent, $data;
101
        push @spent, $data;
106
    }
102
    }
107
103
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/ordered.tt (-2 / +3 lines)
Lines 1-3 Link Here
1
[% USE KohaDates %]
1
[% INCLUDE 'doc-head-open.inc' %]
2
[% INCLUDE 'doc-head-open.inc' %]
2
<title>Koha &rsaquo; Acquisitions &rsaquo; Ordered</title>
3
<title>Koha &rsaquo; Acquisitions &rsaquo; Ordered</title>
3
[% INCLUDE 'doc-head-close.inc' %]
4
[% INCLUDE 'doc-head-close.inc' %]
Lines 41-47 Link Here
41
	    [% order.title %]	
42
	    [% order.title %]	
42
	</td>
43
	</td>
43
	<td class="cell">
44
	<td class="cell">
44
	    <a href=/cgi-bin/koha/acqui/neworderempty.pl?ordernumber=[% order.ordernumber %]&booksellerid=[% order.booksellerid %]&basketno=[% order.basketno %]">[% order.ordernumber %]</a>
45
	    <a href="/cgi-bin/koha/acqui/neworderempty.pl?ordernumber=[% order.ordernumber %]&booksellerid=[% order.booksellerid %]&basketno=[% order.basketno %]">[% order.ordernumber %]</a>
45
	</td>
46
	</td>
46
	<td class="cell">
47
	<td class="cell">
47
	    <a href="/cgi-bin/koha/acqui/supplier.pl?supplierid=[% order.booksellerid %]">[% order.booksellerid %]</a>
48
	    <a href="/cgi-bin/koha/acqui/supplier.pl?supplierid=[% order.booksellerid %]">[% order.booksellerid %]</a>
Lines 56-62 Link Here
56
	    [% order.ecost %]	
57
	    [% order.ecost %]	
57
	</td>
58
	</td>
58
	<td class="cell">
59
	<td class="cell">
59
	    [% order.entrydate %]	
60
	    [% order.entrydate | $KohaDates %]
60
	</td>
61
	</td>
61
	<td class="cell" align="right">
62
	<td class="cell" align="right">
62
	    [% order.subtotal %]
63
	    [% order.subtotal %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/spent.tt (-3 / +3 lines)
Lines 1-3 Link Here
1
[% USE KohaDates %]
1
[% INCLUDE 'doc-head-open.inc' %]
2
[% INCLUDE 'doc-head-open.inc' %]
2
<title>Koha &rsaquo; Acquisitions &rsaquo; Spent</title>
3
<title>Koha &rsaquo; Acquisitions &rsaquo; Spent</title>
3
[% INCLUDE 'doc-head-close.inc' %]
4
[% INCLUDE 'doc-head-close.inc' %]
Lines 67-76 Link Here
67
	    [% order.freight %]		
68
	    [% order.freight %]		
68
	</td>
69
	</td>
69
	<td class="cell">
70
	<td class="cell">
70
	    [% order.entrydate %]
71
	    [% order.entrydate | $KohaDates %]
71
	</td>
72
	</td>
72
	<td class="cell">
73
	<td class="cell">
73
	    [% order.datereceived %]		
74
	    [% order.datereceived | $KohaDates %]		
74
	</td>
75
	</td>
75
	<td class="cell" align="right">
76
	<td class="cell" align="right">
76
	    [% order.subtotal %]		
77
	    [% order.subtotal %]		
77
- 

Return to bug 929