Discount

Contents

General
CloudAssessSpec
CollegePreferenceService
CsvBuilder
DocumentService
DocumentSpec
EmailSpec
ExportSpec
MailchimpSpec
Mask
Money
Preferences
QualityResultSpec
ReportSpec
SmsSpec
SystemUserService
Database objects
ACLAccessKey
ACLRole
Account
AccountTransaction
Application
Article
ArticleProduct
Assessment
AssessmentClass
AssessmentSubmission
AttachmentData
Attendance
Banking
Certificate
ClassCost
ConcessionType
Contact
ContactRelation
ContactRelationType
CorporatePass
CorporatePassCourseClass
CorporatePassProduct
Country
Course
CourseClass
CourseClassTutor
CourseModule
CustomField
CustomFieldType
DefinedTutorRole
Discount
DiscountConcessionType
DiscountCourseClass
DiscountMembership
DiscountMembershipRelationType
Document
DocumentVersion
EmailTemplate
Enrolment
EntityRelation
ExportTemplate
Field
FieldConfiguration
FieldConfigurationScheme
FieldHeading
FundingSource
FundingUpload
FundingUploadOutcome
Import
Invoice
InvoiceDueDate
InvoiceLine
InvoiceLineDiscount
Language
Membership
MembershipProduct
Message
MessagePerson
Module
Note
Outcome
PayLine
PayRate
PaymentIn
PaymentInLine
PaymentMethod
PaymentOut
PaymentOutLine
Payslip
Preference
PriorLearning
Product
ProductItem
Qualification
Report
ReportOverlay
Room
SavedFind
Script
Session
SessionModule
Site
Student
StudentConcession
Survey
SystemUser
Tag
TagRelation
TagRequirement
Tax
TrainingPackage
Tutor
TutorAttendance
UnavailableRule
Voucher
VoucherPaymentIn
VoucherProduct
WaitingList
Enumerations
AccountTransactionType
AccountType
ApplicationStatus
AttachmentInfoVisibility
AttachmentSpecialType
AttendanceType
AvetmissStudentDisabilityType
AvetmissStudentEnglishProficiency
AvetmissStudentIndigenousStatus
AvetmissStudentLabourStatus
AvetmissStudentPriorEducation
AvetmissStudentSchoolLevel
ClassCostFlowType
ClassCostRepetitionType
ClassFundingSource
ClientIndustryEmploymentType
ClientOccupationIdentifierType
ConfirmationStatus
ContactDuplicateStatus
CourseClassAttendanceType
CourseEnrolmentType
CreditCardType
CreditLevel
CreditProviderType
CreditType
DeliveryMode
DeliverySchedule
DiscountType
EnrolmentStatus
EnrolmentVETFeeHelpStatus
EntityRelationType
ExpiryType
FieldConfigurationType
InvoiceType
KeyCode
KeyCollision
MessageStatus
MessageType
MoneyRounding
NodeSpecialType
OutcomeStatus
PaymentSource
PaymentStatus
PaymentType
PayslipStatus
PostcodeType
ProductStatus
ProductType
QualificationType
RecognitionOfPriorLearningIndicator
StudentCitizenship
StudentStatusForUnitOfStudy
StudyReason
SurveyTypeSource
SurveyVisibility
TriggerType
UsiStatus
VETFeeExemptionType
VoucherPaymentStatus

A discount represents a set of rules used to determine whether a different price can be applied to an enrolments. Discounts can be negative (in which case they represent a surcharge).

 
        public 
        Discount
     {
}

Instance methods

addByDefault

Returns Not null Boolean

true if discount is added by default when creating a new class

code

Returns String

promotion code for this discount

cosAccount

Returns Nullable Account

cos account for this discount

createdOn

Returns Date

the date and time this record was created

discountConcessionTypes

Returns Not null List<DiscountConcessionType>

list of concession types linked to this discount

discountCourseClasses

Returns Not null List<DiscountCourseClass>

list of classes linked to this discount, discount can be applied only if enrolling to classes from this list

discountDollar

Returns Money

discount's dollar value

discountMax

Maximum discount value sets a cap on the discount value which can be applied. For example, if invoice line amount is $100, discount is 30% and maximum discount value is set to $10, only $10 discount will be applied.

Returns Money

maximum value for this discount

discountMemberships

Returns Not null List<DiscountMembership>

list of memberships linked to this discount

discountMin

Minimum discount value sets a minimal discount value for this discount For example, if invoice line amount is $100, discount is 10% and minimum discount value is set to $20, then $20 discount will be applied instead of $10.

Returns Money

minimum value for this discount

discountPercent

Returns BigDecimal

discount's percentage

discountType

Returns Not null DiscountType

type of discount: percent, dollar value or fee override

discountedEnrolments

Get all the active enrolments which used this discount and the amount of the discount isn't $0

Returns Not null List<Enrolment>

a list of enrolments

getDiscountedEnrolments(from, to)

Get all the active enrolments which used this discount and the amount of the discount isn't $0 Filter that list of enrolments to a date range. If you pass a null date in either option, then that part of the filter is not applied. The date range applies to the invoice creation date, not the enrolment date.

Date from

the starting date of the range. This date will automatically be extended to the previous midnight

Date to

the ending date of the range. This date will automatically be extended to the next midnight

Returns Not null List<Enrolment>

a list of enrolments

hideOnWeb

Returns Not null Boolean

true if this discount is hidden from promotions list on website

isAvailableOnWeb

Returns Not null Boolean

true if discount is available to students enrolling on website

modifiedOn

Returns Date

the date and time this record was modified

name

Returns Not null String

the name of the discount. Will be displayed on the website as well.

predictedStudentsPercentage

Returns Not null BigDecimal

predicted percentage of students using this discount

publicDescription

Returns String

a description which may be displayed to students

rounding

After the discount is applied, different rounding options can be applied to the resulting amount.

Returns Not null MoneyRounding

rounding mode for this discount

studentAge

The discount can be limited to students up to a certain age. TODO: why does this return String?

Returns String

Maximum student age in years

studentEnrolledWithinDays

Returns Integer

number of days from last enrolment student should not exceed to receive the discount

studentPostcode

The discount can be limited to students who live in certain postcodes. If more than one postcode is needed, separate them with commas ",".

Returns String

one or more postcodes for the student's address

studentPostcodes

Returns Not null List<String>

list of postcodes whose residents are eligible for this discount

getTotalDiscountExTax(from, to)

Get the total amount of discount (ex tax) applied to all invoices created in the date range. If you pass a null date in either option, then that part of the filter is not applied.

Date from

the starting date of the range. This date will automatically be extended to the previous midnight

Date to

the ending date of the range. This date will automatically be extended to the next midnight

Returns Not null def

total amount of discount ex tax

getTotalDiscountIncTax(from, to)

Get the total amount of discount (including tax) applied to all invoices created in the date range. If you pass a null date in either option, then that part of the filter is not applied.

Date from

the starting date of the range. This date will automatically be extended to the previous midnight

Date to

the ending date of the range. This date will automatically be extended to the next midnight

Returns Not null Money

total amount of discount inc tax

validFrom

If this value is null the discount doesn't have a start date.

Returns Date

the date before which the discount will not be applied

validTo

If this value is null the discount doesn't have an expiry date.

Returns Date

the date after which the discount will not be applied

isStudentEligibile(student)

Determines if the given student is eligible for this Discount. Note that this checks just the student attributes and not whether enrolment, time or other restrictions of the discount might prevent its application.

Student student

student

Returns boolean

true if student is eligible

Static methods

Discount.applicableDiscounts(courseClass)

CourseClass courseClass

class to check

Returns List<Discount>

list of applicable discounts