From c6e21dc3379f34f23896f2a09731c34981ab6018 Mon Sep 17 00:00:00 2001 From: Ivan Kohler Date: Fri, 21 Dec 2012 00:07:41 -0800 Subject: add option _not_ to apply a lineitem credit, RT#18676 --- FS/FS/cust_credit.pm | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'FS/FS/cust_credit.pm') diff --git a/FS/FS/cust_credit.pm b/FS/FS/cust_credit.pm index 18d8bed..fe9572f 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 = (); -- cgit v1.1