% 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::h_cust_pkg - Historical record of customer package changes
An FS::h_cust_pkg object represents historical changes to packages. FS::h_cust_pkg inherits from FS::h_Common and FS::cust_pkg.
Like FS::cust_pkg::search, but adapted for searching historical records. Takes the additional parameter "date", which is the timestamp to perform the search "as of" (i.e. search the most recent insert or replace_new record for each pkgnum that is not later than that date).
Returns SQL fragments to do queries related to "package churn". STATUS is one of "active", "setup", "cancel", "susp", or "unsusp". These do NOT correspond directly to package statuses. START and END define a date range.
- active: limit to packages that were active on START. END is ignored. - setup: limit to packages that were set up between START and END, except those created by package changes. - cancel: limit to packages that were canceled between START and END, except those changed into other packages. - susp: limit to packages that were suspended between START and END. - unsusp: limit to packages that were unsuspended between START and END.
The logic of these may change in the future, especially with respect to package changes. Watch this space.
Returns a list of: - a fragment usable as a FROM clause (without the keyword FROM), in which the package table is named or aliased to 'cust_pkg' - one or more conditions to include in the WHERE clause
Returns a qsearch hash for the instantaneous state of the cust_pkg table on DATE.
Currently accepts no restrictions; use it in a subquery if you want to limit or sort the output. (Restricting within the query is problematic.)
Returns a statement for determining the status of packages on a particular past date.
churn_fromwhere_sql and as_of_sql fail on MySQL.
FS::cust_pkg, FS::h_Common, FS::Record, schema.html from the base documentation.
Hey! The above document had some coding errors, which are explained below:
You forgot a '=back' before '=head1'
'=item' outside of any '=over'
You forgot a '=back' before '=head1'