<% include( 'elements/process.html',
#'debug' => 1,
'table' => 'part_pkg',
+ 'redirect' => $redirect_callback,
'viewall_dir' => 'browse',
'viewall_ext' => 'cgi',
'edit_ext' => 'cgi',
'precheck_callback' => $precheck_callback,
'args_callback' => $args_callback,
'process_m2m' => \@process_m2m,
- 'debug' => 1,
)
%>
<%init>
}
@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;
'custnum_ref' => \$custnum;
}
+ warn "args: ".join('/', @args). "\n";
+
@args;
};
+my $redirect_callback = sub {
+ #my( $cgi, $new ) = @_;
+ return '' unless $custnum;
+ popurl(3). "view/cust_main.cgi?keywords=$custnum;dummy=";
+};
+
+#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));
'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;
/^(\d+)$/;
push @agents, $1 if $1;
}
- warn "AGENTS: @agents";
push @process_m2m, {
'link_table' => 'type_pkgs',
'target_table' => 'agent_type',