% 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::Table - Tables of report data
See the more specific report objects, currently only FS::Report::Table::Monthly and FS::Report::Table::Daily.
The common interface for an observable named 'foo' is:
$report->foo($startdate, $enddate, $agentnum, %options)
This returns a scalar value for foo, over the period from $startdate to $enddate, limited to agent $agentnum, subject to options in %opt.
- cust_classnum: limit to this customer class - pkg_classnum: limit to customers with a package of this class. If this is an arrayref, it's an ANY match. - refnum: limit to this advertising source - indirect: boolean; limit to customers that have a referral_custnum that matches the advertising source
'classnum': limit to this package class.
'classnum': limit to this package class.
'charges': limit the type of charges included (setup, recur, usage, discount, taxes). Should be a string containing one or more of 'S', 'R', or 'U'; or 'D' or 'T' (discount and taxes should not be combined with the others.) If unspecified, defaults to 'SRU'.
'classnum': limit to this package class.
'use_override': for line items generated by an add-on package, use the class of the add-on rather than the base package.
'average_per_cust_pkg': divide the result by the number of distinct packages.
'distribute': for non-monthly recurring charges, ignore the invoice date. Instead, consider the line item's starting/ending dates. Determine the fraction of the line item duration that falls within the specified interval and return that fraction of the recurring charges. This is somewhat experimental.
'project': enable if this is a projected period. This is very experimental.
Most arguments as for cust_bill_pkg,
plus:
'custnum': limit to this customer
'cost': if true, return total recur costs instead
Most arguments as for cust_bill_pkg,
plus:
'usageclass': limit to this usage class number.
'custnum': limit to this customer
'cost': if true, return total usage costs instead
Arguments: agentnum, refnum, cust_classnum
Arguments: agentnum, refnum, cust_classnum
- refnum: Limit to customers with this advertising source. - classnum: Limit to packages with this class. - towernum: Limit to packages that have a broadband service with this tower. - zip: Limit to packages with this service location zip code.
Except for zip, any of these can be an arrayref to allow multiple values for the field.
Sets up for future projection of all observables on the report. Currently this is limited to 'cust_bill_pkg'.
Generates data for the next period of projection. This will be called for sequential periods where the END of one equals the START of the next (with no gaps).
Internal method: creates a temporary table relating pkgnums to towernums. A (pkgnum, towernum) record indicates that this package once had a svc_broadband service which, as of its last insert or replace_new history record, had a sectornum associated with that towernum.
This is expensive, so it won't be done more than once an hour. Historical data about package churn shouldn't be changing in realtime anyway.
Documentation.
FS::Report::Table::Monthly, reports in the web interface.
Hey! The above document had some coding errors, which are explained below:
You forgot a '=back' before '=head1'