X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fpay_batch%2FRBC.pm;h=c4388d156fee1cfd922d78e726d7c1bd264e8b7a;hb=345dfc58a6230d9bc5e88c063a3fc14f3647e68d;hp=14b9993fc712230f0d9377ecc779be82efcf3ee4;hpb=a2ae3a1d66eed2d794c7da44f31712b87ec3bfa1;p=freeside.git diff --git a/FS/FS/pay_batch/RBC.pm b/FS/FS/pay_batch/RBC.pm index 14b9993fc..c4388d156 100644 --- a/FS/FS/pay_batch/RBC.pm +++ b/FS/FS/pay_batch/RBC.pm @@ -177,11 +177,16 @@ $name = 'RBC'; ## set custname to business name if business checking or savings account is used otherwise leave as first and last name. my $custname = $cust_pay_batch->cust_main->first . ' ' . $cust_pay_batch->cust_main->last; $custname = $cust_pay_batch->cust_main->company - if (($cust_pay_batch->{Hash}->{paytype} eq "Business checking" || $cust_pay_batch->{Hash}->{paytype} eq "Business savings") && $cust_pay_batch->cust_main->company); + 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). ' '. @@ -225,5 +230,10 @@ $name = 'RBC'; }, ); +## this format can handle credit transactions +sub can_handle_credits { + 1; +} + 1;