% include( '/elements/header.html', 'Developer Documentation' ) %> <& /elements/menubar.html, 'Freeside Perl Modules' => $fsurl.'docs/library/FS.html', 'Complete Index' => $fsurl.'docs/library/index.html', &>
FS::cust_main_Mixin - Mixin class for records that contain fields from cust_main
package FS::some_table; use vars qw(@ISA); @ISA = qw( FS::cust_main_Mixin FS::Record );
This is a mixin class for records that contain fields from the cust_main table, for example, from a JOINed search. See httemplate/search/ for examples.
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 name method, or "(unlinked)" if this object is not linked to a customer.
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 name method, or "(unlinked)" if this object is not linked to a customer.
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 ship_name method, or "(unlinked)" if this object is not linked to a customer.
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 contact method, or "(unlinked)" if this object is not linked to a customer.
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 ship_contact method, or "(unlinked)" if this object is not linked to a customer.
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 country_full method, or "(unlinked)" if this object is not linked to a customer.
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 invoicing_list_emailonly method, or "(unlinked)" if this object is not linked to a customer.
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 invoicing_list_emailonly_scalar method, or "(unlinked)" if this object is not linked to a customer.
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 invoicing_list method, or "(unlinked)" if this object is not linked to a customer.
Note: this method is read-only.
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 status method, or "(unlinked)" if this object is not linked to a customer.
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 ucfirst_status method, or "(unlinked)" if this object is not linked to a customer.
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 statuscol method, or "000000" if this object is not linked to a customer.
Class methods that return SQL framents, equivalent to the corresponding FS::cust_main method.
Returns a list of SQL WHERE fragments to search for parameters specified in HASHREF. Valid parameters are:
Emails a notice to the specified customer's contact_email addresses.
If the user has specified "Invoice recipients" on the send e-mail screen, contact_email rows containing the invoice_dest flag will be included. This option is default, if neither 'invoice' nor 'message' are present.
If the user has specified "Message recipients" on the send e-mail screen, contact_email rows containing the message_dest flag will be included.
The selection is indicated by the presence of the text 'message' or 'invoice' within the to_contact_classnum argument.
Parameters:
Queue job for status updates. Required.
Hashref of params to the "search" in FS::Record method. Required.
Message template number (see FS::msg_template). Overrides all of the following options.
From: address
Email Subject:
HTML body
Text body
This field contains a comma-separated list. This list may contain:
- the text "invoice" indicating contacts with invoice_dest flag should be included - the text "message" indicating contacts with message_dest flag should be included - numbers representing classnum id values for email contact classes. If any classnum are present, emails should only be sent to contact_email addresses where contact_email.classnum contains one of these classes. The classnum 0 also includes where contact_email.classnum IS NULL
If neither 'invoice' nor 'message' has been specified, this method will behave as if 'invoice' had been selected
Returns an error message, or false for success.
If any messages fail to send, they will be queued as individual jobs which can be manually retried. If the first ten messages in the job fail, the entire job will abort and return an error.
Mass transfers customers to new agent.
Is Transactionized so entire list transfers or none.
excepts either a list of cust_main objects in the base64 encoded cgi param list or a list of search fields in the base64 encoded cgi param search.
Returns a configuration handle (FS::Conf) set to the customer's locale, if they have one. If not, returns an FS::Conf with no locale.
Localizes a text string (see Locale::Maketext) for the customer's locale, if they have one.
Localizes a date (see Date::Language) for the customer's locale.
FORMAT can be a Date::Format string, or one of these special words:
- "short": the value of the "date_format" config setting for the customer's locale, defaulting to "%x". - "rdate": the same as "short" except that the default has a four-digit year. - "long": the value of the "date_format_long" config setting for the customer's locale, defaulting to "%b %o, %Y".
ESCAPE, if specified, is one of "latex" or "html", and will escape non-ASCII characters and convert spaces to nonbreaking spaces.
If conf unsuspend_balance is set and customer's current balance is beneath the set threshold, unsuspends customer packages.