summaryrefslogtreecommitdiff
path: root/FS/FS/part_event/Action/bill_sales_credit.pm
diff options
context:
space:
mode:
Diffstat (limited to 'FS/FS/part_event/Action/bill_sales_credit.pm')
-rw-r--r--FS/FS/part_event/Action/bill_sales_credit.pm5
1 files changed, 4 insertions, 1 deletions
diff --git a/FS/FS/part_event/Action/bill_sales_credit.pm b/FS/FS/part_event/Action/bill_sales_credit.pm
index 3193a81ef..ab69375e2 100644
--- a/FS/FS/part_event/Action/bill_sales_credit.pm
+++ b/FS/FS/part_event/Action/bill_sales_credit.pm
@@ -38,6 +38,7 @@ sub do_action {
pkgnum => { op => '>', value => '0' }
});
+ my $warning = '';
foreach my $cust_bill_pkg (@items) {
my $pkgnum = $cust_bill_pkg->pkgnum;
my $cust_pkg = $pkgnum_pkg{$pkgnum} ||= $cust_bill_pkg->cust_pkg;
@@ -50,7 +51,7 @@ sub do_action {
next if !$sales; #no sales person, no credit
- my $amount = $self->_calc_credit($cust_bill_pkg, $sales);
+ my $amount = $self->_calc_credit($cust_bill_pkg, $sales, \$warning);
if ($amount > 0) {
$salesnum_amount{$salesnum} ||= 0;
@@ -86,6 +87,8 @@ sub do_action {
if $error;
} # foreach $salesnum
+ return $warning;
+
}
1;