projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
72157: Monthly recurring field is missing [ajax only for cust with many packages]
[freeside.git]
/
httemplate
/
elements
/
tr-fixed-date.html
diff --git
a/httemplate/elements/tr-fixed-date.html
b/httemplate/elements/tr-fixed-date.html
index
716e5ce
..
731a3ca
100644
(file)
--- a/
httemplate/elements/tr-fixed-date.html
+++ b/
httemplate/elements/tr-fixed-date.html
@@
-1,13
+1,19
@@
<% include('tr-fixed.html', %opt ) %>
<%init>
<% 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 $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)
;
+$opt{'formatted_value'} =
$value > 0 ? time2str($date_format, $value) : ''
;
</%init>
</%init>