diff options
author | jeff <jeff> | 2007-01-17 23:27:18 +0000 |
---|---|---|
committer | jeff <jeff> | 2007-01-17 23:27:18 +0000 |
commit | be10e7a1421c13eec4b1bb3676eaf5c84344e601 (patch) | |
tree | 49c042b08d310791618b97d35d5102018f822650 | |
parent | 82caef6fbd6148a5a6a1d1149a13e23515551148 (diff) |
link to customer from manual payment screen (ticket 1414)
-rw-r--r-- | FS/FS/CGI.pm | 10 | ||||
-rwxr-xr-x | httemplate/edit/svc_acct.cgi | 3 | ||||
-rwxr-xr-x | httemplate/misc/change_pkg.cgi | 8 | ||||
-rw-r--r-- | httemplate/misc/payment.cgi | 2 | ||||
-rw-r--r-- | httemplate/misc/process/payment.cgi | 8 | ||||
-rw-r--r-- | httemplate/view/elements/svc_Common.html | 7 | ||||
-rwxr-xr-x | httemplate/view/svc_acct.cgi | 8 |
7 files changed, 22 insertions, 24 deletions
diff --git a/FS/FS/CGI.pm b/FS/FS/CGI.pm index 8b401da36..88548cdec 100644 --- a/FS/FS/CGI.pm +++ b/FS/FS/CGI.pm @@ -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). diff --git a/httemplate/edit/svc_acct.cgi b/httemplate/edit/svc_acct.cgi index f42c14618..ebaa4b2ba 100755 --- a/httemplate/edit/svc_acct.cgi +++ b/httemplate/edit/svc_acct.cgi @@ -134,7 +134,8 @@ % } % 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> % } diff --git a/httemplate/misc/change_pkg.cgi b/httemplate/misc/change_pkg.cgi index 17dc8b859..7276f3256 100755 --- a/httemplate/misc/change_pkg.cgi +++ b/httemplate/misc/change_pkg.cgi @@ -27,10 +27,7 @@ % " ( 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">!. diff --git a/httemplate/misc/payment.cgi b/httemplate/misc/payment.cgi index 73a9c6297..728eba7b9 100644 --- a/httemplate/misc/payment.cgi +++ b/httemplate/misc/payment.cgi @@ -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 %>"> diff --git a/httemplate/misc/process/payment.cgi b/httemplate/misc/process/payment.cgi index c5638c585..6089d27c0 100644 --- a/httemplate/misc/process/payment.cgi +++ b/httemplate/misc/process/payment.cgi @@ -138,14 +138,10 @@ % <% 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> diff --git a/httemplate/view/elements/svc_Common.html b/httemplate/view/elements/svc_Common.html index 7b8df3a74..92eef2dad 100644 --- a/httemplate/view/elements/svc_Common.html +++ b/httemplate/view/elements/svc_Common.html @@ -54,11 +54,10 @@ % 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 { diff --git a/httemplate/view/svc_acct.cgi b/httemplate/view/svc_acct.cgi index 7fbefa14b..2bacbcaff 100755 --- a/httemplate/view/svc_acct.cgi +++ b/httemplate/view/svc_acct.cgi @@ -37,12 +37,10 @@ % 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 { |