From 7dd8215a91ca6ca4a9988a0108647ada7f2a11d8 Mon Sep 17 00:00:00 2001 From: Ivan Kohler Date: Thu, 4 Dec 2014 14:47:49 -0800 Subject: backdate credits, RT#32320 --- httemplate/elements/tr-fixed-date.html | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'httemplate/elements/tr-fixed-date.html') diff --git a/httemplate/elements/tr-fixed-date.html b/httemplate/elements/tr-fixed-date.html index 716e5ceb8..ef599796d 100644 --- a/httemplate/elements/tr-fixed-date.html +++ b/httemplate/elements/tr-fixed-date.html @@ -1,12 +1,18 @@ <% include('tr-fixed.html', %opt ) %> <%init> -my %opt = @_; +my %opt; +if ( ref($_[0]) ) { + my $hashref = shift; + %opt = %$hashref; +} else { + %opt = @_; +} my $value = $opt{'curr_value'} || $opt{'value'}; my $conf = new FS::Conf; -my $date_format = $conf->config('date_format') || '%m/%d/%Y'; +my $date_format = $opt{'format'} || $conf->config('date_format') || '%m/%d/%Y'; $opt{'formatted_value'} = time2str($date_format, $value); -- cgit v1.2.1