From 81978af92ecdaaefeff5156d9ab3b4f99586df1c Mon Sep 17 00:00:00 2001 From: Ivan Kohler Date: Tue, 3 Jul 2012 18:51:51 -0700 Subject: quotations, RT#16996 --- httemplate/elements/tr-fixed-cust_main.html | 15 +++++++++++++++ httemplate/elements/tr-fixed-date.html | 13 +++++++++++++ httemplate/elements/tr-fixed-prospect_main.html | 15 +++++++++++++++ 3 files changed, 43 insertions(+) create mode 100644 httemplate/elements/tr-fixed-cust_main.html create mode 100644 httemplate/elements/tr-fixed-date.html create mode 100644 httemplate/elements/tr-fixed-prospect_main.html (limited to 'httemplate/elements') diff --git a/httemplate/elements/tr-fixed-cust_main.html b/httemplate/elements/tr-fixed-cust_main.html new file mode 100644 index 000000000..00bcb66d8 --- /dev/null +++ b/httemplate/elements/tr-fixed-cust_main.html @@ -0,0 +1,15 @@ +% if ( $cust_main ) { + <% include('tr-fixed.html', %opt ) %> +% } +<%init> + +my %opt = @_; + +my $value = $opt{'curr_value'} || $opt{'value'}; + +my $cust_main = $value ? qsearchs('cust_main', {custnum=>$value} ) + : ''; + +$opt{'formatted_value'} = $cust_main->name if $cust_main; + + diff --git a/httemplate/elements/tr-fixed-date.html b/httemplate/elements/tr-fixed-date.html new file mode 100644 index 000000000..716e5ceb8 --- /dev/null +++ b/httemplate/elements/tr-fixed-date.html @@ -0,0 +1,13 @@ +<% include('tr-fixed.html', %opt ) %> +<%init> + +my %opt = @_; + +my $value = $opt{'curr_value'} || $opt{'value'}; + +my $conf = new FS::Conf; +my $date_format = $conf->config('date_format') || '%m/%d/%Y'; + +$opt{'formatted_value'} = time2str($date_format, $value); + + diff --git a/httemplate/elements/tr-fixed-prospect_main.html b/httemplate/elements/tr-fixed-prospect_main.html new file mode 100644 index 000000000..8da0ffb84 --- /dev/null +++ b/httemplate/elements/tr-fixed-prospect_main.html @@ -0,0 +1,15 @@ +% if ( $prospect_main ) { + <% include('tr-fixed.html', %opt ) %> +% } +<%init> + +my %opt = @_; + +my $value = $opt{'curr_value'} || $opt{'value'}; + +my $prospect_main = $value ? qsearchs('prospect_main', {prospectnum=>$value} ) + : ''; + +$opt{'formatted_value'} = $prospect_main->name if $prospect_main; + + -- cgit v1.2.1