show "Check #" on payment receipts instead of "Billing #"
[freeside.git] / FS / FS / cust_pay.pm
index 358dfdc..03e355f 100644 (file)
@@ -19,7 +19,7 @@ use FS::cust_pay_refund;
 use FS::cust_main;
 use FS::cust_pay_void;
 
-@ISA = qw(FS::Record FS::cust_main_Mixin FS::payinfo_Mixin  );
+@ISA = qw( FS::Record FS::cust_main_Mixin FS::payinfo_Mixin );
 
 $DEBUG = 0;
 
@@ -570,7 +570,11 @@ Returns a name for the payby field.
 
 sub payby_name {
   my $self = shift;
-  FS::payby->shortname( $self->payby );
+  if ( $self->payby eq 'BILL' ) { #kludge
+    'Check';
+  } else {
+    FS::payby->shortname( $self->payby );
+  }
 }
 
 =item gatewaynum
@@ -699,6 +703,7 @@ sub _upgrade_data {  #class method
 
     my $h_cust_pay = $cust_pay->h_search('insert');
     if ( $h_cust_pay ) {
+      next if $cust_pay->otaker eq $h_cust_pay->history_user;
       $cust_pay->otaker($h_cust_pay->history_user);
     } else {
       $cust_pay->otaker('legacy');