summaryrefslogtreecommitdiff
path: root/httemplate/elements/tr-fixed-date.html
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2014-12-04 14:47:49 -0800
committerIvan Kohler <ivan@freeside.biz>2014-12-04 14:47:49 -0800
commit7dd8215a91ca6ca4a9988a0108647ada7f2a11d8 (patch)
tree0a00d42d12a5e606995374ebe0f0464856fbd373 /httemplate/elements/tr-fixed-date.html
parent61e2f89c40a50478d12b4818400caff32d20f61a (diff)
backdate credits, RT#32320
Diffstat (limited to 'httemplate/elements/tr-fixed-date.html')
-rw-r--r--httemplate/elements/tr-fixed-date.html10
1 files changed, 8 insertions, 2 deletions
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);