link to customer from manual payment screen (ticket 1414)
authorjeff <jeff>
Wed, 17 Jan 2007 23:27:18 +0000 (23:27 +0000)
committerjeff <jeff>
Wed, 17 Jan 2007 23:27:18 +0000 (23:27 +0000)
FS/FS/CGI.pm
httemplate/edit/svc_acct.cgi
httemplate/misc/change_pkg.cgi
httemplate/misc/payment.cgi
httemplate/misc/process/payment.cgi
httemplate/view/elements/svc_Common.html
httemplate/view/svc_acct.cgi

index 8b401da..88548cd 100644 (file)
@@ -303,7 +303,7 @@ sub ntable {
 
 }
 
-=item small_custview CUSTNUM || CUST_MAIN_OBJECT, COUNTRYDEFAULT, NOBALANCE_FLAG
+=item small_custview CUSTNUM || CUST_MAIN_OBJECT, COUNTRYDEFAULT, NOBALANCE_FLAG, URL
 
 Sheesh. I should just switch to Mason.
 
@@ -316,12 +316,18 @@ sub small_custview {
   my $arg = shift;
   my $countrydefault = shift || 'US';
   my $nobalance = shift;
+  my $url = shift;
 
   my $cust_main = ref($arg) ? $arg
                   : qsearchs('cust_main', { 'custnum' => $arg } )
     or die "unknown custnum $arg";
 
-  my $html = 'Customer #<B>'. $cust_main->custnum. '</B></A>'.
+  my $html;
+  
+  $html = qq!View <A HREF="$url?! . $cust_main->custnum . '">'
+    if $url;
+
+  $html .= 'Customer #<B>'. $cust_main->custnum. '</B></A>'.
     ' - <B><FONT COLOR="'. $cust_main->statuscolor. '">'.
     ucfirst($cust_main->status). '</FONT></B>'.
     ntable('#e8e8e8'). '<TR><TD VALIGN="top">'. ntable("#cccccc",2).
index f42c146..ebaa4b2 100755 (executable)
 % } 
 % if ( $cust_main ) { 
 
-  <% include( '/elements/small_custview.html', $cust_main, '', 1 ) %>
+  <% include( '/elements/small_custview.html', $cust_main, '', 1,
+              popurl(2) . "view/cust_main.cgi") %>
   <BR>
 % } 
 
index 17dc8b8..7276f32 100755 (executable)
 %         " ( pkgnum ". cust_pkg->pkgnum. ")";
 %my $agent = $cust_main->agent;
 %
-%print header("Change Package",  menubar(
-%  "View this customer (#$custnum)" => "${p}view/cust_main.cgi?$custnum",
-%  'Main Menu' => $p,
-%));
+%print header("Change Package");
 %
 %print qq!<FONT SIZE="+1" COLOR="#ff0000">Error: !, $cgi->param('error'),
 %      "</FONT><BR><BR>"
@@ -38,7 +35,8 @@
 %
 %my $part_pkg = $cust_pkg->part_pkg;
 %
-%print small_custview( $cust_main, $conf->config('countrydefault') ).
+%print small_custview( $cust_main, $conf->config('countrydefault') || '' , '', 
+%                      "${p}view/cust_main.cgi").
 %      qq!<FORM ACTION="${p}edit/process/cust_pkg.cgi" METHOD=POST>!.
 %      qq!<INPUT TYPE="hidden" NAME="custnum" VALUE="$custnum">!.
 %      qq!<INPUT TYPE="hidden" NAME="remove_pkg" VALUE="$pkgnum">!.
index 73a9c62..728eba7 100644 (file)
@@ -31,7 +31,7 @@
 %
 
 <% include( '/elements/header.html', "Process $type{$payby} payment" ) %>
-<% include( '/elements/small_custview.html', $cust_main ) %>
+<% include( '/elements/small_custview.html', $cust_main, '', '', popurl(2) . "view/cust_main.cgi" ) %>
 <FORM NAME="OneTrueForm" ACTION="process/payment.cgi" METHOD="POST" onSubmit="document.OneTrueForm.process.disabled=true">
 <INPUT TYPE="hidden" NAME="custnum" VALUE="<% $custnum %>">
 <INPUT TYPE="hidden" NAME="payby" VALUE="<% $payby %>">
index c5638c5..6089d27 100644 (file)
 %
 
 <% include( '/elements/header.html', ucfirst($type{$payby}). ' processing successful',
-             include('/elements/menubar.html',
-                       'Main menu' => popurl(3),
-                       "View this customer (#$custnum)" =>
-                         popurl(3). "view/cust_main.cgi?$custnum",
-                    ),
+             include('/elements/menubar.html'),
 
     )
 %>
-<% include( '/elements/small_custview.html', $cust_main ) %>
+<% include( '/elements/small_custview.html', $cust_main, '', '', popurl(3). "view/cust_main.cgi" ) %>
 </BODY>
 </HTML>
index 7b8df3a..92eef2d 100644 (file)
 % if ( $custnum ) { 
 
 
-  <% include("/elements/header.html","View $label: $value", menubar(
-    "View this customer (#$custnum)" => "${p}view/cust_main.cgi?$custnum",
-  )) %>
+  <% include("/elements/header.html","View $label: $value") %>
 
-  <% include( '/elements/small_custview.html', $custnum, '', 1 ) %>
+  <% include( '/elements/small_custview.html', $custnum, '', 1,
+     "${p}view/cust_main.cgi") %>
   <BR>
 % } else { 
 
index 7fbefa1..2bacbca 100755 (executable)
 % if ( $custnum ) { 
 
 
-  <% include("/elements/header.html","View $svc account", menubar(
-    "View this customer (#$custnum)" => "${p}view/cust_main.cgi?$custnum",
-    "Main menu" => $p,
-  )) %>
+  <% include("/elements/header.html","View $svc account") %>
 
-  <% include( '/elements/small_custview.html', $custnum, '', 1 ) %>
+  <% include( '/elements/small_custview.html', $custnum, '', 1,
+     "${p}view/cust_main.cgi") %>
   <BR>
 % } else {