eww get rid of black border on konq3
[freeside.git] / fs_signup / fs_signup_server
index 7f962e0..4b7e898 100755 (executable)
@@ -140,6 +140,9 @@ while (1) {
     $error ||= "Illegal payment type"
       unless grep { $_ eq $signup_data->{'payby'} } @payby;
 
+    $cust_main->payinfo($cust_main->daytime)
+      if $cust_main->payby eq 'LECB' && ! $cust_main->payinfo;
+
     my @invoicing_list = split( /\s*\,\s*/, $signup_data->{'invoicing_list'} );
 
     $signup_data->{'pkgpart'} =~ /^(\d+)$/ or '' =~ /^()$/;
@@ -188,9 +191,15 @@ while (1) {
         if $bill_error;
 
       if ( $cust_main->balance > 0 ) {
+
+        #this makes sense.  credit is "un-doing" the invoice
+        $cust_main->credit( $cust_main->balance, 'signup server decline' );
+        $cust_main->apply_credits;
+
         #should check list for errors...
         #$cust_main->suspend;
         $cust_main->cancel;
+
         $error = '_decline';
       }
     }