add cust_main.agent_custid (at least to schema and customer view, no manual editing...
[freeside.git] / httemplate / view / cust_main / misc.html
index 69e1205..742b359 100644 (file)
@@ -1,5 +1,6 @@
 <%
   my( $cust_main ) = @_;
+  my $conf = new FS::Conf;
 %>
 
 <%= ntable("#cccccc") %><TR><TD><%= &ntable("#cccccc",2) %>
     $agent = $agents[0];
   }
 
-  my @referrals = qsearch( 'part_referral', {} );
-  unless ( scalar(@referrals) == 1 ) {
+  if ( $cust_main->agent_custid ) {
+%>
+
+<TR>
+  <TD ALIGN="right">Agent customer ref#</TD>
+  <TD BGCOLOR="#ffffff"><%= $cust_main->agent_custid %></TD>
+</TR>
+
+<%
+  }
+
+  unless ( FS::part_referral->num_part_referral == 1 ) {
     my $referral = qsearchs('part_referral', {
       'refnum' => $cust_main->refnum
     } );