freeside/httemplate/view/cust_main packages.html,1.1,1.2
ivan
ivan at pouncequick.420.am
Wed Dec 29 04:00:14 PST 2004
Update of /home/cvs/cvsroot/freeside/httemplate/view/cust_main
In directory pouncequick:/tmp/cvs-serv14192/httemplate/view/cust_main
Modified Files:
packages.html
Log Message:
historical (immutable) invoice details about services and other history infrastructure
Index: packages.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/view/cust_main/packages.html,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- packages.html 11 Dec 2004 07:51:00 -0000 1.1
+++ packages.html 29 Dec 2004 12:00:07 -0000 1.2
@@ -5,8 +5,38 @@
my $packages = get_packages($cust_main, $conf);
%>
-<A NAME="cust_pkg">Packages</A>
-( <A HREF="<%= $p %>edit/cust_pkg.cgi?<%= $cust_main->custnum %>">Bulk order and cancel packages</A> (preserves services) )
+<A NAME="cust_pkg"><FONT SIZE="+2">Packages</FONT></A>
+
+<%= include('order_pkg.html', $cust_main ) %>
+
+<% if ( $conf->config('payby-default') ne 'HIDE' ) { %>
+ <%= include('quick-charge.html', $cust_main ) %>
+<% } %>
+
+<A HREF="<%= $p %>edit/cust_pkg.cgi?<%= $cust_main->custnum %>">Bulk order and cancel packages</A> (preserves services)
+<BR><BR>
+
+<% if ( @$packages ) { %>
+Current packages
+<% } %>
+
+<% if ( $cust_main->num_cancelled_pkgs ) {
+ if ( $cgi->param('showcancelledpackages') eq '0' #see if it was set by me
+ || ( $conf->exists('hidecancelledpackages')
+ && ! $cgi->param('showcancelledpackages')
+ )
+ )
+ {
+ $cgi->param('showcancelledpackages', 1);
+%>
+ ( <a href="<%= $cgi->self_url %>">show
+<% } else {
+ $cgi->param('showcancelledpackages', 0);
+%>
+ ( <a href="<%= $cgi->self_url %>">hide
+<% } %>
+ cancelled packages</a> )
+<% } %>
<% if ( @$packages ) { %>
@@ -159,12 +189,14 @@
}
}
}
-print '</TABLE>';
-}
-
#end display packages
%>
+</TABLE>
+<% } else { %>
+<BR>
+<% } %>
+
<%
#subroutines
@@ -173,12 +205,18 @@
my $conf = shift;
my @packages = ();
+ my $method;
+ if ( $cgi->param('showcancelledpackages') eq '0' #see if it was set by me
+ || ( $conf->exists('hidecancelledpackages')
+ && ! $cgi->param('showcancelledpackages') )
+ )
+ {
+ $method = 'ncancelled_pkgs';
+ } else {
+ $method = 'all_pkgs';
+ }
- foreach my $cust_pkg (
- $conf->exists('hidecancelledpackages')
- ? $cust_main->ncancelled_pkgs
- : $cust_main->all_pkgs
- ) {
+ foreach my $cust_pkg ( $cust_main->$method() ) {
my $part_pkg = $cust_pkg->part_pkg;
More information about the freeside-commits
mailing list