1 package FS::cust_bill_pkg_discount_void;
4 use base qw( FS::Record );
5 use FS::Record; # qw( qsearch qsearchs );
6 use FS::cust_bill_pkg_void;
7 use FS::cust_pkg_discount;
11 FS::cust_bill_pkg_discount_void - Object methods for cust_bill_pkg_discount_void records
15 use FS::cust_bill_pkg_discount_void;
17 $record = new FS::cust_bill_pkg_discount_void \%hash;
18 $record = new FS::cust_bill_pkg_discount_void { '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_bill_pkg_discount_void object represents the slice of a customer
31 discount applied to a specific voided line item.
32 FS::cust_bill_pkg_discount_void inherits from FS::Record. The following fields
33 are currently supported:
37 =item billpkgdiscountnum
66 Creates a new example. To add the example to the database, see L<"insert">.
68 Note that this stores the hash reference, not a distinct copy of the hash it
69 points to. You can ask the object for a copy with the I<hash> method.
73 sub table { 'cust_bill_pkg_discount_void'; }
77 Adds this record to the database. If there is an error, returns the error,
78 otherwise returns false.
84 Delete this record from the database.
88 =item replace OLD_RECORD
90 Replaces the OLD_RECORD with this one in the database. If there is an error,
91 returns the error, otherwise returns false.
97 Checks all fields to make sure this is a valid example. If there is
98 an error, returns the error, otherwise returns false. Called by the insert
107 $self->ut_number('billpkgdiscountnum')
108 || $self->ut_foreign_key('billpkgnum', 'cust_bill_pkg_void', 'billpkgnum' )
109 || $self->ut_foreign_key('pkgdiscountnum', 'cust_pkg_discount', 'pkgdiscountnum' )
110 || $self->ut_money('amount')
111 || $self->ut_float('months')
113 return $error if $error;
124 L<FS::Record>, schema.html from the base documentation.