- type => 'select',
- options => [ 'charged', 'owed' ],
- labels => { 'charged' => 'amount charged',
- 'owed' => 'balance due', },
+ type => 'selectlayers',
+ options => [ 'charged', 'owed', 'usage' ],
+ labels => { 'charged' => 'amount charged',
+ 'owed' => 'balance due',
+ 'usage' => 'usage charges' },
+ layer_fields => \%layer_fields,
+ layer_values_callback => sub {
+ my ($cgi, $obj) = @_;
+ {
+ 'charged' => { charged_percent => $obj->percent },
+ 'owed' => { owed_percent => $obj->percent },
+ 'usage' => { usage => [ $obj->part_fee_usage ] },
+ }
+ },