X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=htdocs%2Fedit%2Fprocess%2Fcust_main.cgi;h=25dc0299b54fa8065eb2dedbbcf784d5f0b29394;hp=a66432ad1eec2465328bda8fdcca67427fa66fae;hb=e6cf4af2b9d3ffefebe1a3e358f0674f566b56bc;hpb=a4cdd045fcb3edab2b49d5603e02ce5683a778af diff --git a/htdocs/edit/process/cust_main.cgi b/htdocs/edit/process/cust_main.cgi index a66432ad1..25dc0299b 100755 --- a/htdocs/edit/process/cust_main.cgi +++ b/htdocs/edit/process/cust_main.cgi @@ -1,6 +1,6 @@ #!/usr/bin/perl -Tw # -# $Id: cust_main.cgi,v 1.10 1999-04-14 07:47:53 ivan Exp $ +# $Id: cust_main.cgi,v 1.11 1999-08-10 12:54:06 ivan Exp $ # # Usage: post form to: # http://server.name/path/cust_main.cgi @@ -20,7 +20,10 @@ # bmccane@maxbaud.net 98-apr-3 # # $Log: cust_main.cgi,v $ -# Revision 1.10 1999-04-14 07:47:53 ivan +# Revision 1.11 1999-08-10 12:54:06 ivan +# use FS::cust_pkg::pkgpart_href +# +# Revision 1.10 1999/04/14 07:47:53 ivan # i18n fixes # # Revision 1.9 1999/04/07 15:22:19 ivan @@ -118,21 +121,25 @@ if ( $new->custnum eq '' ) { # generate %part_pkg # $part_pkg{$pkgpart} is true iff $custnum may purchase $pkgpart my $agent = qsearchs('agent',{'agentnum'=> $new->agentnum }); - my($type_pkgs); - foreach $type_pkgs ( qsearch('type_pkgs',{'typenum'=> $agent->typenum }) ) { - my($pkgpart)=$type_pkgs->pkgpart; - $part_pkg{$pkgpart}++; - } + #my($type_pkgs); + #foreach $type_pkgs ( qsearch('type_pkgs',{'typenum'=> $agent->typenum }) ) { + # my($pkgpart)=$type_pkgs->pkgpart; + # $part_pkg{$pkgpart}++; + #} + # $pkgpart_href->{PKGPART} is true iff $custnum may purchase $pkgpart + my $pkgpart_href = $agent->pkgpart_hashref; #eslaf + # this should wind up in FS::cust_pkg! $error ||= "Agent ". $new->agentnum. " (type ". $agent->typenum. ") can't". "purchase pkgpart ". $pkgpart - unless $part_pkg{ $pkgpart }; + #unless $part_pkg{ $pkgpart }; + unless $pkgpart_href->{ $pkgpart }; $cust_pkg = new FS::cust_pkg ( { - #later 'custnum' => $custnum, - 'pkgpart' => $pkgpart, - } ); + #later 'custnum' => $custnum, + 'pkgpart' => $pkgpart, + } ); $error ||= $cust_pkg->check; #$cust_svc = new FS::cust_svc ( { 'svcpart' => $svcpart } );