summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorivan <ivan>2003-07-23 15:36:56 +0000
committerivan <ivan>2003-07-23 15:36:56 +0000
commit36cd4eb55a365f73330e05369b03d74006409c7c (patch)
treeda42765edb55282dfc0e602e6f55487f67ac87ff
parent40a6ffa02d30786a147897e886169c3855dc3c0e (diff)
fix spurious "can't purchase pkgpart" errors
-rwxr-xr-xhttemplate/edit/cust_main.cgi2
-rwxr-xr-xhttemplate/edit/process/cust_main.cgi4
2 files changed, 3 insertions, 3 deletions
diff --git a/httemplate/edit/cust_main.cgi b/httemplate/edit/cust_main.cgi
index df7a8d652..3777cc3e5 100755
--- a/httemplate/edit/cust_main.cgi
+++ b/httemplate/edit/cust_main.cgi
@@ -481,7 +481,7 @@ unless ( $custnum ) {
foreach my $part_pkg ( @part_pkg ) {
print qq!<OPTION VALUE="!,
# $part_pkg->pkgpart. "_". $pkgpart{ $part_pkg->pkgpart }, '"';
- $part_pkg->pkgpart. "_". $part_pkg->svcpart, '"';
+ $part_pkg->pkgpart. "_". $part_pkg->svcpart('svc_acct'), '"';
print " SELECTED" if $saved_pkgpart && ( $part_pkg->pkgpart == $saved_pkgpart );
print ">", $part_pkg->pkg, " - ", $part_pkg->comment;
}
diff --git a/httemplate/edit/process/cust_main.cgi b/httemplate/edit/process/cust_main.cgi
index 5e6000c05..6bad24017 100755
--- a/httemplate/edit/process/cust_main.cgi
+++ b/httemplate/edit/process/cust_main.cgi
@@ -52,7 +52,7 @@ if ( $new->custnum eq '' ) {
if ( $cgi->param('pkgpart_svcpart') ) {
my $x = $cgi->param('pkgpart_svcpart');
- $x =~ /^(\d+)_(\d+)$/;
+ $x =~ /^(\d+)_(\d+)$/ or die "illegal pkgpart_svcpart $x\n";
my($pkgpart, $svcpart) = ($1, $2);
#false laziness: copied from FS::cust_pkg::order (which should become a
#FS::cust_main method)
@@ -70,7 +70,7 @@ if ( $new->custnum eq '' ) {
#eslaf
# this should wind up in FS::cust_pkg!
- $error ||= "Agent ". $new->agentnum. " (type ". $agent->typenum. ") can't".
+ $error ||= "Agent ". $new->agentnum. " (type ". $agent->typenum. ") can't ".
"purchase pkgpart ". $pkgpart
#unless $part_pkg{ $pkgpart };
unless $pkgpart_href->{ $pkgpart };