RT# 77792 - Created method to decide if batch payname should be name on card or perso...
[freeside.git] / FS / FS / pay_batch / RBC.pm
index 1577a7f..dea89cd 100644 (file)
@@ -175,9 +175,7 @@ $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);
+    my $custname = $cust_pay_batch->cust_main->batch_payment_payname($cust_pay_batch);
 
     $i++;