quotations, RT#16996
[freeside.git] / httemplate / elements / tr-fixed-cust_main.html
diff --git a/httemplate/elements/tr-fixed-cust_main.html b/httemplate/elements/tr-fixed-cust_main.html
new file mode 100644 (file)
index 0000000..00bcb66
--- /dev/null
@@ -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;
+
+</%init>