[freeside-commits] freeside/FS/FS cust_main.pm, 1.271.2.48, 1.271.2.49
Ivan,,,
ivan at wavetail.420.am
Tue Jun 17 22:23:58 PDT 2008
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv14320
Modified Files:
Tag: FREESIDE_1_7_BRANCH
cust_main.pm
Log Message:
backport cust_main::statuses from HEAD for /elements/tr-select-cust_main-statuses.html
Index: cust_main.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_main.pm,v
retrieving revision 1.271.2.48
retrieving revision 1.271.2.49
diff -u -d -r1.271.2.48 -r1.271.2.49
--- cust_main.pm 17 Jun 2008 03:36:03 -0000 1.271.2.48
+++ cust_main.pm 18 Jun 2008 05:23:56 -0000 1.271.2.49
@@ -4419,13 +4419,13 @@
=cut
use vars qw(%statuscolor);
-%statuscolor = (
+tie %statuscolor, 'Tie::IxHash',
'prospect' => '7e0079', #'000000', #black? naw, purple
'active' => '00CC00', #green
'inactive' => '0000CC', #blue
'suspended' => 'FF9900', #yellow
'cancelled' => 'FF0000', #red
-);
+;
sub statuscolor { shift->cust_statuscolor(@_); }
@@ -4440,6 +4440,20 @@
=over 4
+=item statuses
+
+Class method that returns the list of possible status strings for customers
+(see L<the status method|/status>). For example:
+
+ @statuses = FS::cust_main->statuses();
+
+=cut
+
+sub statuses {
+ #my $self = shift; #could be class...
+ keys %statuscolor;
+}
+
=item prospect_sql
Returns an SQL expression identifying prospective cust_main records (customers
More information about the freeside-commits
mailing list