summaryrefslogtreecommitdiff
path: root/httemplate/edit/process/bulk-477_cust_pkg.html
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2014-12-10 16:18:22 -0800
committerIvan Kohler <ivan@freeside.biz>2014-12-10 16:18:22 -0800
commitfa0223015fe6c03491b1d0d43524e03ac5fdb899 (patch)
treed56cf20b2f69b84016bfe3f5ade7b63ac61b88b2 /httemplate/edit/process/bulk-477_cust_pkg.html
parent2b213128f191f52dc7b7ad6ada5fb845e42dc632 (diff)
parente28aac72a20271f60b8f628e29e4908dcfe2b05c (diff)
Merge branch 'master' of git.freeside.biz:/home/git/freeside
Diffstat (limited to 'httemplate/edit/process/bulk-477_cust_pkg.html')
-rw-r--r--httemplate/edit/process/bulk-477_cust_pkg.html20
1 files changed, 20 insertions, 0 deletions
diff --git a/httemplate/edit/process/bulk-477_cust_pkg.html b/httemplate/edit/process/bulk-477_cust_pkg.html
new file mode 100644
index 000000000..064f73b60
--- /dev/null
+++ b/httemplate/edit/process/bulk-477_cust_pkg.html
@@ -0,0 +1,20 @@
+<% $cgi->redirect($fsurl.'search/477_cust_pkg.html?redirect='.$session) %>
+<%init>
+my $curuser = $FS::CurrentUser::CurrentUser;
+my $edit_acl = $curuser->access_right('Edit FCC report configuration');
+my $global_edit_acl = $curuser->access_right('Edit FCC report configuration for all agents');
+die "access denied" unless $edit_acl or $global_edit_acl;
+
+my %error;
+foreach my $param ($cgi->param) {
+ $param =~ /^pkgnum(\d+)pkgpart(\d+)$/ or next;
+ my $pkgpart = $2;
+ my $part_pkg = FS::part_pkg->by_key($pkgpart);
+ my $hashref = decode_json( $cgi->param($param) );
+ my $error = $part_pkg->set_fcc_options($hashref);
+ $error{$pkgpart} = $error if $error; # XXX report this somehow
+}
+
+my $session = $cgi->param('redirect');
+
+</%init>