% 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::report_batch - Object methods for report_batch records
use FS::report_batch;
$record = new FS::report_batch \%hash;
$record = new FS::report_batch { 'column' => 'value' };
$error = $record->insert;
$error = $new_record->replace($old_record);
$error = $record->delete;
$error = $record->check;
An FS::report_batch object represents an order to send a batch of reports to their respective customers or other contacts. FS::report_batch inherits from FS::Record. The following fields are currently supported:
primary key
The name of the report, which will be the same as the file name (minus any directory names). There's an enumerated set of these; you can't use just any report.
The date the report was sent.
The agentnum to limit the report to, if any.
The start date of the report period.
The end date of the report period.
The user who ordered the report.
Creates a new report batch. To add the record to the database, see "insert".
Adds this record to the database. If there is an error, returns the error, otherwise returns false.
Deletes this record from the database.
Replaces the OLD_RECORD with this one in the database. If there is an error, returns the error, otherwise returns false.
Checks all fields to make sure this is a valid record. If there is an error, returns the error, otherwise returns false. Called by the insert and replace methods.
Takes a hash of PARAMS, determines all contacts who need to receive a report, and sends it to them. On completion, creates and stores a report_batch record. JOB is a queue job to receive status messages.
PARAMS can include:
- reportname: the name of the report (listed in the %sendable_reports hash). Required. - msgnum: the FS::msg_template to use for this report. Currently the content of the template is ignored, but the subject line and From/Bcc addresses are still used. Required. - agentnum: the agent to limit the report to. - beginning, ending: the date range to run the report, as human-readable dates (not unix timestamps).
Hey! The above document had some coding errors, which are explained below:
You forgot a '=back' before '=head1'