summaryrefslogtreecommitdiff
path: root/httemplate/edit/process/part_pkg.cgi
diff options
context:
space:
mode:
authorivan <ivan>2005-10-08 00:47:20 +0000
committerivan <ivan>2005-10-08 00:47:20 +0000
commitd1a885c65ac10e19bed0333a380dafeb42c2cef1 (patch)
tree40656923923b75a13114955c182c899c14a85ac8 /httemplate/edit/process/part_pkg.cgi
parent4d77eb68f3501500ae66f84626b3922e2bb52e40 (diff)
fix tax class selection in package add/edit too
Diffstat (limited to 'httemplate/edit/process/part_pkg.cgi')
-rwxr-xr-xhttemplate/edit/process/part_pkg.cgi9
1 files changed, 8 insertions, 1 deletions
diff --git a/httemplate/edit/process/part_pkg.cgi b/httemplate/edit/process/part_pkg.cgi
index 1a7f52838..0d0a13491 100755
--- a/httemplate/edit/process/part_pkg.cgi
+++ b/httemplate/edit/process/part_pkg.cgi
@@ -29,12 +29,18 @@ my %pkg_svc = map { $_ => scalar($cgi->param("pkg_svc$_")) }
my $error;
my $custnum = '';
-if ( $pkgpart ) {
+if ( $cgi->param('taxclass') eq '(select)' ) {
+
+ $error = 'Must select a tax class';
+
+} elsif ( $pkgpart ) {
+
$error = $new->replace( $old,
pkg_svc => \%pkg_svc,
primary_svc => scalar($cgi->param('pkg_svc_primary')),
);
} else {
+
$error = $new->insert( pkg_svc => \%pkg_svc,
primary_svc => scalar($cgi->param('pkg_svc_primary')),
cust_pkg => $cgi->param('pkgnum'),
@@ -42,6 +48,7 @@ if ( $pkgpart ) {
);
$pkgpart = $new->pkgpart;
}
+
if ( $error ) {
$cgi->param('error', $error );
print $cgi->redirect(popurl(2). "part_pkg.cgi?". $cgi->query_string );