X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fsearch%2Fcust_pkg.cgi;h=12179eacaea28179f8161afa90159bd791979765;hp=78a5bb3bb1b9daf97c1da5e5b3178e81df64e1db;hb=4bf86e5f7f44e77159564804d09e0938a8edc905;hpb=61e25db54f2da624a79ecedb6bf3d678c7fdefc5
diff --git a/httemplate/search/cust_pkg.cgi b/httemplate/search/cust_pkg.cgi
index 78a5bb3bb..12179eaca 100755
--- a/httemplate/search/cust_pkg.cgi
+++ b/httemplate/search/cust_pkg.cgi
@@ -93,7 +93,7 @@ if ( $cgi->param('magic') && $cgi->param('magic') eq 'bill' ) {
AND cust_svc.svcpart = pkg_svc.svcpart
AND cust_pkg.pkgpart = pkg_svc.pkgpart
GROUP BY cust_svc.pkgnum,cust_svc.svcpart";
- $sth = dbh->prepare($query) or die dbh->errstr. " preparing $query";
+ my $sth = dbh->prepare($query) or die dbh->errstr. " preparing $query";
$sth->execute or die "Error executing \"$query\": ". $sth->errstr;
@@ -194,6 +194,12 @@ if ( scalar(@cust_pkg) == 1 ) {
Package |
Setup |
+END
+
+ print 'Last bill | '
+ if defined dbdef->table('cust_pkg')->column('last_bill');
+
+ print <Next
bill
Susp. |
Expire |
@@ -203,17 +209,10 @@ if ( scalar(@cust_pkg) == 1 ) {
company |
END
-if ( defined dbdef->table('cust_main')->column('ship_last') ) {
- print <(service) name
- company |
-END
-}
+ print '(service) name | company | '
+ if defined dbdef->table('cust_main')->column('ship_last');
-print <Services
-
-END
+ print 'Services | ';
my $n1 = '';
my(%saw,$cust_pkg);
@@ -244,6 +243,12 @@ END
$cust_main ? $cust_main->first : '',
$cust_main ? $cust_main->company : '',
);
+
+ my $last_bill = $cust_pkg->getfield('last_bill')
+ ? time2str("%D", $cust_pkg->getfield('last_bill') )
+ : ''
+ if defined dbdef->table('cust_pkg')->column('last_bill');
+
my($ship_last, $ship_first, $ship_company);
if ( defined dbdef->table('cust_main')->column('ship_last') ) {
($ship_last, $ship_first, $ship_company) = (
@@ -270,6 +275,12 @@ END
print $n1, <$pkgnum - $pkg
$setup |
+END
+
+ print "$last_bill | "
+ if defined dbdef->table('cust_pkg')->column('last_bill');
+
+ print <$bill
$susp |
$expire |