1 package FS::cust_bill_pkg_discount_void;
2 use base qw( FS::Record );
8 FS::cust_bill_pkg_discount_void - Object methods for cust_bill_pkg_discount_void records
12 use FS::cust_bill_pkg_discount_void;
14 $record = new FS::cust_bill_pkg_discount_void \%hash;
15 $record = new FS::cust_bill_pkg_discount_void { 'column' => 'value' };
17 $error = $record->insert;
19 $error = $new_record->replace($old_record);
21 $error = $record->delete;
23 $error = $record->check;
27 An FS::cust_bill_pkg_discount_void object represents the slice of a customer
28 discount applied to a specific voided line item.
29 FS::cust_bill_pkg_discount_void inherits from FS::Record. The following fields
30 are currently supported:
34 =item billpkgdiscountnum
63 Creates a new example. To add the example to the database, see L<"insert">.
65 Note that this stores the hash reference, not a distinct copy of the hash it
66 points to. You can ask the object for a copy with the I<hash> method.
70 sub table { 'cust_bill_pkg_discount_void'; }
74 Adds this record to the database. If there is an error, returns the error,
75 otherwise returns false.
81 Delete this record from the database.
85 =item replace OLD_RECORD
87 Replaces the OLD_RECORD with this one in the database. If there is an error,
88 returns the error, otherwise returns false.
94 Checks all fields to make sure this is a valid example. If there is
95 an error, returns the error, otherwise returns false. Called by the insert
104 $self->ut_number('billpkgdiscountnum')
105 || $self->ut_foreign_key('billpkgnum', 'cust_bill_pkg_void', 'billpkgnum' )
106 || $self->ut_foreign_key('pkgdiscountnum', 'cust_pkg_discount', 'pkgdiscountnum' )
107 || $self->ut_money('amount')
108 || $self->ut_float('months')
110 return $error if $error;
121 L<FS::Record>, schema.html from the base documentation.