From dc797c21faf993cec12ae92c190043c4f8bb2ab2 Mon Sep 17 00:00:00 2001 From: Ivan Kohler Date: Sun, 18 Aug 2013 16:09:39 -0700 Subject: continue sales person work: customer and package selection, commissions, reporting. RT#23402 --- httemplate/elements/table-commissions.html | 44 ++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 httemplate/elements/table-commissions.html (limited to 'httemplate/elements/table-commissions.html') 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 @@ +<% mt('Commissions') |h %> + + +% 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}; + + + + + + +% } + +
% + <% $pkg_class ? $pkg_class->classname : mt('(no package class)') |h %> +
+ +<%init> + +my %opt = @_; + +my $object = $opt{'source_obj'}; +my $link_table = $opt{'link_table'}; +my $target_table = $opt{'target_table'} || 'pkg_class'; + + -- cgit v1.2.1