summaryrefslogtreecommitdiff
path: root/FS/FS/pay_batch/RBC.pm
diff options
context:
space:
mode:
authorChristopher Burger <burgerc@freeside.biz>2017-05-18 11:58:26 -0400
committerChristopher Burger <burgerc@freeside.biz>2017-05-18 11:58:26 -0400
commit386c1c45a7cb9e8ad93862d9aa2d59cdb4ed0d3a (patch)
treeb994f7a4938b146b26991b6e5b18d7eb62a5c813 /FS/FS/pay_batch/RBC.pm
parenta8d055471f77f59883f921d9eeda056a2e7ad279 (diff)
RT# 74435 - Adding option to allow refunds using electronic check batch with RBC format.
Diffstat (limited to 'FS/FS/pay_batch/RBC.pm')
-rw-r--r--FS/FS/pay_batch/RBC.pm7
1 files changed, 6 insertions, 1 deletions
diff --git a/FS/FS/pay_batch/RBC.pm b/FS/FS/pay_batch/RBC.pm
index b013678..21dae42 100644
--- a/FS/FS/pay_batch/RBC.pm
+++ b/FS/FS/pay_batch/RBC.pm
@@ -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).
' '.