X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=htdocs%2Fview%2Fcust_main.cgi;h=de9ff7f890a159a1215c8950996e9a0754ce6e51;hb=f56cc7785c80f2b97c14653486a19c9cc34146cf;hp=2119b3e0c70c53e158f4f59fcc5285f795f41dd7;hpb=963a290ad2d9a89b45b66ac9d9ccdd612a756f11;p=freeside.git diff --git a/htdocs/view/cust_main.cgi b/htdocs/view/cust_main.cgi index 2119b3e0c..de9ff7f89 100755 --- a/htdocs/view/cust_main.cgi +++ b/htdocs/view/cust_main.cgi @@ -1,12 +1,10 @@ #!/usr/bin/perl -Tw # -# $Id: cust_main.cgi,v 1.11 1999-01-25 12:26:04 ivan Exp $ +# $Id: cust_main.cgi,v 1.17 1999-04-15 16:44:36 ivan Exp $ # # Usage: cust_main.cgi custnum # http://server.name/path/cust_main.cgi?custnum # -# Note: Should be run setuid freeside as user nobody. -# # the payment history section could use some work, see below # # ivan@voicenet.com 96-nov-29 -> 96-dec-11 @@ -33,7 +31,25 @@ # lose background, FS::CGI ivan@sisd.com 98-sep-2 # # $Log: cust_main.cgi,v $ -# Revision 1.11 1999-01-25 12:26:04 ivan +# Revision 1.17 1999-04-15 16:44:36 ivan +# delete customers +# +# Revision 1.16 1999/04/09 04:22:34 ivan +# also table() +# +# Revision 1.15 1999/04/09 03:52:55 ivan +# explicit & for table/itable/ntable +# +# Revision 1.14 1999/04/08 04:04:37 ivan +# eliminate double // in links +# +# Revision 1.13 1999/02/28 00:04:00 ivan +# removed misleading comments +# +# Revision 1.12 1999/02/07 09:59:40 ivan +# more mod_perl fixes, and bugfixes Peter Wemm sent via email +# +# Revision 1.11 1999/01/25 12:26:04 ivan # yet more mod_perl stuff # # Revision 1.10 1999/01/19 05:14:19 ivan @@ -69,7 +85,7 @@ use strict; use vars qw ( $cgi $query $custnum $cust_main $hashref $agent $referral @packages $package @history @bills $bill @credits $credit - $balance $item @agents @referrals @invoicing_list $n1 ); + $balance $item @agents @referrals @invoicing_list $n1 $conf ); use CGI; use CGI::Carp qw(fatalsToBrowser); use Date::Format; @@ -89,6 +105,8 @@ use FS::cust_refund; $cgi = new CGI; &cgisuidsetup($cgi); +$conf = new FS::Conf; + print $cgi->header( '-expires' => 'now' ), header("Customer View", menubar( 'Main Menu' => popurl(2) )); @@ -101,11 +119,14 @@ $cust_main = qsearchs('cust_main',{'custnum'=>$custnum}); die "Customer not found!" unless $cust_main; $hashref = $cust_main->hashref; -print itable(), ''; +print &itable(), ''; print qq!Edit this customer!, - ntable("#c0c0c0"), "", ntable("#c0c0c0",2), + qq!edit/cust_main.cgi?$custnum">Edit this customer!; +print qq! | Delete this customer! + if $conf->exists('deletecustomers'); +print &ntable("#c0c0c0"), "", &ntable("#c0c0c0",2), 'Customer number', $custnum, '', ; @@ -133,8 +154,8 @@ print ''; print ''; -print "Contact information", ntable("#c0c0c0"), "", - ntable("#c0c0c0",2), +print "Contact information", &ntable("#c0c0c0"), "", + &ntable("#c0c0c0",2), 'Contact name
(last, first)', '', $cust_main->last, ', ', $cust_main->first, @@ -174,7 +195,7 @@ print ''; @invoicing_list = $cust_main->invoicing_list; print "Billing information (", qq!!, "Bill now)", - ntable("#c0c0c0"), "", ntable("#c0c0c0",2), + &ntable("#c0c0c0"), "", &ntable("#c0c0c0",2), 'Tax exempt', $cust_main->tax ? 'yes' : 'no', '', @@ -182,7 +203,7 @@ print "Billing information (", ( grep { $_ eq 'POST' } @invoicing_list ) ? 'yes' : 'no', '', 'Email invoices', - join(', ', grep { $_ ne 'POST' } @invoicing_list ), + join(', ', grep { $_ ne 'POST' } @invoicing_list ) || 'no', '', 'Billing type', ; @@ -219,13 +240,13 @@ print ""; print qq!

Packages !, # qq!
Click on package number to view/edit package.!, - qq!( Order and cancel packages )!, + qq!( Order and cancel packages )!, ; #display packages #formatting -print qq!!, table, "\n", +print qq!!, &table(), "\n", qq!Package!, qq!DatesServices\n!, qq!Setup!, @@ -239,7 +260,7 @@ print qq!!, table, "\n", @packages = $cust_main->all_pkgs; #@packages = $cust_main->ncancelled_pkgs; -$n1 = ''; +$n1 = ''; foreach $package (@packages) { my $pkgnum = $package->pkgnum; my $pkg = $package->part_pkg->pkg; @@ -258,7 +279,7 @@ foreach $package (@packages) { qq!!, #qq!$pkg - $comment!, qq!$pkg - $comment!, - qq! ( Edit | Customize pricing)!, + qq! ( Edit | Customize pricing )!, ; for ( qw( setup bill susp expire cancel ) ) { print "", ( $package->getfield($_) @@ -272,7 +293,7 @@ foreach $package (@packages) { foreach my $cust_svc ( @cust_svc ) { my($label, $value, $svcdb) = $cust_svc->label; my($svcnum) = $cust_svc->svcnum; - my($sview) = popurl(2). "/view"; + my($sview) = popurl(2). "view"; print $n2,qq!$label!, qq!$value!; $n2=""; @@ -342,7 +363,7 @@ foreach $credit (@credits) { } #formatting - print table(), < Date Description