1 package FS::cust_pkg_reason;
5 use FS::Record qw( qsearch qsearchs );
11 FS::cust_pkg_reason - Object methods for cust_pkg_reason records
15 use FS::cust_pkg_reason;
17 $record = new FS::cust_pkg_reason \%hash;
18 $record = new FS::cust_pkg_reason { 'column' => 'value' };
20 $error = $record->insert;
22 $error = $new_record->replace($old_record);
24 $error = $record->delete;
26 $error = $record->check;
30 An FS::cust_pkg_reason object represents a relationship between a cust_pkg
31 and a reason, for example cancellation or suspension reasons.
32 FS::cust_pkg_reason inherits from FS::Record. The following fields are
37 =item num - primary key
56 Creates a new cust_pkg_reason. To add the example to the database, see
59 Note that this stores the hash reference, not a distinct copy of the hash it
60 points to. You can ask the object for a copy with the I<hash> method.
64 sub table { 'cust_pkg_reason'; }
68 Adds this record to the database. If there is an error, returns the error,
69 otherwise returns false.
75 Delete this record from the database.
79 =item replace OLD_RECORD
81 Replaces the OLD_RECORD with this one in the database. If there is an error,
82 returns the error, otherwise returns false.
88 Checks all fields to make sure this is a valid cust_pkg_reason. If there is
89 an error, returns the error, otherwise returns false. Called by the insert
98 $self->ut_numbern('num')
99 || $self->ut_number('pkgnum')
100 || $self->ut_number('reasonnum')
101 || $self->ut_text('otaker')
102 || $self->ut_numbern('date')
104 return $error if $error;
113 Here be termites. Don't use on wooden computers.
117 L<FS::Record>, schema.html from the base documentation.