diff options
author | ivan <ivan> | 2008-04-16 00:19:56 +0000 |
---|---|---|
committer | ivan <ivan> | 2008-04-16 00:19:56 +0000 |
commit | b286503a0445e77d67b323785a73d4339c1145a9 (patch) | |
tree | b84739673ef8fa6b7b135bf64716ab5d164a9b72 /httemplate/edit/process/part_pkg.cgi | |
parent | 6a24254d490f3d023728044daba0765f20f6971e (diff) |
new package def editor
Diffstat (limited to 'httemplate/edit/process/part_pkg.cgi')
-rwxr-xr-x | httemplate/edit/process/part_pkg.cgi | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/httemplate/edit/process/part_pkg.cgi b/httemplate/edit/process/part_pkg.cgi index be6e2f85b..290c6f7bc 100755 --- a/httemplate/edit/process/part_pkg.cgi +++ b/httemplate/edit/process/part_pkg.cgi @@ -84,7 +84,8 @@ my $args_callback = sub { } @options; - $options{$_} = scalar($cgi->param($_)) for (qw( setup_fee recur_fee )); + $options{$_} = scalar( $cgi->param($_) ) + for (qw( setup_fee recur_fee )); push @args, 'options' => \%options; @@ -110,6 +111,8 @@ my $args_callback = sub { }; +#these should probably move to @args above and be processed by part_pkg.pm... + $cgi->param('tax_override') =~ /^([\d,]+)$/; my (@tax_overrides) = (grep "$_", split (",", $1)); @@ -118,7 +121,21 @@ my @process_m2m = ( 'link_table' => 'part_pkg_taxoverride', 'target_table' => 'tax_class', 'params' => \@tax_overrides, - } + }, + { 'link_table' => 'part_pkg_link', + 'target_table' => 'part_pkg', + 'base_field' => 'src_pkgpart', + 'target_field' => 'dst_pkgpart', + 'hashref' => { 'link_type' => 'bill' }, + 'params' => [ map $cgi->param($_), grep /^bill_dst_pkgpart/, $cgi->param ], + }, + { 'link_table' => 'part_pkg_link', + 'target_table' => 'part_pkg', + 'base_field' => 'src_pkgpart', + 'target_field' => 'dst_pkgpart', + 'hashref' => { 'link_type' => 'svc' }, + 'params' => [ map $cgi->param($_), grep /^svc_dst_pkgpart/, $cgi->param ], + }, ); my $conf = new FS::Conf; @@ -129,7 +146,6 @@ if ( $cgi->param('pkgpart') || ! $conf->exists('agent_defaultpkg') ) { /^(\d+)$/; push @agents, $1 if $1; } - warn "AGENTS: @agents"; push @process_m2m, { 'link_table' => 'type_pkgs', 'target_table' => 'agent_type', |