Freeside:3:Documentation:Developer/FS/pkg discount Mixin
From Freeside
NAME
FS::pkg_discount_Mixin - mixin class for package-discount link objects.
DESCRIPTION
Implements some behavior that's common to cust_pkg_discount and quotation_pkg_discount objects. The only required field is "discountnum", a foreign key to FS::discount.
METHODS
- insert
- Inserts the record. If the 'discountnum' field is -1, this will first create a discount using the contents of the '_type', 'amount', 'percent', 'months', and 'setup' field. The new discount will be disabled, since it's a one-off discount.