2 % foreach my $class (@classes) {
3 % my $pre = "feepartusagenum$n";
4 % my $x = $part_fee_usage{$class->classnum} || FS::part_fee_usage->new({});
7 <input type="hidden" name="<%$pre%>" value="<% $x->partfeeusagenum %>">
8 <input type="hidden" name="<%$pre%>_classnum" value="<% $class->classnum %>">
9 <% $class->classname %>:</td>
11 <%$money_char%><input size=4 name="<%$pre%>_amount" \
12 value="<% sprintf("%.2f", $x->amount) %>">
14 <td>per call<b> + </b></td>
16 <input size=4 name="<%$pre%>_percent" \
17 value="<% sprintf("%.1f", $x->percent) %>">%
24 my $value = $opt{'curr_value'} || $opt{'value'};
25 # values is an arrayref of part_fee_usage objects
26 my %part_fee_usage = map { $_->classnum => $_ } @$value;
27 my @classes = qsearch('usage_class', { disabled => '' });
28 my $money_char = FS::Conf->new->config('money_char') || '$';