RT# 74435 - Adding option to allow refunds using electronic check batch with RBC...
[freeside.git] / FS / FS / pay_batch / RBC.pm
index b013678..21dae42 100644 (file)
@@ -175,8 +175,13 @@ $name = 'RBC';
     }
 
     $i++;
+
+    ## set to D for debit by default, then override to what cust_pay_batch has as payments may not have paycode.
+    my $debitorcredit = 'D';
+    $debitorcredit = $cust_pay_batch->paycode unless !$cust_pay_batch->paycode;
+
     sprintf("%06u", $i).
-    'D'.
+    $debitorcredit.
     sprintf("%3s",$trans_code).
     sprintf("%10s",$client_num).
     ' '.