X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fview%2Fcust_pkg.cgi;h=d8a0041eee80328f19b6d38b72688d207752e3d5;hb=c6d8896d882b684b1f3c7a2538a90358b27aaf89;hp=b354318d41463faf2f62c882edd631895ace1deb;hpb=3d671921441ba8422650b54435a1959ad1d4c71d;p=freeside.git diff --git a/httemplate/view/cust_pkg.cgi b/httemplate/view/cust_pkg.cgi index b354318d4..d8a0041ee 100755 --- a/httemplate/view/cust_pkg.cgi +++ b/httemplate/view/cust_pkg.cgi @@ -1,153 +1,11 @@ -<% -# - -use strict; -use vars qw ( $cgi %uiview %uiadd $part_svc $query $pkgnum $cust_pkg $part_pkg - $custnum $susp $cancel $expire $pkg $comment $setup $bill - $otaker ); -use Date::Format; -use CGI; -use CGI::Carp qw(fatalsToBrowser); -use FS::UID qw(cgisuidsetup); -use FS::CGI qw(popurl header menubar ntable table); -use FS::Record qw(qsearch qsearchs); -use FS::part_svc; -use FS::cust_pkg; -use FS::part_pkg; -use FS::pkg_svc; -use FS::cust_svc; - -$cgi = new CGI; -cgisuidsetup($cgi); - -foreach $part_svc ( qsearch('part_svc',{}) ) { - $uiview{$part_svc->svcpart} = popurl(2). "view/". $part_svc->svcdb . ".cgi"; - $uiadd{$part_svc->svcpart}= popurl(2). "edit/". $part_svc->svcdb . ".cgi"; -} - -($query) = $cgi->keywords; -$query =~ /^(\d+)$/; -$pkgnum = $1; - -#get package record -$cust_pkg = qsearchs('cust_pkg',{'pkgnum'=>$pkgnum}); -die "No package!" unless $cust_pkg; -$part_pkg = qsearchs('part_pkg',{'pkgpart'=>$cust_pkg->getfield('pkgpart')}); - -$custnum = $cust_pkg->getfield('custnum'); -print $cgi->header( '-expires' => 'now' ), header('Package View', menubar( - "View this customer (#$custnum)" => popurl(2). "view/cust_main.cgi?$custnum", - 'Main Menu' => popurl(2) -)); - -#print info -($susp,$cancel,$expire)=( - $cust_pkg->getfield('susp'), - $cust_pkg->getfield('cancel'), - $cust_pkg->getfield('expire'), -); -($pkg,$comment)=($part_pkg->getfield('pkg'),$part_pkg->getfield('comment')); -($setup,$bill)=($cust_pkg->getfield('setup'),$cust_pkg->getfield('bill')); -$otaker = $cust_pkg->getfield('otaker'); - -print "Package information"; -print ' (unsuspend)' if ( $susp && ! $cancel ); -print ' (suspend)' unless ( $susp || $cancel ); -print ' (cancel)' unless $cancel; - -print &ntable("#cccccc"), '