diff options
author | Ivan Kohler <ivan@freeside.biz> | 2013-08-18 16:09:57 -0700 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2013-08-18 16:09:57 -0700 |
commit | 48c5c17b6ca02cd04f1dd5deb530738f2409c585 (patch) | |
tree | 6e1ecc24bc642d92738cd217ef3f452237d3f57a /httemplate/elements/table-commissions.html | |
parent | 82e249a5e6f02c2afa4e32b5a5fba3155b935a59 (diff) |
continue sales person work: customer and package selection, commissions, reporting. RT#23402
Diffstat (limited to 'httemplate/elements/table-commissions.html')
-rw-r--r-- | httemplate/elements/table-commissions.html | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/httemplate/elements/table-commissions.html b/httemplate/elements/table-commissions.html new file mode 100644 index 000000000..ce5808ded --- /dev/null +++ b/httemplate/elements/table-commissions.html @@ -0,0 +1,44 @@ +<FONT CLASS="fsinnerbox-title"><% mt('Commissions') |h %></FONT> +<TABLE CLASS="fsinnerbox"> + +% my $pkey = $object->primary_key; +% my $pkey_value = $object->$pkey(); +% my $link_class = 'FS::'.$link_table; +% +% #surprising amount of false laziness w/ edit/process/agent.cgi +% # (somewhat less now that we're more generic) +% my @pkg_class = qsearch($target_table, { 'disabled'=>'' }); +% foreach my $pkg_class ( '', @pkg_class ) { +% my %thing_pkg_class = ( $pkey => $pkey_value, +% classnum => $pkg_class ? $pkg_class->classnum : '' +% ); +% my $thing_pkg_class = +% qsearchs( $link_table, \%thing_pkg_class ) +% || $link_class->new( \%thing_pkg_class ); +% my $param = 'classnum'. $thing_pkg_class{classnum}; + + <TR> + <TD><INPUT TYPE = "text" + NAME = "<% $param %>" + VALUE = "<% $cgi->param($param) || $thing_pkg_class->commission_percent |h %>" + SIZE = 6 + MAXLENGTH = 7 + >% + </TD> + <TD><% $pkg_class ? $pkg_class->classname : mt('(no package class)') |h %> + </TD> + </TR> + +% } + +</TABLE> + +<%init> + +my %opt = @_; + +my $object = $opt{'source_obj'}; +my $link_table = $opt{'link_table'}; +my $target_table = $opt{'target_table'} || 'pkg_class'; + +</%init> |