X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=htdocs%2Fview%2Fcust_main.cgi;h=7c96ddffa5fd04c905cfeda440c3a97b44bdecf9;hb=e6cf4af2b9d3ffefebe1a3e358f0674f566b56bc;hp=6f6c3354020a9649ae73c7214f50a2d6755d47de;hpb=e3843e0a3823b0d67dc891a0965f2dad4d0bdc10;p=freeside.git diff --git a/htdocs/view/cust_main.cgi b/htdocs/view/cust_main.cgi index 6f6c33540..7c96ddffa 100755 --- a/htdocs/view/cust_main.cgi +++ b/htdocs/view/cust_main.cgi @@ -1,6 +1,6 @@ #!/usr/bin/perl -Tw # -# $Id: cust_main.cgi,v 1.16 1999-04-09 04:22:34 ivan Exp $ +# $Id: cust_main.cgi,v 1.20 2001-06-03 11:40:48 ivan Exp $ # # Usage: cust_main.cgi custnum # http://server.name/path/cust_main.cgi?custnum @@ -31,7 +31,21 @@ # lose background, FS::CGI ivan@sisd.com 98-sep-2 # # $Log: cust_main.cgi,v $ -# Revision 1.16 1999-04-09 04:22:34 ivan +# Revision 1.20 2001-06-03 11:40:48 ivan +# inline doc clarification +# +# Revision 1.19 2001/04/22 01:38:39 ivan +# svc_domain needs to import dbh sub from Record +# view/cust_main.cgi needs to use ->owed method, not check (depriciated) owed field +# search/cust_bill.cgi redirect error when there's only one invoice +# +# Revision 1.18 1999/08/12 04:16:01 ivan +# hidecancelledpackages config option +# +# 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 @@ -82,7 +96,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; @@ -102,6 +116,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) )); @@ -117,8 +133,11 @@ $hashref = $cust_main->hashref; 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, '', ; @@ -232,7 +251,7 @@ print ""; print qq!

Packages !, # qq!
Click on package number to view/edit package.!, - qq!( Order and cancel packages )!, + qq!( Order and cancel packages (preserves services) )!, ; #display packages @@ -249,8 +268,11 @@ print qq!!, &table(), "\n", qq!\n!; #get package info -@packages = $cust_main->all_pkgs; -#@packages = $cust_main->ncancelled_pkgs; +if ( $conf->exists('hidecancelledpackages') ) { + @packages = $cust_main->ncancelled_pkgs; +} else { + @packages = $cust_main->all_pkgs; +} $n1 = ''; foreach $package (@packages) { @@ -317,7 +339,7 @@ foreach $bill (@bills) { push @history, $bref->{_date} . qq!\tInvoice #! . $bref->{invnum} . - qq! (Balance \$! . $bref->{owed} . qq!)\t! . + qq! (Balance \$! . $bill->owed . qq!)\t! . $bref->{charged} . qq!\t\t\t!; my(@payments)=qsearch('cust_pay',{'invnum'=> $bref->{invnum} } );