X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fpart_event%2FAction%2Fpkg_referral_credit.pm;h=a85a3a17ba4001396ee32ed284f18924d1490db5;hb=39fe6499bd38e6e7c468f549b1d4919a7cf2c44d;hp=9d7bbf8b39e73631f45674bca7740d59f8a031dc;hpb=8dd41f364aaba88969dfd0908feb22709025e7f6;p=freeside.git diff --git a/FS/FS/part_event/Action/pkg_referral_credit.pm b/FS/FS/part_event/Action/pkg_referral_credit.pm index 9d7bbf8b3..a85a3a17b 100644 --- a/FS/FS/part_event/Action/pkg_referral_credit.pm +++ b/FS/FS/part_event/Action/pkg_referral_credit.pm @@ -23,8 +23,9 @@ sub do_action { return 'Referring customer is cancelled' if $referring_cust_main->status eq 'cancelled'; - my $amount = $self->_calc_credit($cust_pkg, $referring_cust_main); - return '' unless $amount > 0; + my $warning = ''; + my $amount = $self->_calc_credit($cust_pkg, $referring_cust_main, \$warning); + return $warning unless $amount > 0; my $reasonnum = $self->option('reasonnum');