diff options
author | Ivan Kohler <ivan@freeside.biz> | 2013-06-04 03:23:12 -0700 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2013-06-04 03:23:12 -0700 |
commit | 05eb6fd62056682d8760b85ced91dabd33357a3b (patch) | |
tree | c541401962c75dcbe9833dde33943c109a865bac /httemplate/edit/bulk-cust_svc-pkgnum.html | |
parent | 39754a8b5468d95124ee2c0bbcd1c104904d1fe5 (diff) |
move services between packages, RT#22619
Diffstat (limited to 'httemplate/edit/bulk-cust_svc-pkgnum.html')
-rw-r--r-- | httemplate/edit/bulk-cust_svc-pkgnum.html | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/httemplate/edit/bulk-cust_svc-pkgnum.html b/httemplate/edit/bulk-cust_svc-pkgnum.html new file mode 100644 index 000000000..a3437292f --- /dev/null +++ b/httemplate/edit/bulk-cust_svc-pkgnum.html @@ -0,0 +1,47 @@ +<& /elements/header-popup.html, 'Move services' &> + +Select the target package and the services to be moved.<BR><BR> + +<FORM ACTION="<%$p%>edit/process/bulk-cust_svc-pkgnum.html" METHOD=POST> + +<& /view/cust_main/packages.html, $cust_main, + no_links => 1, + before_pkg_callback => sub { + my $cust_pkg = shift; + '<INPUT TYPE="radio" NAME="pkgnum" VALUE="'. $cust_pkg->pkgnum. '">'; + }, + before_svc_callback => sub { + my $cust_svc = shift; + my $nameid = 'svcnum'. $cust_svc->svcnum; + '<TABLE CELLSPACING=0 CELLPADDING=0><TR><TD>'. + qq( <INPUT TYPE="checkbox" NAME="$nameid" ID="$nameid" VALUE="1"> ). + '</TD><TD> </TD><TD>'; + }, + after_svc_callback => sub { + #my $cust_svc = shift; + '</TD></TR></TABLE>'; + }, +&> + +<BR> +<INPUT TYPE="submit" VALUE="Move services"> + +</FORM> + + </BODY> +</HTML> +<%init> + +my $curuser = $FS::CurrentUser::CurrentUser; +die "access denied" unless $curuser->access_right('Bulk move customer services'); + +$cgi->param('custnum') =~ /^(\d+)$/ or die 'illegal custnum'; +my $custnum = $1; + +my $cust_main = qsearchs({ + 'table' => 'cust_main', + 'hashref' => { 'custnum' => $custnum }, + 'extra_sql' => ' AND '. $curuser->agentnums_sql, +}) or die 'unknown customer'; + +</%init> |