show credit balance on invoices, #11564
[freeside.git] / FS / FS / part_export.pm
index 588606d..c0d3c54 100644 (file)
@@ -50,6 +50,8 @@ fields are currently supported:
 
 =item exportnum - primary key
 
+=item exportname - Descriptive name
+
 =item machine - Machine name 
 
 =item exporttype - Export type
@@ -159,6 +161,7 @@ sub check {
   my $self = shift;
   my $error = 
     $self->ut_numbern('exportnum')
+    || $self->ut_textn('exportname')
     || $self->ut_domain('machine')
     || $self->ut_alpha('exporttype')
   ;
@@ -174,6 +177,17 @@ sub check {
   $self->SUPER::check;
 }
 
+=item label
+
+Returns a label for this export, "exportname||exportype (machine)".  
+
+=cut
+
+sub label {
+  my $self = shift;
+  ($self->exportname || $self->exporttype ). ' ('. $self->machine. ')';
+}
+
 #=item part_svc
 #
 #Returns the service definition (see L<FS::part_svc>) for this export.