summaryrefslogtreecommitdiff
path: root/FS/FS/part_event/Action/pkg_employee_credit.pm
diff options
context:
space:
mode:
authorJonathan Prykop <jonathan@freeside.biz>2015-04-21 15:45:46 -0500
committerJonathan Prykop <jonathan@freeside.biz>2015-04-21 15:45:46 -0500
commite8e6cb9e129eb20fef8e4fa19239c76b4280cf5f (patch)
tree8ec5b4f18178baead41590859c68db99965e1eb4 /FS/FS/part_event/Action/pkg_employee_credit.pm
parenta2671c1396fed27ff620a58fb46773408d21d194 (diff)
RT#25563: Better handling of commissions which do not have rates configured [more error messages]
Diffstat (limited to 'FS/FS/part_event/Action/pkg_employee_credit.pm')
-rw-r--r--FS/FS/part_event/Action/pkg_employee_credit.pm5
1 files changed, 3 insertions, 2 deletions
diff --git a/FS/FS/part_event/Action/pkg_employee_credit.pm b/FS/FS/part_event/Action/pkg_employee_credit.pm
index 6cbe9bc..838d175 100644
--- a/FS/FS/part_event/Action/pkg_employee_credit.pm
+++ b/FS/FS/part_event/Action/pkg_employee_credit.pm
@@ -19,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, $employee);
- 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');