diff options
author | Christopher Burger <burgerc@freeside.biz> | 2017-05-18 11:58:26 -0400 |
---|---|---|
committer | Christopher Burger <burgerc@freeside.biz> | 2018-06-12 10:24:03 -0400 |
commit | 8196faffdbc0abc43ce346119a76430c8a242b56 (patch) | |
tree | b9e07acfffb56d9b79bf6279db5945e484ee95e8 /FS | |
parent | 744bf508495023922d88a53fcd07467e3e01c2f1 (diff) |
RT# 74435 - Adding option to allow refunds using electronic check batch with RBC format.
Diffstat (limited to 'FS')
-rw-r--r-- | FS/FS/Schema.pm | 1 | ||||
-rw-r--r-- | FS/FS/cust_main/Billing_Batch.pm | 3 | ||||
-rw-r--r-- | FS/FS/pay_batch/RBC.pm | 7 |
3 files changed, 9 insertions, 2 deletions
diff --git a/FS/FS/Schema.pm b/FS/FS/Schema.pm index 1ee7093..22fa395 100644 --- a/FS/FS/Schema.pm +++ b/FS/FS/Schema.pm @@ -2715,6 +2715,7 @@ sub tables_hashref { 'status', 'varchar', 'NULL', $char_d, '', '', 'failure_status','varchar', 'NULL', 16, '', '', 'error_message', 'varchar', 'NULL', $char_d, '', '', + 'paycode', 'varchar', 'NULL', $char_d, '', '', ], 'primary_key' => 'paybatchnum', 'unique' => [], diff --git a/FS/FS/cust_main/Billing_Batch.pm b/FS/FS/cust_main/Billing_Batch.pm index 48854d3..38d100e 100644 --- a/FS/FS/cust_main/Billing_Batch.pm +++ b/FS/FS/cust_main/Billing_Batch.pm @@ -114,7 +114,7 @@ sub batch_card { } ); foreach (qw( address1 address2 city state zip country latitude longitude - payby payinfo paydate payname )) + payby payinfo paydate payname paycode )) { $options{$_} = '' unless exists($options{$_}); } @@ -142,6 +142,7 @@ sub batch_card { 'payname' => $options{payname} || $cust_payby->payname, 'paytype' => $options{paytype} || $cust_payby->paytype, 'amount' => $amount, # consolidating + 'paycode' => $options{paycode} || $cust_payby->paycode, } ); $cust_pay_batch->paybatchnum($old_cust_pay_batch->paybatchnum) diff --git a/FS/FS/pay_batch/RBC.pm b/FS/FS/pay_batch/RBC.pm index 18a6170..dea89cd 100644 --- a/FS/FS/pay_batch/RBC.pm +++ b/FS/FS/pay_batch/RBC.pm @@ -178,8 +178,13 @@ $name = 'RBC'; my $custname = $cust_pay_batch->cust_main->batch_payment_payname($cust_pay_batch); $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). ' '. |