diff options
author | ivan <ivan> | 2005-10-08 00:47:20 +0000 |
---|---|---|
committer | ivan <ivan> | 2005-10-08 00:47:20 +0000 |
commit | d1a885c65ac10e19bed0333a380dafeb42c2cef1 (patch) | |
tree | 40656923923b75a13114955c182c899c14a85ac8 /httemplate/edit/process/part_pkg.cgi | |
parent | 4d77eb68f3501500ae66f84626b3922e2bb52e40 (diff) |
fix tax class selection in package add/edit too
Diffstat (limited to 'httemplate/edit/process/part_pkg.cgi')
-rwxr-xr-x | httemplate/edit/process/part_pkg.cgi | 9 |
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 ); |