rt# 74031 work in progress
[freeside.git] / FS / FS / svc_realestate.pm
index 27012d0..6579821 100644 (file)
@@ -6,6 +6,7 @@ use warnings;
 use vars qw($conf);
 
 use FS::Record qw(qsearchs qsearch dbh);
+use Tie::IxHash;
 
 $FS::UID::callback{'FS::svc_realestate'} = sub {
   $conf = new FS::Conf;
@@ -43,21 +44,27 @@ Instantiates a new svc_realestate object.
 
 =cut
 
-sub table_info {{
-  name => 'Real estate',
-  name_plural => 'Real estate services',
-  longname_plural => 'Real estate services',
-  display_weight => 100,
-  cancel_weight => 100,
-  fields => {
-    svcnum => 'Service',
+sub table_info {
+  tie my %fields, 'Tie::IxHash',
+    svc_num     => 'Service',
     description => 'Descriptive label',
-    property => 'Real estate property',
-  },
-}}
+    property    => 'Real estate property';
+
+  {
+    name            => 'Real estate',
+    name_plural     => 'Real estate services',
+    longname_plural => 'Real estate services',
+    display_weight  => 100,
+    cancel_weight   => 100,
+    fields          => \%fields,
+  };
+}
 
 sub table {'svc_realestate'};
 
+# todo- In what context is this called? Mimic stub behavior w/o the warning
+sub label { $_[0]->svcnum }
+
 =item search_sql
 
 I have an unfounded suspicion this method serves no purpose in this context