RT#38671: Do not include charges and credits from failed signup processing [added...
authorJonathan Prykop <jonathan@freeside.biz>
Fri, 30 Oct 2015 03:17:08 +0000 (22:17 -0500)
committerJonathan Prykop <jonathan@freeside.biz>
Fri, 30 Oct 2015 03:17:08 +0000 (22:17 -0500)
FS/FS/ClientAPI/MyAccount.pm
FS/FS/ClientAPI/Signup.pm

index 89c70f7..f272cd4 100644 (file)
@@ -2521,8 +2521,8 @@ sub _do_bop_realtime {
 
         #this used to apply a credit, but now we can void invoices...
         foreach my $cust_bill (@cust_bill) {
-          my $voiderror = $cust_bill->void();
-          warn "Error voiding cust bill after decline: $voiderror";
+          my $voiderror = $cust_bill->void('automatic payment failed');
+          warn "Error voiding cust bill after decline: $voiderror" if $voiderror;
         }
 
       }
index a4ea21b..e166d40 100644 (file)
@@ -824,8 +824,8 @@ sub new_customer {
 
       #this used to apply a credit, but now we can void invoices...
       foreach my $cust_bill (@cust_bill) {
-        my $voiderror = $cust_bill->void();
-        warn "Error voiding cust bill after decline: $voiderror";
+        my $voiderror = $cust_bill->void('automatic payment failed');
+        warn "Error voiding cust bill after decline: $voiderror" if $voiderror;
       }
 
       #should check list for errors...