diff options
| author | Ivan Kohler <ivan@freeside.biz> | 2012-12-21 00:07:45 -0800 |
|---|---|---|
| committer | Ivan Kohler <ivan@freeside.biz> | 2012-12-21 00:07:45 -0800 |
| commit | 4af7fdd6eb6a6fb2d1ab40116080308241f0baf3 (patch) | |
| tree | 1891b45b0c4fb97e324bc8734213e6d59935071c /FS | |
| parent | 52fcd2eb6f389fa8223d6d10d24aed4595c801db (diff) | |
add option _not_ to apply a lineitem credit, RT#18676
Diffstat (limited to 'FS')
| -rw-r--r-- | FS/FS/cust_credit.pm | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/FS/FS/cust_credit.pm b/FS/FS/cust_credit.pm index 83e5d6049..4553aff44 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')), @@ -705,6 +706,11 @@ sub credit_lineitems { return "Error inserting credit: $error"; } + unless ( $arg{'apply'} ) { + $dbh->commit or die $dbh->errstr if $oldAutoCommit; + return ''; + } + #my $subtotal = 0; # keys in all of these are invoice numbers my %taxlisthash = (); |
