projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
checkpoint tax editors and correct a blunder
[freeside.git]
/
httemplate
/
edit
/
process
/
part_pkg.cgi
diff --git
a/httemplate/edit/process/part_pkg.cgi
b/httemplate/edit/process/part_pkg.cgi
index
36debfc
..
94bff0f
100755
(executable)
--- a/
httemplate/edit/process/part_pkg.cgi
+++ b/
httemplate/edit/process/part_pkg.cgi
@@
-53,6
+53,9
@@
$error = "At least one agent type must be specified."
!$pkgpart && $conf->exists('agent-defaultpkg')
);
!$pkgpart && $conf->exists('agent-defaultpkg')
);
+$cgi->param('tax_override') =~ /^([\d,]+)$/;
+my (@tax_overrides) = (grep "$_", split (",", $1));
+
my $new = new FS::part_pkg ( {
map {
$_ => scalar($cgi->param($_));
my $new = new FS::part_pkg ( {
map {
$_ => scalar($cgi->param($_));
@@
-103,11
+106,19
@@
if ( $error ) {
}
unless ( $error || $conf->exists('agent_defaultpkg') ) {
}
unless ( $error || $conf->exists('agent_defaultpkg') ) {
-
my
$error = $new->process_m2m(
+ $error = $new->process_m2m(
'link_table' => 'type_pkgs',
'target_table' => 'agent_type',
'params' => \@agents,
);
}
'link_table' => 'type_pkgs',
'target_table' => 'agent_type',
'params' => \@agents,
);
}
+unless ( $error ) {
+ $error = $new->process_m2m(
+ 'link_table' => 'part_pkg_taxoverride',
+ 'target_table' => 'tax_class',
+ 'params' => \@tax_overrides,
+ );
+}
+
</%init>
</%init>