show imported region and rate #s, RT#83146
[freeside.git] / httemplate / edit / bulk-cust_svc-pkgnum.html
1 <& /elements/header-popup.html, 'Move services' &>
2
3 Select the target package and the services to be moved.<BR><BR>
4
5 <FORM ACTION="<%$p%>edit/process/bulk-cust_svc-pkgnum.html" METHOD=POST>
6
7 <& /view/cust_main/packages.html, $cust_main,
8      no_links            => 1,
9      before_pkg_callback => sub {
10        my $cust_pkg = shift;
11        '<INPUT TYPE="radio" NAME="pkgnum" VALUE="'. $cust_pkg->pkgnum. '">';
12      },
13      before_svc_callback => sub {
14        my $cust_svc = shift;
15        my $nameid = 'svcnum'. $cust_svc->svcnum;
16        '<TABLE CELLSPACING=0 CELLPADDING=0><TR><TD>'.
17        qq( <INPUT TYPE="checkbox" NAME="$nameid" ID="$nameid" VALUE="1"> ).
18        '</TD><TD>&nbsp;</TD><TD>';
19      },
20      after_svc_callback => sub {
21        #my $cust_svc = shift;
22        '</TD></TR></TABLE>';
23      },
24 &>
25
26 <BR>
27 <INPUT TYPE="submit" VALUE="Move services">
28
29 </FORM>
30
31   </BODY>
32 </HTML>
33 <%init>
34
35 my $curuser = $FS::CurrentUser::CurrentUser;
36 die "access denied" unless $curuser->access_right('Bulk move customer services');
37
38 $cgi->param('custnum') =~ /^(\d+)$/ or die 'illegal custnum';
39 my $custnum = $1;
40
41 my $cust_main = qsearchs({
42   'table'     => 'cust_main',
43   'hashref'   => { 'custnum' => $custnum },
44   'extra_sql' => ' AND '. $curuser->agentnums_sql,
45 }) or die 'unknown customer';
46
47 </%init>