% 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::acct_rt_transaction - Object methods for acct_rt_transaction records
use FS::acct_rt_transaction;
$record = new FS::acct_rt_transaction \%hash;
$record = new FS::acct_rt_transaction { 'column' => 'value' };
$error = $record->insert;
$error = $new_record->replace($old_record);
$error = $record->delete;
$error = $record->check;
An FS::acct_rt_transaction object represents an application of time from a rt transaction to a svc_acct. FS::acct_rt_transaction inherits from FS::Record. The following fields are currently supported:
Primary key
The svcnum of the svc_acct to which the time applies
The id of the rt transtaction from which the time applies
The amount of time applied from tickets
The amount of time applied to support services
Creates a new acct_rt_transaction. To add the example 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.
Delete 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 acct_rt_transaction. If there is an error, returns the error, otherwise returns false. Called by the insert and replace methods.
Returns the creator of the RT transaction associated with this object.
Returns the number of the RT ticket associated with this object.
Returns the subject of the RT ticket associated with this object.
Returns the status of the RT ticket associated with this object.
Class method which inserts multiple time applications. Takes a list of FS::acct_rt_transaction objects. If there is an error inserting any application, the entire transaction is rolled back, i.e. all time is applied or none is.
For example:
my $errors = FS::acct_rt_transaction->batch_insert(@transactions);
if ( $error ) {
#success; all payments were inserted
} else {
#failure; no payments were inserted.
}
Possibly the delete method or others.
FS::Record, schema.html from the base documentation.