1 package FS::quotation_pkg;
4 use base qw( FS::Record );
5 use FS::Record; # qw( qsearch qsearchs );
11 FS::quotation_pkg - Object methods for quotation_pkg records
15 use FS::quotation_pkg;
17 $record = new FS::quotation_pkg \%hash;
18 $record = new FS::quotation_pkg { 'column' => 'value' };
20 $error = $record->insert;
22 $error = $new_record->replace($old_record);
24 $error = $record->delete;
26 $error = $record->check;
30 An FS::quotation_pkg object represents a quotation package.
31 FS::quotation_pkg inherits from FS::Record. The following fields are currently
73 Creates a new quotation package. To add the quotation package to the database,
76 Note that this stores the hash reference, not a distinct copy of the hash it
77 points to. You can ask the object for a copy with the I<hash> method.
81 sub table { 'quotation_pkg'; }
85 Adds this record to the database. If there is an error, returns the error,
86 otherwise returns false.
90 Delete this record from the database.
92 =item replace OLD_RECORD
94 Replaces the OLD_RECORD with this one in the database. If there is an error,
95 returns the error, otherwise returns false.
99 Checks all fields to make sure this is a valid quotation package. If there is
100 an error, returns the error, otherwise returns false. Called by the insert
109 $self->ut_numbern('quotationpkgnum')
110 || $self->ut_foreign_key('pkgpart', 'part_pkg', 'pkgpart' )
111 || $self->ut_foreign_keyn('locationnum', 'cust_location', 'locationnum' )
112 || $self->ut_numbern('start_date')
113 || $self->ut_numbern('contract_end')
114 || $self->ut_numbern('quantity')
115 || $self->ut_enum('waive_setup', [ '', 'Y'] )
117 return $error if $error;
128 L<FS::Record>, schema.html from the base documentation.