1 package FS::cust_main_Mixin;
8 FS::cust_main_Mixin - Mixin class for records that contain fields from cust_main
12 package FS::some_table;
14 @ISA = qw( FS::cust_main_Mixin FS::Record );
18 This is a mixin class for records that contain fields from the cust_main table,
19 for example, from a JOINed search. See httemplate/search/ for examples.
27 Given an object that contains fields from cust_main (say, from a JOINed
28 search; see httemplate/search/ for examples), returns the equivalent of the
29 FS::cust_main I<name> method, or "(unlinked)" if this object is not linked to
34 sub cust_unlinked_msg { '(unlinked)'; }
35 sub cust_linked { $_[0]->custnum; }
40 ? FS::cust_main::name($self)
41 : $self->cust_unlinked_msg;
46 Given an object that contains fields from cust_main (say, from a JOINed
47 search; see httemplate/search/ for examples), returns the equivalent of the
48 FS::cust_main I<ship_name> method, or "(unlinked)" if this object is not
56 ? FS::cust_main::ship_name($self)
57 : $self->cust_unlinked_msg;
62 Given an object that contains fields from cust_main (say, from a JOINed
63 search; see httemplate/search/ for examples), returns the equivalent of the
64 FS::cust_main I<contact> method, or "(unlinked)" if this object is not linked
72 ? FS::cust_main::contact($self)
73 : $self->cust_unlinked_msg;
78 Given an object that contains fields from cust_main (say, from a JOINed
79 search; see httemplate/search/ for examples), returns the equivalent of the
80 FS::cust_main I<ship_contact> method, or "(unlinked)" if this object is not
88 ? FS::cust_main::ship_contact($self)
89 : $self->cust_unlinked_msg;
94 Given an object that contains fields from cust_main (say, from a JOINed
95 search; see httemplate/search/ for examples), returns the equivalent of the
96 FS::cust_main I<country_full> method, or "(unlinked)" if this object is not
104 ? FS::cust_main::country_full($self)
105 : $self->cust_unlinked_msg;
108 =item invoicing_list_emailonly
110 Given an object that contains fields from cust_main (say, from a JOINed
111 search; see httemplate/search/ for examples), returns the equivalent of the
112 FS::cust_main I<country_full> method, or "(unlinked)" if this object is not
113 linked to a customer.
117 sub invoicing_list_emailonly {
119 warn "invoicing_list_email only called on $self, ".
120 "custnum ". $self->custnum. "\n";
122 ? FS::cust_main::invoicing_list_emailonly($self)
123 : $self->cust_unlinked_msg;
130 ? FS::cust_main::invoicing_list($self)
142 L<FS::cust_main>, L<FS::Record>