add ut_snumber, fix replacement of records with empty values in non-primary-keyed...
[freeside.git] / FS / FS / cust_pay.pm
index 55f2fc4..e1943ae 100644 (file)
@@ -354,8 +354,7 @@ sub check {
     return $error if $error;
   }
 
-  ''; #no error
-
+  $self->SUPER::check;
 }
 
 =item cust_bill_pay
@@ -386,11 +385,23 @@ sub unapplied {
   sprintf("%.2f", $amount );
 }
 
+=item cust_main
+
+Returns the parent customer object (see L<FS::cust_main>).
+
+=cut
+
+sub cust_main {
+  my $self = shift;
+  qsearchs( 'cust_main', { 'custnum' => $self->custnum } );
+}
+
+
 =back
 
 =head1 VERSION
 
-$Id: cust_pay.pm,v 1.24 2003-05-19 12:00:44 ivan Exp $
+$Id: cust_pay.pm,v 1.26 2003-09-10 10:54:46 ivan Exp $
 
 =head1 BUGS