X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fview%2Fcust_main.cgi;h=9b7b5d029951f4df5ad8dd332be0bc6b9346c5d4;hp=6fe759bd91869f8d488e94d3296348450edc8d33;hb=f3b8b72d2a07683b2deb2774f29407e25e725b5a;hpb=4063ea45f3ab0a9cb2582834e55ac3afc71425f9
diff --git a/httemplate/view/cust_main.cgi b/httemplate/view/cust_main.cgi
index 6fe759bd9..9b7b5d029 100755
--- a/httemplate/view/cust_main.cgi
+++ b/httemplate/view/cust_main.cgi
@@ -342,17 +342,6 @@ print qq!
Packages !,
#display packages
-#formatting
-print qq!!, &table(), "\n",
- qq!
Package | !,
- qq!Dates | Services |
\n!,
- qq!Setup | !,
- qq!Next bill!,
- qq! | Susp. | Expire!,
- qq! | !,
- qq!Cancel | !,
- qq!
\n!;
-
#get package info
my @packages;
if ( $conf->exists('hidecancelledpackages') ) {
@@ -361,6 +350,23 @@ if ( $conf->exists('hidecancelledpackages') ) {
@packages = sort { $a->pkgnum <=> $b->pkgnum } ($cust_main->all_pkgs);
}
+if ( @packages ) {
+ #formatting
+ print &table(), "\n",
+ qq!Package | !,
+ qq!Dates | Services |
\n!,
+ qq!Setup | !;
+
+ print qq!Last bill | !
+ if $packages[0]->dbdef_table->column('last_bill');
+
+ print qq!Next bill | !,
+ qq!Susp. | !,
+ qq!Expire! | !,
+ qq!Cancel | !,
+ qq!
\n!;
+}
+
my $n1 = '';
foreach my $package (@packages) {
my $pkgnum = $package->pkgnum;
@@ -424,7 +430,11 @@ foreach my $package (@packages) {
}
print '';
- for ( qw( setup bill susp expire cancel ) ) {
+ my @fields = qw( setup );
+ push @fields, qw( last_bill ) if $package->dbdef_table->column('last_bill');
+ push @fields, qw( bill susp expire cancel);
+
+ for ( @fields ) {
print "", ( $package->getfield($_)
? time2str("%D %l:%M:%S%P %z",
$package->getfield($_) )
@@ -471,6 +481,7 @@ print " |
";
#formatting
print "";
+
print <
function cust_pay_areyousure(href) {