1 package FS::part_event::Action::Mixin::credit_agent_pkg_class;
2 use base qw( FS::part_event::Action::Mixin::credit_pkg );
5 use FS::Record qw(qsearchs);
9 my %option_fields = $class->SUPER::option_fields;
10 delete $option_fields{'percent'};
14 sub _calc_credit_percent {
15 my( $self, $cust_pkg ) = @_;
17 my $agent_pkg_class = qsearchs( 'agent_pkg_class', {
18 'agentnum' => $self->cust_main($cust_pkg)->agentnum,
19 'classnum' => $cust_pkg->classnum,
22 $agent_pkg_class ? $agent_pkg_class->commission_percent : 0;