%
my( $cust_main ) = @_;
my $conf = new FS::Conf;
my $packages = get_packages($cust_main, $conf);
%>
Packages
<%= include('order_pkg.html', $cust_main ) %>
<% if ( $conf->config('payby-default') ne 'HIDE' ) { %>
<%= include('quick-charge.html', $cust_main ) %>
<% } %>
Bulk order and cancel packages (preserves services)
<% 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);
%>
( show
<% } else {
$cgi->param('showcancelledpackages', 0);
%>
( hide
<% } %>
cancelled packages )
<% } %>
<% if ( @$packages ) { %>
Package | Status | Services | |
---|---|---|---|
>
<%=$pkg->{pkgnum}%>:
<%=$pkg->{pkg}%> - <%=$pkg->{comment}%> <% unless ($pkg->{cancel}) { %> ( <%=pkg_change_link($pkg)%> ) ( <%=pkg_dates_link($pkg)%> | <%=pkg_customize_link($pkg,$cust_main->custnum)%> ) <% } %> |
<%
#foreach (qw(setup last_bill next_bill susp expire cancel)) {
# print qq! ! . pkg_datestr($pkg,$_,$conf) . qq! | \n!; #} print "". &itable(''); sub myfreq { my $part_pkg = shift; my $freq = $part_pkg->freq_pretty; $freq =~ s/ / /g; $freq; } if ( $pkg->{cancel} ) { #status: cancelled print ' | |
Cancelled | '. ''. pkg_datestr($pkg,'cancel',$conf). ' | ||
Never billed | |||
Setup | ". pkg_datestr($pkg, 'setup',$conf). ' | ||
Last bill | ". pkg_datestr($pkg, 'last_bill',$conf). ' | ||
Suspended | ". pkg_datestr($pkg, 'susp',$conf). ' | ||
Suspended | '. ''. pkg_datestr($pkg,'susp',$conf). ' | ||
Never billed | |||
Setup | ". pkg_datestr($pkg, 'setup',$conf). ' | ||
Last bill | ". pkg_datestr($pkg, 'last_bill',$conf). ' | ||
Expires | ". pkg_datestr($pkg, 'expire',$conf). ' | ||
( '. pkg_unsuspend_link($pkg). ' | '. pkg_cancel_link($pkg). ' ) | |||
Not yet billed ('; unless ( $pkg->{freq} ) { print 'one-time charge) | |||
( '. pkg_cancel_link($pkg). ' ) | '; } else { print 'billed '. myfreq($pkg->{part_pkg}). ')|||
One-time charge | |||
Billed | '. pkg_datestr($pkg,'setup',$conf). ' | ||
Active'. ', billed '. myfreq($pkg->{part_pkg}). ' | |||
Setup | '. pkg_datestr($pkg, 'setup',$conf). ' | ||
Last bill | ". pkg_datestr($pkg, 'last_bill',$conf). ' | ||
Next bill | ". pkg_datestr($pkg, 'next_bill',$conf). ' | ||
Expires | ". pkg_datestr($pkg, 'expire',$conf). ' | ||
( '. pkg_suspend_link($pkg). ' | '. pkg_cancel_link($pkg). ' ) |