1 <FONT CLASS="fsinnerbox-title"><% mt('Commissions') |h %></FONT>
2 <TABLE CLASS="fsinnerbox">
4 % my $pkey = $object->primary_key;
5 % my $pkey_value = $object->$pkey();
6 % my $link_class = 'FS::'.$link_table;
8 % #surprising amount of false laziness w/ edit/process/agent.cgi
9 % # (somewhat less now that we're more generic)
10 % my @pkg_class = qsearch($target_table, { 'disabled'=>'' });
11 % foreach my $pkg_class ( '', @pkg_class ) {
12 % my %thing_pkg_class = ( $pkey => $pkey_value,
13 % classnum => $pkg_class ? $pkg_class->classnum : ''
15 % my $thing_pkg_class =
16 % qsearchs( $link_table, \%thing_pkg_class )
17 % || $link_class->new( \%thing_pkg_class );
18 % my $param = 'classnum'. $thing_pkg_class{classnum};
21 <TD><INPUT TYPE = "text"
23 VALUE = "<% $cgi->param($param) || $thing_pkg_class->commission_percent |h %>"
28 <TD><% $pkg_class ? $pkg_class->classname : mt('(no package class)') |h %>
40 my $object = $opt{'source_obj'};
41 my $link_table = $opt{'link_table'};
42 my $target_table = $opt{'target_table'} || 'pkg_class';