From e1eb06c05b654a4533bab0e034e87a8de99015cc Mon Sep 17 00:00:00 2001 From: cvs2git Date: Mon, 12 Oct 1998 07:03:12 +0000 Subject: This commit was manufactured by cvs2svn to create tag 'freeside_current'. --- htdocs/view/cust_pkg.cgi | 181 ----------------------------------------------- 1 file changed, 181 deletions(-) delete mode 100755 htdocs/view/cust_pkg.cgi (limited to 'htdocs/view/cust_pkg.cgi') diff --git a/htdocs/view/cust_pkg.cgi b/htdocs/view/cust_pkg.cgi deleted file mode 100755 index 04e38326a..000000000 --- a/htdocs/view/cust_pkg.cgi +++ /dev/null @@ -1,181 +0,0 @@ -#!/usr/bin/perl -Tw -# -# cust_pkg.cgi: View a package -# -# Usage: cust_pkg.cgi pkgnum -# http://server.name/path/cust_pkg.cgi?pkgnum -# -# Note: Should be run setuid freeside as user nobody. -# -# ivan@voicenet.com 96-dec-15 -# -# services section needs to be cleaned up, needs to display extraneous -# entries in cust_pkg! -# ivan@voicenet.com 96-dec-31 -# -# added navigation bar -# ivan@voicenet.com 97-jan-30 -# -# changed and fixed up suspension and cancel stuff, now you can't add -# services to a cancelled package -# ivan@voicenet.com 97-feb-27 -# -# rewrote for new API, still needs to be cleaned up! -# ivan@voicenet.com 97-jul-29 -# -# no FS::Search ivan@sisd.com 98-mar-7 - -use strict; -use Date::Format; -use CGI::Base qw(:DEFAULT :CGI); # CGI module -use FS::UID qw(cgisuidsetup); -use FS::Record qw(qsearch qsearchs); - -my($cgi) = new CGI::Base; -$cgi->get; -&cgisuidsetup($cgi); - -my(%uiview,%uiadd); -my($part_svc); -foreach $part_svc ( qsearch('part_svc',{}) ) { - $uiview{$part_svc->svcpart}="../view/". $part_svc->svcdb . ".cgi"; - $uiadd{$part_svc->svcpart}="../edit/". $part_svc->svcdb . ".cgi"; -} - -SendHeaders(); # one guess. -print < - - Package View - - -
-

Package View

-
- -END - -#untaint pkgnum -$QUERY_STRING =~ /^(\d+)$/; -my($pkgnum)=$1; - -#get package record -my($cust_pkg)=qsearchs('cust_pkg',{'pkgnum'=>$pkgnum}); -die "No package!" unless $cust_pkg; -my($part_pkg)=qsearchs('part_pkg',{'pkgpart'=>$cust_pkg->getfield('pkgpart')}); - -#nav bar -my($custnum)=$cust_pkg->getfield('custnum'); -print qq!
View this customer!, - qq! (#$custnum) | Main menu

!; - -#print info -my($susp,$cancel,$expire)=( - $cust_pkg->getfield('susp'), - $cust_pkg->getfield('cancel'), - $cust_pkg->getfield('expire'), -); -print "
Package #$pkgnum"; -print qq!
Package Information!; -print qq! | Service Information! unless $cancel; -print qq!

\n!; - -my($pkg,$comment)=($part_pkg->getfield('pkg'),$part_pkg->getfield('comment')); -print qq!
Package Information!, - qq!!; -print qq!
Edit this information
!; -print "

Package: $pkg - $comment"; - -my($setup,$bill)=($cust_pkg->getfield('setup'),$cust_pkg->getfield('bill')); -print "
Setup: ", $setup ? time2str("%D",$setup) : "(Not setup)" ,""; -print "
Next bill: ", $bill ? time2str("%D",$bill) : "" ,""; - -if ($susp) { - print "
Suspended: ", time2str("%D",$susp), ""; - print qq! Unsuspend! unless $cancel; -} else { - print qq!
Suspend! unless $cancel; -} - -if ($expire) { - print "
Expire: ", time2str("%D",$expire), ""; -} - print < - -Expire (date): - -END - -if ($cancel) { - print "
Cancelled: ", time2str("%D",$cancel), ""; -} else { - print qq!
Cancel now!; -} - -#otaker -my($otaker)=$cust_pkg->getfield('otaker'); -print "

Order taken by $otaker"; - -unless ($cancel) { - - #services - print <

Service Information -
Click on service to view/edit/add service.

-
Do NOT pick the "Link to existing" option unless you are auditing!!!
-
- -END - - #list of services this pkgpart includes - my($pkg_svc,%pkg_svc); - foreach $pkg_svc ( qsearch('pkg_svc',{'pkgpart'=> $cust_pkg->pkgpart }) ) { - $pkg_svc{$pkg_svc->svcpart} = $pkg_svc->quantity if $pkg_svc->quantity; - } - - #list of records from cust_svc - my($svcpart); - foreach $svcpart (sort {$a <=> $b} keys %pkg_svc) { - - my($svc)=qsearchs('part_svc',{'svcpart'=>$svcpart})->getfield('svc'); - - my(@cust_svc)=qsearch('cust_svc',{'pkgnum'=>$pkgnum, - 'svcpart'=>$svcpart, - }); - - my($enum); - for $enum ( 1 .. $pkg_svc{$svcpart} ) { - - my($cust_svc); - if ( $cust_svc=shift @cust_svc ) { - my($svcnum)=$cust_svc->svcnum; - print < -END - } else { - print < - - -END - } - - } - warn "WARNING: Leftover services pkgnum $pkgnum!" if @cust_svc;; - } - - print "
Service(View) $svc
- (Add) $svc - or - (Link to existing) $svc -
"; - -} - -#formatting -print < - -END - -- cgit v1.2.1