Releasing Invoices
Overview
Invoices are released to allow a draft or edited invoice to move into authorisation.
Process
The CCINV—Invoice application is used to release invoices.
Checking the State of the Invoice and Associated Jobs
Only invoices with an Invoice Status of Draft or Edited can be released. If the invoice's Invoice Status is something other than Draft or Edited, then the invoice cannot be released. However, releasing of an invoice is also dependent upon the associated jobs' Workflow Status. For any job associated with the invoice, the job's type and workflow status, and whether the client permits the invoicing of incomplete jobs, determines whether an invoice can be released, as follows:
|
Associated job's Job Type |
Associated job's Workflow Status |
Associated client's Invoice Incomplete Jobs |
Invoice can be released? |
|---|---|---|---|
|
Proposal |
Registered, Not Started, Started, Analysed or Released |
N/A |
No |
|
Proposal |
Completed |
N/A |
Yes |
|
Proposal |
Finalised |
N/A |
No |
|
Proposal |
Cancelled |
N/A |
No |
|
Production |
Registered, Not Started, Started, Analysed or Released |
No |
No |
|
Production |
Registered, Not Started, Started, Analysed or Released |
Yes |
Yes |
|
Production |
Completed |
N/A |
Yes |
|
Production |
Finalised |
N/A |
No |
|
Production |
Cancelled |
No |
No |
|
Production |
Cancelled |
Yes |
Yes |
In any case where the invoice cannot be released due to these rules, then an error is raised: The invoice cannot be released as it contains a job that is not completed.
Setting the Exchange Rate to the Laboratory's Currency
The invoice cannot be released if an exchange rate cannot be found from the invoice's Currency to the laboratory's Currency, as configured in the MSECUR—Currency application.
Updating WIP and Estimate Amounts before Release
Ensure that WIP and estimate amounts are up to date prior to releasing an invoice. WIP and estimate amounts can also be updated in the CCFNRP—Financial Report application.
Actioning the Invoice Release
Multiple invoices or a single invoice can be released at a time.
Actioning an invoice release launches the Send Invoice dialog box.
-
Where the AUTO_DISTRIBUTE_INVOICES application preference is checked, then Email and Print are selected by default. Email To defaults to the email address of the contact code on the invoice.
-
If the INVOICE_DEFAULT_DEVICE application preference is defined and contains a Device Code, and no default device is attached to the report template in use, when entering distribution details for an invoice or credit note, then the printer defaults to this device.
-
If the INVOICE_COPIES application preference is defined, when entering distribution details for an invoice, then the number of copies for printing defaults to this number.
The task to release invoices and perform any document distribution can be sent to the system batch queue.
-
A CCBINVGEN system batch job is created in the system batch queue which generates the invoice documents. Refer to the Set the BATCH_QUEUE_TASK_PRIORITY Preference activity. The system batch job history and the execution steps are visible for an historical job in the History tab or by reviewing the system batch job execution. Refer to Maintaining Schedules and Batch Job Executions.
-
The invoice document is generated using the invoice's Invoice Template. The invoice document's filename is generated from the invoice template's Filename Syntax Code. The invoice's File is updated with the invoice document's filename.
-
The invoice document is distributed, as required. However, where the Email is selected but there is no Email To or Email CC supplied and the EMAIL_BCC application preference is not defined or does not contain a valid email address, then no error is raised and no batch queue email job is created, and where the Print is selected but there is no Printer or Number of Copies specified, then no error is raised and no batch queue print job is created.
Release draft or edited invoices
When an invoice is released, the invoice is given an Invoice Status of Released, and its prices are no longer taken from the pricing engine but are 'as is' in the invoice line items, nor can they be edited.
When an invoice is released, whether it be an invoice comprised of a single job invoice or multiple job invoices in combined or merged mode, then the Release service ensures that surcharges, rebates and taxes display in the invoice's Locale. Where there is no I18N translation in the price adjustment or tax's Invoice Note, then the note falls back to the system locale.
Notes:
There is no actual definition of the system locale but rather the presumption that the primary entries in the price schedules for the Base Price Note and Block Price Note are extracted for the job cost WIP and estimate and WIP reports. For most users this is the en_US locale.
If WIP and estimate job cost reports are to include locale-based notes, then the report templates need to be modified to locate the alternative locale strings from the price schedules instead of using the default notes that are stored in the job cost WIP and estimate database views.
When an invoice is released, the invoice is generated using the invoice's Currency. Where the invoice's Currency is the same as the laboratory's Currency, then the invoice's exchange rate (to the laboratory's currency) is set to 1. Where the invoice's Currency is different to the laboratory's Currency, then the exchange rate is set to the latest exchange rate between the currencies.
Where surcharges and rebates are written as invoice line items, then the line item contains the source job invoice's Invoice Sequence. This is pertinent where the invoice comprises multiple job invoices grouped by job.
Invoice Numbering upon Release
When a proposal invoice is released, if a syntax with the Syntax Code of PROPOSAL_SYNTAX_CODE exists, then the syntax is used to generate the proposal invoice's invoice number. If this syntax does not exist then the proposal invoice's invoice number is determined using the laboratory's Proposal Invoice Pattern and Proposal Invoice Last Used Number. This ensures that proposal invoices contain no gaps in their numbering, given that, after release, a proposal invoice can only progress to a final state or be cancelled, and cannot be deleted.
When a production invoice is released, if a syntax with the Syntax Code of INVOICE_SYNTAX_CODE exists, then the syntax is used to generate the production invoice's invoice number. If this syntax does not exist then the production invoice's invoice number is determined using the laboratory's Invoice Number Pattern and Invoice Last Used Number. This ensures that production invoices contain no gaps in their numbering, given that, after release, a production invoice can only progress to a final state or be cancelled, and cannot be deleted.
Maintaining Job and Sample Invoice Status
For each job associated with the released invoice:
- If the job's First Invoiced Date is empty, then the job's First Invoiced Date is set to the current system date-time and the job's First Invoiced By is set to the current user. (Note that the job's First Invoiced Date was set if an invoice document was generated earlier.)
- The job's Last Invoiced Date is set to current system date-time and the job's Last Invoiced By is set to the current user.
Similarly, for each sample associated with the invoice:
- The sample's Last Invoiced Date is set to the current system date-time and the sample's Last Invoiced By is set to the current user.
- The sample's Last Invoice Number is set to the invoice's Invoice Number.
If any job invoice in the released invoice is linked to a Quote Code, then the quote's First Used Date is set to current system date-time if it is empty, and the quote' Last Used Date is set to current system date-time.
Conditions for Distributing Invoices
When an invoice is distributed, email settings are set as follows.
If a syntax exists that is in scope and has a Syntax Type of Report Request and a Syntax Code of EMAIL_SUBJECT_TEXT preference, when entering distribution details for a report, then the email subject body contains the text generated by the syntax. Note that this syntax should evaluate only to a single-line subject.
If a syntax exists that is in scope and has a Syntax Type of Report Request and a Syntax Code of EMAIL_MESSAGE_TEXT preference, when entering distribution details for a report, then the email message body contains the text generated by the syntax.
If the EMAIL_BCC application preference is defined and contains a valid email address, when the generated reports are emailed, then the BCC email address is set to this email address.
If the EMAIL_ZIP_ATTACHMENTS application preference is defined and selected, when the generated reports are emailed, then one zip file containing all of the generated reports is emailed as an attachment to the email. If the EMAIL_ZIP_ATTACHMENTS application preference is not defined, or is defined and cleared, when the generated reports are emailed, then multiple attachments are added to the email/s.
Restrictions on Released Invoices
When an invoice is in a release state, its template can be updated.
Once an invoice is released, it cannot be edited nor changed in any way other than updating the Invoice Report Template. A released invoice can be authorised or cancelled. The release state is not reversible.
Conditions on Authorising Invoices Automatically
If the laboratory's Auto-Authorise Invoices is selected, when a production invoice, proposal invoice or credit note achieves an Invoice Status of Released, then the invoice or credit note is authorised automatically.
- Maintaining Invoices
- Maintaining Proposal Invoices
- Changing the Status of a Production Invoice
- Changing the Status of a Credit Note
- Changing the Status of a Proposal Invoice
- Drafting Invoices
- Editing Invoices
- Cancelling Invoices
- Maintaining Invoice Documents for an Invoice
- Authorising and Unauthorising Invoices
- Transmitting, Booking, Rejecting, Paying and Crediting Production Invoices
- Sending, Accepting and Rejecting Proposal Invoices
- Configuring Invoice Preferences
- Appendix—Pricing Engine
- Maintaining Report Templates
- Maintaining Schedules and Batch Job Executions
