This commit was generated by cvs2svn to compensate for changes in r8593,
[freeside.git] / httemplate / edit / cust_main / top_misc.html
1 <% &ntable("#cccccc") %>
2
3 %# agent
4 <% include('/elements/tr-select-agent.html', 
5               'curr_value'    => $cust_main->agentnum,
6               'label'         => "<B>${r}Agent</B>",
7               'empty_label'   => 'Select agent',
8               'disable_empty' => ( $cust_main->agentnum ? 1 : 0 ),
9            )
10 %>
11
12 %# agent_custid
13 % if ( $conf->exists('cust_main-edit_agent_custid') ) {
14
15     <TR>
16       <TD ALIGN="right">Customer identifier</TD>
17       <TD><INPUT TYPE="text" NAME="agent_custid" VALUE="<% $cust_main->agent_custid %>"></TD>
18     </TR>
19
20 % } else {
21
22     <INPUT TYPE="hidden" NAME="agent_custid" VALUE="<% $cust_main->agent_custid %>">
23
24 % }
25
26 %# class
27 <% include('/elements/tr-select-cust_class.html',
28              'curr_value'  => $cust_main->classnum,
29              'label'       => "Class",
30              #'empty_label' => '(none)',
31              #'disable_empty' => 
32           )
33 %>
34
35 %# referral (advertising source)
36 %my $refnum = $cust_main->refnum || $conf->config('referraldefault') || 0;
37 %if ( $custnum && ! $conf->exists('editreferrals') ) {
38
39   <INPUT TYPE="hidden" NAME="refnum" VALUE="<% $refnum %>">
40
41 % } else { 
42
43    <% include('/elements/tr-select-part_referral.html',
44                 'curr_value' => $refnum
45              )
46    %>
47 % } 
48
49
50 %# referring customer
51 %my $referring_cust_main = '';
52 %if ( $cust_main->referral_custnum
53 %     and $referring_cust_main =
54 %           qsearchs('cust_main', { custnum => $cust_main->referral_custnum } )
55 %) {
56
57   <TR>
58     <TD ALIGN="right">Referring customer</TD>
59     <TD>
60       <A HREF="<% popurl(1) %>/cust_main.cgi?<% $cust_main->referral_custnum %>"><% $cust_main->referral_custnum %>: <% $referring_cust_main->name %></A>
61     </TD>
62   </TR>
63   <INPUT TYPE="hidden" NAME="referral_custnum" VALUE="<% $cust_main->referral_custnum %>">
64 % } elsif ( ! $conf->exists('disable_customer_referrals') ) { 
65
66
67   <TR>
68     <TD ALIGN="right">Referring customer</TD>
69     <TD>
70       <!-- <INPUT TYPE="text" NAME="referral_custnum" VALUE=""> -->
71       <% include('/elements/search-cust_main.html',
72                     'field_name' => 'referral_custnum',
73                  )
74       %>
75     </TD>
76   </TR>
77 % } else { 
78
79
80   <INPUT TYPE="hidden" NAME="referral_custnum" VALUE="">
81 % } 
82
83 %# signup date
84 % if ( $conf->exists('cust_main-edit_signupdate') ) {
85     <% include('/elements/tr-input-date-field.html', {
86                   'name'        => 'signupdate',
87                   'value'       => $cust_main->signupdate,
88                   'label'       => 'Signup date',
89                   'format'      => $conf->config('date_format') || "%m/%d/%Y",
90               })
91     %>
92 % }
93
94 </TABLE>
95
96 <%init>
97
98 my( $cust_main, %opt ) = @_;
99
100 my $custnum = $opt{'custnum'};
101
102 my $conf = new FS::Conf;
103
104 my $r = qq!<font color="#ff0000">*</font>&nbsp;!;
105
106 </%init>