Freeside:4:Documentation:Developer/FS/pkg discount Mixin
From Freeside
< Freeside:4:Documentation:Developer | FS
Revision as of 07:27, 18 November 2015 by Jeremyd (talk | contribs) (Edit via perl MediaWiki framework (1.13))
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.