1 package FS::cust_main_Mixin;
11 FS::cust_main_Mixin - Mixin class for records that contain fields from cust_main
15 package FS::some_table;
17 @ISA = qw( FS::cust_main_Mixin FS::Record );
21 This is a mixin class for records that contain fields from the cust_main table,
22 for example, from a JOINed search. See httemplate/search/ for examples.
30 Given an object that contains fields from cust_main (say, from a JOINed
31 search; see httemplate/search/ for examples), returns the equivalent of the
32 FS::cust_main I<name> method, or "(unlinked)" if this object is not linked to
37 sub cust_unlinked_msg { '(unlinked)'; }
38 sub cust_linked { $_[0]->custnum; }
43 ? FS::cust_main::name($self)
44 : $self->cust_unlinked_msg;
49 Given an object that contains fields from cust_main (say, from a JOINed
50 search; see httemplate/search/ for examples), returns the equivalent of the
51 FS::cust_main I<ship_name> method, or "(unlinked)" if this object is not
59 ? FS::cust_main::ship_name($self)
60 : $self->cust_unlinked_msg;
65 Given an object that contains fields from cust_main (say, from a JOINed
66 search; see httemplate/search/ for examples), returns the equivalent of the
67 FS::cust_main I<contact> method, or "(unlinked)" if this object is not linked
75 ? FS::cust_main::contact($self)
76 : $self->cust_unlinked_msg;
81 Given an object that contains fields from cust_main (say, from a JOINed
82 search; see httemplate/search/ for examples), returns the equivalent of the
83 FS::cust_main I<ship_contact> method, or "(unlinked)" if this object is not
91 ? FS::cust_main::ship_contact($self)
92 : $self->cust_unlinked_msg;
97 Given an object that contains fields from cust_main (say, from a JOINed
98 search; see httemplate/search/ for examples), returns the equivalent of the
99 FS::cust_main I<country_full> method, or "(unlinked)" if this object is not
100 linked to a customer.
107 ? FS::cust_main::country_full($self)
108 : $self->cust_unlinked_msg;
111 =item invoicing_list_emailonly
113 Given an object that contains fields from cust_main (say, from a JOINed
114 search; see httemplate/search/ for examples), returns the equivalent of the
115 FS::cust_main I<invoicing_list_emailonly> method, or "(unlinked)" if this
116 object is not linked to a customer.
120 sub invoicing_list_emailonly {
122 warn "invoicing_list_email only called on $self, ".
123 "custnum ". $self->custnum. "\n"
126 ? FS::cust_main::invoicing_list_emailonly($self)
127 : $self->cust_unlinked_msg;
130 =item invoicing_list_emailonly_scalar
132 Given an object that contains fields from cust_main (say, from a JOINed
133 search; see httemplate/search/ for examples), returns the equivalent of the
134 FS::cust_main I<invoicing_list_emailonly_scalar> method, or "(unlinked)" if
135 this object is not linked to a customer.
139 sub invoicing_list_emailonly_scalar {
141 warn "invoicing_list_email only called on $self, ".
142 "custnum ". $self->custnum. "\n"
145 ? FS::cust_main::invoicing_list_emailonly_scalar($self)
146 : $self->cust_unlinked_msg;
151 Given an object that contains fields from cust_main (say, from a JOINed
152 search; see httemplate/search/ for examples), returns the equivalent of the
153 FS::cust_main I<invoicing_list> method, or "(unlinked)" if this object is not
154 linked to a customer.
156 Note: this method is read-only.
164 ? FS::cust_main::invoicing_list($self)
176 L<FS::cust_main>, L<FS::Record>