diff options
Diffstat (limited to 'htdocs/edit')
-rwxr-xr-x | htdocs/edit/cust_credit.cgi | 9 | ||||
-rwxr-xr-x | htdocs/edit/cust_main.cgi | 46 | ||||
-rwxr-xr-x | htdocs/edit/cust_pay.cgi | 9 | ||||
-rwxr-xr-x | htdocs/edit/cust_pkg.cgi | 9 | ||||
-rwxr-xr-x | htdocs/edit/process/cust_credit.cgi | 9 | ||||
-rwxr-xr-x | htdocs/edit/process/cust_main.cgi | 12 | ||||
-rwxr-xr-x | htdocs/edit/process/cust_pay.cgi | 9 | ||||
-rwxr-xr-x | htdocs/edit/process/cust_pkg.cgi | 9 | ||||
-rwxr-xr-x | htdocs/edit/process/svc_acct.cgi | 9 | ||||
-rwxr-xr-x | htdocs/edit/process/svc_acct_sm.cgi | 9 | ||||
-rwxr-xr-x | htdocs/edit/process/svc_domain.cgi | 9 | ||||
-rwxr-xr-x | htdocs/edit/svc_acct.cgi | 9 | ||||
-rwxr-xr-x | htdocs/edit/svc_acct_sm.cgi | 9 | ||||
-rwxr-xr-x | htdocs/edit/svc_domain.cgi | 9 |
14 files changed, 109 insertions, 57 deletions
diff --git a/htdocs/edit/cust_credit.cgi b/htdocs/edit/cust_credit.cgi index f0b17e172..35c4d48fe 100755 --- a/htdocs/edit/cust_credit.cgi +++ b/htdocs/edit/cust_credit.cgi @@ -1,12 +1,10 @@ #!/usr/bin/perl -Tw # -# $Id: cust_credit.cgi,v 1.6 1999-01-25 12:09:52 ivan Exp $ +# $Id: cust_credit.cgi,v 1.7 1999-02-28 00:03:33 ivan Exp $ # # Usage: cust_credit.cgi custnum [ -paybatch ] # http://server.name/path/cust_credit?custnum [ -paybatch ] # -# Note: Should be run setuid root as user nobody. -# # some hooks in here for modifications as well as additions, but needs (lots) more work. # also see process/cust_credit.cgi, the script that processes the form. # @@ -25,7 +23,10 @@ # rewrite ivan@sisd.com 98-mar-16 # # $Log: cust_credit.cgi,v $ -# Revision 1.6 1999-01-25 12:09:52 ivan +# Revision 1.7 1999-02-28 00:03:33 ivan +# removed misleading comments +# +# Revision 1.6 1999/01/25 12:09:52 ivan # yet more mod_perl stuff # # Revision 1.5 1999/01/19 05:13:33 ivan diff --git a/htdocs/edit/cust_main.cgi b/htdocs/edit/cust_main.cgi index ba8642808..35b80fa14 100755 --- a/htdocs/edit/cust_main.cgi +++ b/htdocs/edit/cust_main.cgi @@ -1,12 +1,10 @@ #!/usr/bin/perl -Tw # -# $Id: cust_main.cgi,v 1.9 1999-02-23 08:09:20 ivan Exp $ +# $Id: cust_main.cgi,v 1.10 1999-02-28 00:03:34 ivan Exp $ # # Usage: cust_main.cgi custnum # http://server.name/path/cust_main.cgi?custnum # -# Note: Should be run setuid freeside as user nobody. -# # ivan@voicenet.com 96-nov-29 -> 96-dec-04 # # Blank custnum for new customer. @@ -40,7 +38,10 @@ # fixed one missed day->daytime ivan@sisd.com 98-jul-13 # # $Log: cust_main.cgi,v $ -# Revision 1.9 1999-02-23 08:09:20 ivan +# Revision 1.10 1999-02-28 00:03:34 ivan +# removed misleading comments +# +# Revision 1.9 1999/02/23 08:09:20 ivan # beginnings of one-screen new customer entry and some other miscellania # # Revision 1.8 1999/01/25 12:09:53 ivan @@ -89,6 +90,10 @@ use FS::cust_main_county; #for false laziness below use FS::svc_acct_pop; + #for (other) false laziness below + use FS::agent; + use FS::type_pkgs; + $cgi = new CGI; cgisuidsetup($cgi); @@ -306,6 +311,34 @@ unless ( $custnum ) { #use FS::part_svc; #use FS::part_pkg; + #false laziness, copied from FS::cust_pkg::order + my %part_pkg; + if ( scalar(@agents) == 1 ) { + # generate %part_pkg + # $part_pkg{$pkgpart} is true iff $custnum may purchase $pkgpart + #my($cust_main)=qsearchs('cust_main',{'custnum'=>$custnum}); + #my($agent)=qsearchs('agent',{'agentnum'=> $cust_main->agentnum }); + my($agent)=qsearchs('agent',{'agentnum'=> $agentnum }); + + my($type_pkgs); + foreach $type_pkgs ( qsearch('type_pkgs',{'typenum'=> $agent->typenum }) ) { + my($pkgpart)=$type_pkgs->pkgpart; + $part_pkg{$pkgpart}++; + } + } else { + #can't know (agent not chosen), so, allow all + my %typenum; + foreach my $agent ( @agents ) { + next if $typenum{$agent->typenum}++; + foreach my $type_pkgs ( qsearch('type_pkgs',{'typenum'=> $agent->typenum }) ) { + my($pkgpart)=$type_pkgs->pkgpart; + $part_pkg{$pkgpart}++; + } + } + + } + #eslaf + my %pkgpart; #foreach ( @pkg_svc ) { foreach ( qsearch( 'pkg_svc', {} ) ) { @@ -317,7 +350,10 @@ unless ( $custnum ) { my @part_pkg = #grep { $pkgpart{ $_->pkgpart } == 1 } qsearch( 'part_pkg', {} ); - grep { ( $pkgpart{ $_->pkgpart } || 0 ) == 1 } qsearch( 'part_pkg', {} ); + grep { + ( $pkgpart{ $_->pkgpart } || 0 ) == 1 + && $part_pkg{ $_->pkgpart } + } qsearch( 'part_pkg', {} ); if ( @part_pkg ) { diff --git a/htdocs/edit/cust_pay.cgi b/htdocs/edit/cust_pay.cgi index 27015171f..5dee76ed9 100755 --- a/htdocs/edit/cust_pay.cgi +++ b/htdocs/edit/cust_pay.cgi @@ -1,12 +1,10 @@ #!/usr/bin/perl -Tw # -# $Id: cust_pay.cgi,v 1.5 1999-01-25 12:09:56 ivan Exp $ +# $Id: cust_pay.cgi,v 1.6 1999-02-28 00:03:35 ivan Exp $ # # Usage: cust_pay.cgi invnum # http://server.name/path/cust_pay.cgi?invnum # -# Note: Should be run setuid as user nobody. -# # some hooks for modifications as well as additions, but needs work. # # ivan@voicenet.com 96-dec-11 @@ -14,7 +12,10 @@ # rewrite ivan@sisd.com 98-mar-16 # # $Log: cust_pay.cgi,v $ -# Revision 1.5 1999-01-25 12:09:56 ivan +# Revision 1.6 1999-02-28 00:03:35 ivan +# removed misleading comments +# +# Revision 1.5 1999/01/25 12:09:56 ivan # yet more mod_perl stuff # # Revision 1.4 1999/01/19 05:13:37 ivan diff --git a/htdocs/edit/cust_pkg.cgi b/htdocs/edit/cust_pkg.cgi index afe6f8770..8906a9441 100755 --- a/htdocs/edit/cust_pkg.cgi +++ b/htdocs/edit/cust_pkg.cgi @@ -1,14 +1,12 @@ #!/usr/bin/perl -Tw # -# $Id: cust_pkg.cgi,v 1.5 1999-02-07 09:59:18 ivan Exp $ +# $Id: cust_pkg.cgi,v 1.6 1999-02-28 00:03:36 ivan Exp $ # # this is for changing packages around, not editing things within the package # # Usage: cust_pkg.cgi custnum # http://server.name/path/cust_pkg.cgi?custnum # -# Note: Should be run setuid freeside as user nobody -# # started with /sales/add/cust_pkg.cgi, which added packages # ivan@voicenet.com 97-jan-5, 97-mar-21 # @@ -25,7 +23,10 @@ # 98-jun-1 # # $Log: cust_pkg.cgi,v $ -# Revision 1.5 1999-02-07 09:59:18 ivan +# Revision 1.6 1999-02-28 00:03:36 ivan +# removed misleading comments +# +# Revision 1.5 1999/02/07 09:59:18 ivan # more mod_perl fixes, and bugfixes Peter Wemm sent via email # # Revision 1.4 1999/01/19 05:13:38 ivan diff --git a/htdocs/edit/process/cust_credit.cgi b/htdocs/edit/process/cust_credit.cgi index f95688197..0b3cb54db 100755 --- a/htdocs/edit/process/cust_credit.cgi +++ b/htdocs/edit/process/cust_credit.cgi @@ -1,12 +1,10 @@ #!/usr/bin/perl -Tw # -# $Id: cust_credit.cgi,v 1.5 1999-01-25 12:09:59 ivan Exp $ +# $Id: cust_credit.cgi,v 1.6 1999-02-28 00:03:41 ivan Exp $ # # Usage: post form to: # http://server.name/path/cust_credit.cgi # -# Note: Should be run setuid root as user nobody. -# # ivan@voicenet.com 96-dec-05 -> 96-dec-08 # # post a refund if $new_paybatch @@ -22,7 +20,10 @@ # bmccane@maxbaud.net 98-apr-3 # # $Log: cust_credit.cgi,v $ -# Revision 1.5 1999-01-25 12:09:59 ivan +# Revision 1.6 1999-02-28 00:03:41 ivan +# removed misleading comments +# +# Revision 1.5 1999/01/25 12:09:59 ivan # yet more mod_perl stuff # # Revision 1.4 1999/01/19 05:13:49 ivan diff --git a/htdocs/edit/process/cust_main.cgi b/htdocs/edit/process/cust_main.cgi index 3262c42e2..9745fa68d 100755 --- a/htdocs/edit/process/cust_main.cgi +++ b/htdocs/edit/process/cust_main.cgi @@ -1,12 +1,10 @@ #!/usr/bin/perl -Tw # -# $Id: cust_main.cgi,v 1.6 1999-01-25 12:10:00 ivan Exp $ +# $Id: cust_main.cgi,v 1.7 1999-02-28 00:03:42 ivan Exp $ # # Usage: post form to: # http://server.name/path/cust_main.cgi # -# Note: Should be run setuid root as user nobody. -# # ivan@voicenet.com 96-dec-04 # # added referral check @@ -22,7 +20,10 @@ # bmccane@maxbaud.net 98-apr-3 # # $Log: cust_main.cgi,v $ -# Revision 1.6 1999-01-25 12:10:00 ivan +# Revision 1.7 1999-02-28 00:03:42 ivan +# removed misleading comments +# +# Revision 1.6 1999/01/25 12:10:00 ivan # yet more mod_perl stuff # # Revision 1.5 1999/01/19 05:13:50 ivan @@ -89,6 +90,9 @@ $error = $new->check_invoicing_list( \@invoicing_list ); #perhaps the invocing_list magic should move to cust_main.pm? if ( $new->custnum eq '' ) { + #false laziness: copied from cust_pkg.pm + HERE! + # $error ||= $new->insert; } else { #create old record object my $old = qsearchs( 'cust_main', { 'custnum' => $new->custnum } ); diff --git a/htdocs/edit/process/cust_pay.cgi b/htdocs/edit/process/cust_pay.cgi index 0bd9acab4..ca5029c3c 100755 --- a/htdocs/edit/process/cust_pay.cgi +++ b/htdocs/edit/process/cust_pay.cgi @@ -1,12 +1,10 @@ #!/usr/bin/perl -Tw # -# $Id: cust_pay.cgi,v 1.6 1999-01-25 12:19:09 ivan Exp $ +# $Id: cust_pay.cgi,v 1.7 1999-02-28 00:03:43 ivan Exp $ # # Usage: post form to: # http://server.name/path/cust_pay.cgi # -# Note: Should be run setuid root as user nobody. -# # ivan@voicenet.com 96-dec-11 # # rewrite ivan@sisd.com 98-mar-16 @@ -15,7 +13,10 @@ # bmccane@maxbaud.net 98-apr-3 # # $Log: cust_pay.cgi,v $ -# Revision 1.6 1999-01-25 12:19:09 ivan +# Revision 1.7 1999-02-28 00:03:43 ivan +# removed misleading comments +# +# Revision 1.6 1999/01/25 12:19:09 ivan # yet more mod_perl stuff # # Revision 1.5 1999/01/19 05:13:53 ivan diff --git a/htdocs/edit/process/cust_pkg.cgi b/htdocs/edit/process/cust_pkg.cgi index 2c5eaef97..437569fb4 100755 --- a/htdocs/edit/process/cust_pkg.cgi +++ b/htdocs/edit/process/cust_pkg.cgi @@ -1,6 +1,6 @@ #!/usr/bin/perl -Tw # -# $Id: cust_pkg.cgi,v 1.5 1999-02-07 09:59:26 ivan Exp $ +# $Id: cust_pkg.cgi,v 1.6 1999-02-28 00:03:44 ivan Exp $ # # this is for changing packages around, not for editing things within the # package @@ -8,8 +8,6 @@ # Usage: post form to: # http://server.name/path/cust_pkg.cgi # -# Note: Should be run setuid root as user nobody. -# # ivan@voicenet.com 97-mar-21 - 97-mar-24 # # rewrote for new API @@ -21,7 +19,10 @@ # bmccane@maxbaud.net 98-apr-3 # # $Log: cust_pkg.cgi,v $ -# Revision 1.5 1999-02-07 09:59:26 ivan +# Revision 1.6 1999-02-28 00:03:44 ivan +# removed misleading comments +# +# Revision 1.5 1999/02/07 09:59:26 ivan # more mod_perl fixes, and bugfixes Peter Wemm sent via email # # Revision 1.3 1999/01/19 05:13:54 ivan diff --git a/htdocs/edit/process/svc_acct.cgi b/htdocs/edit/process/svc_acct.cgi index ba231ece3..73e9d5d74 100755 --- a/htdocs/edit/process/svc_acct.cgi +++ b/htdocs/edit/process/svc_acct.cgi @@ -1,12 +1,10 @@ #!/usr/bin/perl -Tw # -# $Id: svc_acct.cgi,v 1.5 1999-02-07 09:59:30 ivan Exp $ +# $Id: svc_acct.cgi,v 1.6 1999-02-28 00:03:45 ivan Exp $ # # Usage: post form to: # http://server.name/path/svc_acct.cgi # -# Note: Should br run setuid root as user nobody. -# # ivan@voicenet.com 96-dec-18 # # Changed /u to /u2 @@ -23,7 +21,10 @@ # bmccane@maxbaud.net 98-apr-3 # # $Log: svc_acct.cgi,v $ -# Revision 1.5 1999-02-07 09:59:30 ivan +# Revision 1.6 1999-02-28 00:03:45 ivan +# removed misleading comments +# +# Revision 1.5 1999/02/07 09:59:30 ivan # more mod_perl fixes, and bugfixes Peter Wemm sent via email # # Revision 1.4 1999/01/19 05:13:58 ivan diff --git a/htdocs/edit/process/svc_acct_sm.cgi b/htdocs/edit/process/svc_acct_sm.cgi index 5fefeafdb..9c39bb8e5 100755 --- a/htdocs/edit/process/svc_acct_sm.cgi +++ b/htdocs/edit/process/svc_acct_sm.cgi @@ -1,12 +1,10 @@ #!/usr/bin/perl -Tw # -# $Id: svc_acct_sm.cgi,v 1.5 1999-02-07 09:59:32 ivan Exp $ +# $Id: svc_acct_sm.cgi,v 1.6 1999-02-28 00:03:46 ivan Exp $ # # Usage: post form to: # http://server.name/path/svc_acct_sm.cgi # -# Note: Should br run setuid root as user nobody. -# # lots of crufty stuff from svc_acct still in here, and modifications are (unelegantly) disabled. # # ivan@voicenet.com 97-jan-6 @@ -24,7 +22,10 @@ # bmccane@maxbaud.net 98-apr-3 # # $Log: svc_acct_sm.cgi,v $ -# Revision 1.5 1999-02-07 09:59:32 ivan +# Revision 1.6 1999-02-28 00:03:46 ivan +# removed misleading comments +# +# Revision 1.5 1999/02/07 09:59:32 ivan # more mod_perl fixes, and bugfixes Peter Wemm sent via email # # Revision 1.4 1999/01/19 05:14:00 ivan diff --git a/htdocs/edit/process/svc_domain.cgi b/htdocs/edit/process/svc_domain.cgi index fe3c6f7a1..e12aa1b55 100755 --- a/htdocs/edit/process/svc_domain.cgi +++ b/htdocs/edit/process/svc_domain.cgi @@ -1,12 +1,10 @@ #!/usr/bin/perl -Tw # -# $Id: svc_domain.cgi,v 1.5 1999-02-07 09:59:33 ivan Exp $ +# $Id: svc_domain.cgi,v 1.6 1999-02-28 00:03:47 ivan Exp $ # # Usage: post form to: # http://server.name/path/svc_domain.cgi # -# Note: Should br run setuid root as user nobody. -# # lots of yucky stuff in this one... bleachlkjhui! # # ivan@voicenet.com 97-jan-6 @@ -20,7 +18,10 @@ # bmccane@maxbaud.net 98-apr-3 # # $Log: svc_domain.cgi,v $ -# Revision 1.5 1999-02-07 09:59:33 ivan +# Revision 1.6 1999-02-28 00:03:47 ivan +# removed misleading comments +# +# Revision 1.5 1999/02/07 09:59:33 ivan # more mod_perl fixes, and bugfixes Peter Wemm sent via email # # Revision 1.4 1999/01/19 05:14:01 ivan diff --git a/htdocs/edit/svc_acct.cgi b/htdocs/edit/svc_acct.cgi index 010cdca96..a8c4cfb39 100755 --- a/htdocs/edit/svc_acct.cgi +++ b/htdocs/edit/svc_acct.cgi @@ -1,12 +1,10 @@ #!/usr/bin/perl -Tw # -# $Id: svc_acct.cgi,v 1.8 1999-02-23 08:09:22 ivan Exp $ +# $Id: svc_acct.cgi,v 1.9 1999-02-28 00:03:37 ivan Exp $ # # Usage: svc_acct.cgi {svcnum} | pkgnum{pkgnum}-svcpart{svcpart} # http://server.name/path/svc_acct.cgi? {svcnum} | pkgnum{pkgnum}-svcpart{svcpart} # -# Note: Should be run setuid freeside as user nobody -# # ivan@voicenet.com 96-dec-18 # # rewrite ivan@sisd.com 98-mar-8 @@ -18,7 +16,10 @@ # use conf/shells and dbdef username length ivan@sisd.com 98-jul-13 # # $Log: svc_acct.cgi,v $ -# Revision 1.8 1999-02-23 08:09:22 ivan +# Revision 1.9 1999-02-28 00:03:37 ivan +# removed misleading comments +# +# Revision 1.8 1999/02/23 08:09:22 ivan # beginnings of one-screen new customer entry and some other miscellania # # Revision 1.7 1999/02/07 09:59:22 ivan diff --git a/htdocs/edit/svc_acct_sm.cgi b/htdocs/edit/svc_acct_sm.cgi index d68d67c3a..cb7cbfae0 100755 --- a/htdocs/edit/svc_acct_sm.cgi +++ b/htdocs/edit/svc_acct_sm.cgi @@ -1,14 +1,12 @@ #!/usr/bin/perl -Tw # -# $Id: svc_acct_sm.cgi,v 1.8 1999-02-07 09:59:24 ivan Exp $ +# $Id: svc_acct_sm.cgi,v 1.9 1999-02-28 00:03:38 ivan Exp $ # # Usage: svc_acct_sm.cgi {svcnum} | pkgnum{pkgnum}-svcpart{svcpart} # http://server.name/path/svc_acct_sm.cgi? {svcnum} | pkgnum{pkgnum}-svcpart{svcpart} # # use {svcnum} for edit, pkgnum{pkgnum}-svcpart{svcpart} for add # -# Note: Should be run setuid freeside as user nobody. -# # should error out in a more CGI-friendly way, and should have more error checking (sigh). # # ivan@voicenet.com 97-jan-5 @@ -35,7 +33,10 @@ # /var/spool/freeside/conf/domain ivan@sisd.com 98-jul-26 # # $Log: svc_acct_sm.cgi,v $ -# Revision 1.8 1999-02-07 09:59:24 ivan +# Revision 1.9 1999-02-28 00:03:38 ivan +# removed misleading comments +# +# Revision 1.8 1999/02/07 09:59:24 ivan # more mod_perl fixes, and bugfixes Peter Wemm sent via email # # Revision 1.7 1999/01/19 05:13:45 ivan diff --git a/htdocs/edit/svc_domain.cgi b/htdocs/edit/svc_domain.cgi index 05cabba2b..6b5eff560 100755 --- a/htdocs/edit/svc_domain.cgi +++ b/htdocs/edit/svc_domain.cgi @@ -1,12 +1,10 @@ #!/usr/bin/perl -Tw # -# $Id: svc_domain.cgi,v 1.8 1999-02-07 09:59:25 ivan Exp $ +# $Id: svc_domain.cgi,v 1.9 1999-02-28 00:03:39 ivan Exp $ # # Usage: svc_domain.cgi pkgnum{pkgnum}-svcpart{svcpart} # http://server.name/path/svc_domain.cgi?pkgnum{pkgnum}-svcpart{svcpart} # -# Note: Should be run setuid freeside as user nobody -# # ivan@voicenet.com 97-jan-5 -> 97-jan-6 # # changes for domain template 3.5 @@ -17,7 +15,10 @@ # no GOV in instructions ivan@sisd.com 98-jul-17 # # $Log: svc_domain.cgi,v $ -# Revision 1.8 1999-02-07 09:59:25 ivan +# Revision 1.9 1999-02-28 00:03:39 ivan +# removed misleading comments +# +# Revision 1.8 1999/02/07 09:59:25 ivan # more mod_perl fixes, and bugfixes Peter Wemm sent via email # # Revision 1.7 1999/01/19 05:13:46 ivan |