% 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::pkg_category - Object methods for pkg_category records
use FS::pkg_category;
$record = new FS::pkg_category \%hash;
$record = new FS::pkg_category { 'column' => 'value' };
$error = $record->insert;
$error = $new_record->replace($old_record);
$error = $record->delete;
$error = $record->check;
An FS::pkg_category object represents an package category. Every package class (see FS::pkg_class) has, optionally, a package category. FS::pkg_category inherits from FS::Record. The following fields are currently supported:
primary key (assigned automatically for new package categoryes)
Text name of this package category
Weight
Ticketing Queue
Condense flag for invoice display, empty or 'Y'
Disabled flag, empty or 'Y'
Creates a new package category. To add the package category to the database, see "insert".
Adds this package category to the database. If there is an error, returns the error, otherwise returns false.
Deletes this package category from the database. Only package categoryes with no associated package definitions can be deleted. If there is an error, returns the error, otherwise returns false.
Replaces 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 package category. If there is an error, returns the error, otherwise returns false. Called by the insert and replace methods.
Returns the queue name corresponding with the id from the ticketing_queueid field, or the empty string.