% 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::part_pkg_link - Object methods for part_pkg_link records
use FS::part_pkg_link;
$record = new FS::part_pkg_link \%hash;
$record = new FS::part_pkg_link { 'column' => 'value' };
$error = $record->insert;
$error = $new_record->replace($old_record);
$error = $record->delete;
$error = $record->check;
An FS::part_pkg_link object represents an link from one package definition to another. FS::part_pkg_link inherits from FS::Record. The following fields are currently supported:
primary key
Source package (see FS::part_pkg)
Destination package (see FS::part_pkg)
Link type - currently, "bill" (source package bills a line item from target package), or "svc" (source package includes services from target package), or "supp" (ordering source package creates a target package).
Flag indicating that this subpackage should be felt, but not seen as an invoice line item when set to 'Y'. Not allowed for "supp" links.
Creates a new link. To add the link to the database, see "insert".
Note that this stores the hash reference, not a distinct copy of the hash it points to. You can ask the object for a copy with the hash method.
Adds this record to the database. If there is an error, returns the error, otherwise returns false.
If this is a supplemental package link, inserting it will order the supplemental packages for any main packages that already exist.
Delete this record from the database.
If this is a supplemental package link, deleting it will set pkglinknum = null for any related packages, and set those packages to expire on their next bill date.
Removes any supplemental packages that were created by this link, by canceling them and setting their pkglinknum to null. This should be done in preparation for removing the link itself.
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 link. If there is an error, returns the error, otherwise returns false. Called by the insert and replace methods.
Returns the source part_pkg object (see FS::part_pkg).
Returns the source part_pkg object (see FS::part_pkg).
FS::Record, schema.html from the base documentation.