},
},
'fieldorder' => [ 'setup_fee', 'recur_fee', 'unused_credit', 'cutoff_day',
- 'seconds', 'upbyte', 'downbytes', 'totalbytes',
+ 'seconds', 'upbytes', 'downbytes', 'totalbytes',
'recharge_amount', 'recharge_seconds', 'recharge_upbytes',
'recharge_downbytes', 'recharge_totalbytes',
'usage_rollover', 'recharge_reset', 'externalid', ],
use_duration
output_format usage_mandate summarize_usage usage_section
bill_every_call
- count_available_phones
)
],
'weight' => 40,
# to indicate it represents a line
sub calc_units {
my($self, $cust_pkg ) = @_;
- my $count = 0;
- if ( $self->option('count_available_phones', 1)) {
- map { $count += ( $_->quantity || 0 ) }
- grep { $_->part_svc->svcdb eq 'svc_phone' }
- $cust_pkg->part_pkg->pkg_svc;
- } else {
- $count =
+ my $count =
scalar(grep { $_->part_svc->svcdb eq 'svc_phone' } $cust_pkg->cust_svc);
- }
$count;
}
# $html .= ' SELECTED' if $freq eq $part_pkg->freq;
# $html .= ">$freq{$freq}";
#}
+
+ if(!exists($href->{$field})) {
+ # shouldn't happen
+ warn "nonexistent part_pkg option: '$field'\n";
+ next;
+ }
#$html .= '</SELECT></TD></TR>';
my $href = $plans{$layer}->{'fields'};