small UI fix for unapplied partial credits
[freeside.git] / httemplate / view / cust_main.cgi
index 6057017..a0fc2d6 100755 (executable)
@@ -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',{}) ) {
@@ -401,7 +400,7 @@ foreach my $pkg (sort pkgsort_pkgnum_cancel @$packages) {
 <!--pkgnum: <%=$pkg->{pkgnum}%>-->
 <TR>
   <TD ROWSPAN=<%=$rowspan%>>
-    <%=$pkg->{pkgnum}%>:
+    <A NAME="cust_pkg<%=$pkg->{pkgnum}%>"><%=$pkg->{pkgnum}%></A>:
     <%=$pkg->{pkg}%> - <%=$pkg->{comment}%><BR>
 <% unless ($pkg->{cancel}) { %>
     (&nbsp;<%=pkg_change_link($pkg)%>&nbsp;)
@@ -571,9 +570,12 @@ function cust_credit_areyousure(href) {
 
 <% if ( $conf->config('payby-default') ne 'HIDE' ) { %>
   
-  <BR><BR><A NAME="history">Payment History</A>
-  (<A HREF="<%= $p %>edit/cust_pay.cgi?custnum=<%= $custnum %>">Post payment</A>
-  | <A HREF="<%= $p %>edit/cust_credit.cgi?<%= $custnum %>">Post credit</A>)
+  <BR><BR><A NAME="history"><FONT SIZE="+2">Payment History</FONT></A><BR>
+  <A HREF="<%= $p %>edit/cust_pay.cgi?custnum=<%= $custnum %>">Post cash/check payment</A>
+  | <A HREF="<%= $p %>misc/payment.cgi?payby=CARD;custnum=<%= $custnum %>">Process credit card payment</A>
+  | <A HREF="<%= $p %>misc/payment.cgi?payby=CHEK;custnum=<%= $custnum %>">Process electronic check (ACH) payment</A>
+  <BR><A HREF="<%= $p %>edit/cust_credit.cgi?<%= $custnum %>">Post credit</A>
+  <BR>
 
   <%
   #get payment history
@@ -712,9 +714,9 @@ function cust_credit_areyousure(href) {
       }
       if ( $cust_credit->credited > 0 ) {
         $desc .= ' - <B><FONT COLOR="#FF0000">$'.
-                 $cust_credit->unapplied. ' unapplied</FONT></B>'.
+                 $cust_credit->credited. ' unapplied</FONT></B>'.
                  qq! (<A HREF="${p}edit/cust_credit_bill.cgi?!.
-                 $cust_credit->crednum. '">apply</A>'.
+                 $cust_credit->crednum. '">apply</A>)'.
                  '<BR>';
       }
     }
@@ -990,11 +992,6 @@ sub pkg_datestr {
   $strip;
 }
 
-#sub pkg_details_link {
-#  my $pkg = shift or return '';
-#  return qq!<a href="${p}view/cust_pkg.cgi?$pkg->{pkgnum}">Details</a>!;
-#}
-
 sub pkg_change_link {
   my $pkg = shift or return '';
   return qq!<a href="${p}misc/change_pkg.cgi?$pkg->{pkgnum}">Change&nbsp;package</a>!;