X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fview%2Fcust_main.cgi;h=e8ea9943e82eb65f2d8bbd6164c56d9bb74fa2fc;hp=229362e6cb63c5154c84b9507349598e7b61dbde;hb=55263a2dfeb16ea313c5aed37ed30686c946a299;hpb=5a5242465520ef7a64a715496c31a3c17c95cc57 diff --git a/httemplate/view/cust_main.cgi b/httemplate/view/cust_main.cgi index 229362e6c..e8ea9943e 100755 --- a/httemplate/view/cust_main.cgi +++ b/httemplate/view/cust_main.cgi @@ -3,7 +3,6 @@ my $conf = new FS::Conf; -#false laziness with view/cust_pkg.cgi, but i'm trying to make that go away so my %uiview = (); my %uiadd = (); foreach my $part_svc ( qsearch('part_svc',{}) ) { @@ -20,7 +19,6 @@ print header("Customer View", menubar( @@ -325,7 +323,7 @@ print '
'; if ( $conf->config('payby-default') ne 'HIDE' ) { - print '
'. + print qq!
!. qq!!. qq!Description:!. @@ -367,8 +365,7 @@ function svc_areyousure(href) { <% -print qq!
Packages !, -# qq!
Click on package number to view/edit package.!, +print qq!Packages !, qq!( Order and cancel packages (preserves services) )!, ; @@ -382,7 +379,7 @@ if ( @$packages ) { %> - + @@ -402,9 +399,9 @@ foreach my $pkg (sort pkgsort_pkgnum_cancel @$packages) { %> - \n! if ($cnt > 0); - print qq! \n\n!; + print qq! \n\n!; } } } @@ -573,9 +570,12 @@ function cust_credit_areyousure(href) { <% if ( $conf->config('payby-default') ne 'HIDE' ) { %> -

Payment History - (Post payment - | Post credit) +

Payment History
+ Post cash/check payment + | Process credit card payment + | Process electronic check (ACH) payment +
Post credit +
<% #get payment history @@ -713,10 +713,10 @@ function cust_credit_areyousure(href) { } } if ( $cust_credit->credited > 0 ) { - $desc .= ' - $'. - $cust_credit->unapplied. ' unapplied'. + $desc .= '  $'. + $cust_credit->credited. ' unapplied'. qq! (apply'. + $cust_credit->crednum. '">apply)'. '
'; } } @@ -807,6 +807,7 @@ function cust_credit_areyousure(href) { $balance += $item->{'refund'} if exists $item->{'refund'}; $balance = sprintf("%.2f", $balance); $balance =~ s/^\-0\.00$/0.00/; #yay ieee fp + ( my $showbalance = '$'. $balance ) =~ s/^\$\-/- \$/; %> @@ -822,11 +823,11 @@ function cust_credit_areyousure(href) { - - - - - + + + + + <% } %> @@ -946,13 +947,21 @@ sub svc_label_link { } sub svc_provision_link { - my ($pkg, $svcpart) = (shift,shift) or return ''; + my ($pkg, $svcpart, $conf) = @_; ( my $svc_nbsp = $svcpart->{svc} ) =~ s/\s+/ /g; - return qq!! . - "Provision $svc_nbsp (". - ($svcpart->{quantity} - $svcpart->{count}). - ')'; + my $pkgnum_svcpart = "pkgnum$pkg->{pkgnum}-svcpart$svcpart->{svcpart}"; + my $num_left = $svcpart->{quantity} - $svcpart->{count}; + + my $link = qq!!. + "Provision $svc_nbsp ($num_left)"; + if ( $conf->exists('legacy_link') ) { + $link .= '
'. + qq!!. + "Link to legacy $svc_nbsp ($num_left)"; + } + $link; } sub svc_unprovision_link { @@ -983,11 +992,6 @@ sub pkg_datestr { $strip; } -sub pkg_details_link { - my $pkg = shift or return ''; - return qq!Details!; -} - sub pkg_change_link { my $pkg = shift or return ''; return qq!Change package!; @@ -1005,7 +1009,8 @@ sub pkg_unsuspend_link { sub pkg_cancel_link { my $pkg = shift or return ''; - return qq!Cancel!; + qq!Cancel now | !. + qq!Cancel later!; } sub pkg_dates_link {
PackagePackage Status Services
CLASS="pkgnum"><%=$pkg->{pkgnum}%> > - <%=$pkg->{pkg}%> - <%=$pkg->{comment}%> ( <%=pkg_details_link($pkg)%> )
+ <%=$pkg->{pkgnum}%>: + <%=$pkg->{pkg}%> - <%=$pkg->{comment}%>
<% unless ($pkg->{cancel}) { %> ( <%=pkg_change_link($pkg)%> ) ( <%=pkg_dates_link($pkg)%> | <%=pkg_customize_link($pkg,$custnum)%> ) @@ -538,7 +535,7 @@ foreach my $pkg (sort pkgsort_pkgnum_cancel @$packages) { } if ($svcpart->{count} < $svcpart->{quantity}) { print qq!
!.svc_provision_link($pkg,$svcpart).qq!
!.svc_provision_link($pkg, $svcpart, $conf).qq!
<%= $item->{'desc'} %><%= $charge %><%= $payment %><%= $credit %><%= $refund %>$<%= $balance %><%= $charge %><%= $payment %><%= $credit %><%= $refund %><%= $showbalance %>