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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
|
<%= header( 'Bulk customer service change',
menubar(
'Main Menu' => $p,
),
)
%>
<SCRIPT TYPE="text/javascript" SRC="../elements/overlibmws.js"></SCRIPT>
<SCRIPT TYPE="text/javascript" SRC="../elements/overlibmws_iframe.js"></SCRIPT>
<SCRIPT TYPE="text/javascript" SRC="../elements/overlibmws_draggable.js"></SCRIPT>
<%= include('/elements/progress-init.html',
'OneTrueForm',
[qw( old_svcpart new_svcpart pkgpart )],
'process/bulk-cust_svc.cgi',
$p.'browse/part_svc.cgi',
)
%>
<FORM NAME="OneTrueForm">
<%
$cgi->param('svcpart') =~ /^(\d+)$/
or die "illegal svcpart: ". $cgi->param('svcpart');
my $old_svcpart = $1;
my $src_part_svc = qsearchs('part_svc', { 'svcpart' => $old_svcpart } )
or die "unknown svcpart: $old_svcpart";
%>
<INPUT NAME="old_svcpart" TYPE="hidden" VALUE="<%= $old_svcpart %>">
Change <!-- customer
<B><%= $src_part_svc->svcpart %>: <%= $src_part_svc->svc %></B> services
<BR>
-->
<SELECT NAME="pkgpart">
<% my $num_cust_svc = $src_part_svc->num_cust_svc; %>
<% if ( $num_cust_svc > 1 ) { %>
<OPTION VALUE="">all <%= $num_cust_svc %> <%= $src_part_svc->svc %> services
<% } else { %>
<OPTION VALUE="">the <%= $num_cust_svc %> <%= $src_part_svc->svc %> service
<% } %>
<%
my $num_unlinked = $src_part_svc->num_cust_svc(0);
if ( $num_unlinked ) {
%>
<OPTION VALUE="0">the <%= $num_unlinked %> unlinked <%= $src_part_svc->svc %> services
<% } %>
<% foreach my $schwartz (
grep { $_->[1] }
map { [ $_, $src_part_svc->num_cust_svc($_->pkgpart) ] }
qsearch('part_pkg', {} )
) {
my( $part_pkg, $num_cust_svc ) = @$schwartz;
%>
<OPTION VALUE="<%= $part_pkg->pkgpart %>">the <%= $num_cust_svc %>
<%= $src_part_svc->svc %> service<%= $num_cust_svc > 1 ? 's in' : ' in a' %>
<%= $part_pkg->pkg %> package<%= $num_cust_svc > 1 ? 's' : '' %>
<% } %>
</SELECT>
<BR>
to new service definition
<SELECT NAME="new_svcpart">
<% foreach my $dest_part_svc (
grep { $_->svcpart != $old_svcpart
&& $_->svcdb eq $src_part_svc->svcdb
}
qsearch('part_svc', { 'disabled' => '' } )
) {
%>
<OPTION VALUE="<%= $dest_part_svc->svcpart %>"><%= $dest_part_svc->svcpart %>: <%= $dest_part_svc->svc %>
<% } %>
</SELECT>
<BR>
<BR>
<SCRIPT TYPE="text/javascript">
var confirm_change = '<P ALIGN="center"><B>Bulk customer service change - Are you sure?</B><BR><P ALIGN="CENTER" <INPUT TYPE="button" VALUE="Yes, make changes" onClick="process();"> <INPUT TYPE="BUTTON" VALUE="Cancel" onClick="cClick()">';
</SCRIPT>
<INPUT TYPE="button" VALUE="Bulk change customer services" onClick="overlib(confirm_change, CAPTION, 'Confirm bulk customer service change', STICKY, AUTOSTATUSCAP, CLOSETEXT, '', MIDX, 0, MIDY, 0, DRAGGABLE, WIDTH, 576, HEIGHT, 128, TEXTSIZE, 3, BGCOLOR, '#ff0000', CGCOLOR, '#ff0000' );">
</FORM>
</BODY>
</HTML>
|