Invoice

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

Invoices are where the accounting side of onCourse meets the training and delivery parts of the database. Invoices can be created to any contact. The financial data on them is immutable, that is the dates and dollar amounts cannot be modified after creation. Invoice lines may join to enrolments or products for sale. Negative invoices represent credit notes.

 
        public 
        Invoice
     {
}

Instance methods

attachDocument(doc)

Document doc

the document to be attached to this invoice

Returns def

Documentation not yet available

enrolmentsPerStudent()

Builds a list of enrolments from the invoice lines mapped per student.

Returns Not null Map<Student, Set<Enrolment>>

a map of enrolments (values as Collection) per student (keys)

amountOwing

Returns Not null Money

the amount still owing on this invoice

amountPaid

Returns Money

the amount already paid against this invoice

authorisedRebillingCard

When a credit card is used to pay for an invoice, a reference is stored to allow a subsequent payment to be processed or a refund issued. This reference points to the paymentIn record which stores the reference for that card. Note that onCourse never stores the actual complete card details since that would cause a breach of PCI DSS. This reference can only be used to process another payment or refund between this card and the same merchant.

Returns Nullable PaymentIn

paymentIn record with a credit card reference attacehd

billToAddress

Returns String

billing address for this invoice

confirmationStatus

A status which records whether the invoice email has already been sent or is disabled.

Returns Not null ConfirmationStatus

status indicating whether a confirmation email has been sent

contact

This is the contact to whom the invoice was issued. They are liable for the debt this invoice represents. Note that the invoice contact might not be the same contact as the person enrolled in classes linked to invoice lines.

Returns Not null Contact

to whom the invoice was issued

corporatePassUsed

Returns Not null CorporatePass

CorporatePass record if purchase which resulted in creation of this invoice was made using CorporatePass, null if not

createdByUser

The user who created this invoice, or null if it was created through a web purchase.

Returns Nullable SystemUser

internal user who created this invoice

createdOn

Returns Date

the date and time this record was created

customerReference

Some arbitrary piece of text such as a PO number or customer reference which is displayed on the printed invoice.

Returns String

Documentation not yet available

dateDue

TODO: how does this work with payment plans?

Returns Not null LocalDate

the date on which this invoice amount falls due

debtorsAccount

Returns Not null Account

Documentation not yet available

description

The invoice description might be shown on printed reports or in emails.

Returns String

invoice desciption text

documents

Returns Not null List<Document>

The list of documents attached to this invoice

invoiceDate

Returns Not null LocalDate

date when this invoice was created

invoiceDueDates

Returns Not null List<InvoiceDueDate>

all the due dates (payment plan) for this invoice

invoiceLines

Returns Not null List<InvoiceLine>

list of invoice line records linked to this invoice

invoiceNumber

Returns Not null Long

unique invoice number

modifiedOn

Returns Date

the date and time this record was modified

notes

Returns String

concatenated private notes

overdue

The invoice overdue amount is calculated based on not just the invoice total, but the whole payment plan and each due date.

Returns Not null Money

Current overdue amount

paymentInLines

Follow this join to find all payments made against this invoice. Remember that onCourse supports multiple payments against one invoice and also partial payments against an invoice, so you can follow this join to many payments and some of those payment may also link to other invoices.

Returns Not null List<PaymentInLine>

all payementInLines against this invoice

paymentLines

Get a list of paymentInLines and paymentOutLines linked to this invoice

Returns Not null List<PaymentLineInterface>

all paymentLines against this invoice

paymentOutLines

If this invoice was a credit note, then a PaymentOut (or several) might be linked against it.

Returns Not null List<PaymentOutLine>

all payementOutLines against this invoice

printHeading

Prints 'Tax Invoice' or 'Credit Note' depending on the amount owing on this invoive

Returns def

invoice print heading

publicNotes

These notes will be printed on the invoice and displayed to the recipient in emails and other places.

Returns String

public notes attached to invoice

shippingAddress

Returns String

shipping address for this invoice

source

Payment can be made in onCourse (office) or from the onCourse website (web). The invoice source is bound to the same enum as for payments.

Returns Not null PaymentSource

where the payment for this invoice was made

total

Returns Money

the total without tax

totalIncTax

Returns Money

the total of this invoice including tax.

totalTax

Returns Money

the total amount of tax included in this invoice

unpaidInvoiceDueDates

Returns def

all unpaid InvoiceDueDates for this Invoice

hasNonTaxableInvoiceLines()

Returns def

Documentation not yet available

hasTaxableInvoiceLines()

Returns def

Documentation not yet available