blob: 89dc5d4156784070f60f6198107bda70547609f0 (
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
|
% if ( scalar(@cust_pkg) == 0 ) {
<INPUT TYPE="hidden" NAME="pkgnum" VALUE="">
% } elsif ( scalar(@cust_pkg) == 1 ) {
<INPUT TYPE="hidden" NAME="pkgnum" VALUE="<% $cust_pkg[0]->pkgnum %>">
% } else {
<TR>
<TD ALIGN="right">For package</TD>
<TD COLSPAN=2>
<% include('select-cust_pkg-balances.html',
'cust_pkg' => \@cust_pkg,
'cgi' => $opt{'cgi'},
)
%>
</TD>
</TR>
% }
<%init>
my %opt = @_;
my $custnum = $opt{'custnum'};
my $cust_main = qsearchs('cust_main', { 'custnum' => $custnum } )
or die "unknown custnum $custnum\n";
my @cust_pkg =
grep { ! $_->get('cancel') || $cust_main->balance_pkgnum($_->pkgnum) }
$cust_main->all_pkgs;
</%init>
|