[freeside-commits] freeside/FS/FS cust_main.pm,1.469,1.470
Ivan,,,
ivan at wavetail.420.am
Thu Oct 29 11:38:10 PDT 2009
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv22071/FS/FS
Modified Files:
cust_main.pm
Log Message:
customer classification, RT#6376
Index: cust_main.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_main.pm,v
retrieving revision 1.469
retrieving revision 1.470
diff -u -d -r1.469 -r1.470
--- cust_main.pm 29 Oct 2009 01:08:32 -0000 1.469
+++ cust_main.pm 29 Oct 2009 18:38:08 -0000 1.470
@@ -2307,6 +2307,53 @@
qsearchs( 'agent', { 'agentnum' => $self->agentnum } );
}
+=item cust_class
+
+Returns the customer class, as an FS::cust_class object, or the empty string
+if there is no customer class.
+
+=cut
+
+sub cust_class {
+ my $self = shift;
+ if ( $self->classnum ) {
+ qsearchs('cust_class', { 'classnum' => $self->classnum } );
+ } else {
+ return '';
+ }
+}
+
+=item categoryname
+
+Returns the customer category name, or the empty string if there is no customer
+category.
+
+=cut
+
+sub categoryname {
+ my $self = shift;
+ my $cust_class = $self->cust_class;
+ $cust_class
+ ? $cust_class->categoryname
+ : '';
+}
+
+=item classname
+
+Returns the customer class name, or the empty string if there is no customer
+class.
+
+=cut
+
+sub classname {
+ my $self = shift;
+ my $cust_class = $self->cust_class;
+ $cust_class
+ ? $cust_class->classname
+ : '';
+}
+
+
=item bill_and_collect
Cancels and suspends any packages due, generates bills, applies payments and
More information about the freeside-commits
mailing list