diff options
| author | Christopher Burger <burgerc@freeside.biz> | 2017-05-18 11:58:26 -0400 |
|---|---|---|
| committer | Christopher Burger <burgerc@freeside.biz> | 2018-07-16 09:13:29 -0400 |
| commit | 639e88d37ab33deeea4db7c8d1f15e8967f1826f (patch) | |
| tree | 77f462c06c68848d73a6a9b2a13f599d0d7de6cd /FS/FS | |
| parent | f41ba7540d45187dac6dd147bab6bb26b8a4956b (diff) | |
RT# 74435 - Adding option to allow refunds using electronic check batch with RBC format.
Conflicts:
FS/FS/Schema.pm
FS/FS/cust_main/Billing_Batch.pm
httemplate/view/cust_main/menu.html
Diffstat (limited to 'FS/FS')
| -rw-r--r-- | FS/FS/Schema.pm | 1 | ||||
| -rw-r--r-- | FS/FS/cust_main.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 1567b0030..699143239 100644 --- a/FS/FS/Schema.pm +++ b/FS/FS/Schema.pm @@ -1909,6 +1909,7 @@ sub tables_hashref { 'amount', @money_type, '', '', 'status', 'varchar', 'NULL', $char_d, '', '', 'error_message', 'varchar', 'NULL', $char_d, '', '', + 'paycode', 'varchar', 'NULL', $char_d, '', '', ], 'primary_key' => 'paybatchnum', 'unique' => [], diff --git a/FS/FS/cust_main.pm b/FS/FS/cust_main.pm index 7d913b955..d4214d1c8 100644 --- a/FS/FS/cust_main.pm +++ b/FS/FS/cust_main.pm @@ -2790,7 +2790,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{$_}); } @@ -2817,6 +2817,7 @@ sub batch_card { 'exp' => $options{paydate} || $self->paydate, 'payname' => $options{payname} || $self->payname, '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 142c50b79..05ee4e501 100644 --- a/FS/FS/pay_batch/RBC.pm +++ b/FS/FS/pay_batch/RBC.pm @@ -180,8 +180,13 @@ $name = 'RBC'; if (($cust_pay_batch->cust_main->paytype eq "Business checking" || $cust_pay_batch->cust_main->paytype eq "Business savings") && $cust_pay_batch->cust_main->company); $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). ' '. |
