summaryrefslogtreecommitdiff
path: root/FS/FS/cust_credit.pm
diff options
context:
space:
mode:
Diffstat (limited to 'FS/FS/cust_credit.pm')
-rw-r--r--FS/FS/cust_credit.pm6
1 files changed, 6 insertions, 0 deletions
diff --git a/FS/FS/cust_credit.pm b/FS/FS/cust_credit.pm
index 18d8bedb3..fe9572f6b 100644
--- a/FS/FS/cust_credit.pm
+++ b/FS/FS/cust_credit.pm
@@ -629,6 +629,7 @@ Example:
'billpkgnums' => \@billpkgnums,
'setuprecurs' => \@setuprecurs,
'amounts' => \@amounts,
+ 'apply' => 1, #0 leaves the credit unapplied
#the credit
'newreasonnum' => scalar($cgi->param('newreasonnum')),
@@ -706,6 +707,11 @@ sub credit_lineitems {
return "Error inserting credit: $error";
}
+ unless ( $arg{'apply'} ) {
+ $dbh->commit or die $dbh->errstr if $oldAutoCommit;
+ return '';
+ }
+
#my $subtotal = 0;
my $taxlisthash = {};
my %cust_credit_bill = ();