X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fpart_event%2FAction%2Fpkg_employee_credit.pm;h=838d1754a74c4900128d82571c36eff77f26093d;hb=389b6f1116c3309c2ee57a6c295ed1a793503095;hp=64dd8b2c526c32fb2c33bb0040c0781f81d435dc;hpb=b5c4237a34aef94976bc343c8d9e138664fc3984;p=freeside.git diff --git a/FS/FS/part_event/Action/pkg_employee_credit.pm b/FS/FS/part_event/Action/pkg_employee_credit.pm index 64dd8b2c5..838d1754a 100644 --- a/FS/FS/part_event/Action/pkg_employee_credit.pm +++ b/FS/FS/part_event/Action/pkg_employee_credit.pm @@ -1,7 +1,8 @@ package FS::part_event::Action::pkg_employee_credit; use strict; -use base qw( FS::part_event::Action::pkg_referral_credit ); +use base qw( FS::part_event::Action::Mixin::credit_flat + FS::part_event::Action ); sub description { 'Credit the ordering employee a specific amount'; } @@ -18,8 +19,9 @@ sub do_action { my $employee_cust_main = $employee->user_cust_main; #? or return "No customer record for employee ". $employee->username; - my $amount = $self->_calc_credit($cust_pkg); - return '' unless $amount > 0; + my $warning = ''; + my $amount = $self->_calc_credit($cust_pkg, $employee, \$warning); + return $warning unless $amount > 0; my $reasonnum = $self->option('reasonnum');