blob: a3437292fa6aa559f4703e4635284f9d8580c7c7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
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>
|