}
-=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.
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).
% }
% 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>
% }
% " ( 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>"
%
%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">!.
%
<% 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 %>">
%
<% 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>
% 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 {
% 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 {