% if ( scalar(@cust_pkg) == 0 ) {
% } elsif ( scalar(@cust_pkg) == 1 ) {
% } else {
For package |
<% include('select-cust_pkg-balances.html',
'cust_pkg' => \@cust_pkg,
'cgi' => $opt{'cgi'},
)
%>
|
% }
<%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>