Difference between revisions of "Freeside:4:Documentation:Developer/FS/pkg discount Mixin"

From Freeside
Jump to: navigation, search
(Edit via perl MediaWiki framework (1.13))
 
(No difference)

Latest revision as of 08:27, 18 November 2015

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.