[freeside-commits] freeside/FS/FS cust_main_Mixin.pm,1.5,1.6
Ivan,,,
ivan at wavetail.420.am
Tue Sep 15 13:44:02 PDT 2009
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv14582/FS/FS
Modified Files:
cust_main_Mixin.pm
Log Message:
fix display_custnum on reports, RT#
Index: cust_main_Mixin.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_main_Mixin.pm,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- cust_main_Mixin.pm 3 Feb 2007 12:07:16 -0000 1.5
+++ cust_main_Mixin.pm 15 Sep 2009 20:44:00 -0000 1.6
@@ -26,7 +26,12 @@
=over 4
-=item name
+=cut
+
+sub cust_unlinked_msg { '(unlinked)'; }
+sub cust_linked { $_[0]->custnum; }
+
+=item display_custnum
Given an object that contains fields from cust_main (say, from a JOINed
search; see httemplate/search/ for examples), returns the equivalent of the
@@ -35,8 +40,21 @@
=cut
-sub cust_unlinked_msg { '(unlinked)'; }
-sub cust_linked { $_[0]->custnum; }
+sub display_custnum {
+ my $self = shift;
+ $self->cust_linked
+ ? FS::cust_main::display_custnum($self)
+ : $self->cust_unlinked_msg;
+}
+
+=item name
+
+Given an object that contains fields from cust_main (say, from a JOINed
+search; see httemplate/search/ for examples), returns the equivalent of the
+FS::cust_main I<name> method, or "(unlinked)" if this object is not linked to
+a customer.
+
+=cut
sub name {
my $self = shift;
More information about the freeside-commits
mailing list