Maintaining Job Invoice Samples and Tests from Registration

Overview

A job invoice is priced based on the invoiceable samples and tests that are in it.

When a job is activated, but samples and tests are not yet added to its job invoices, an invoice preview for any of these invoices in the CCINV—Invoice application displays an empty invoice document.

Process

Maintaining Job Invoice Samples and Tests

When a job invoice is first created, it has no samples and tests assigned to it, and no estimate or work-in-progress invoice can be generated for it.

After a job is activated, samples and tests can be maintained on its job invoices on the Invoicing tab in the CCREGN—Job application, and under the job on the Jobs tab in the CCINV—Invoice application. Refer to Maintaining the Samples and Tests on a Job Invoice in an Invoice.

Samples and tests can be added from the job to a job invoice or cleared from a job invoice. There are two ways to add samples and tests:

  • Append all samples and tests—For each selected job invoice, all samples and tests in the job that are not assigned as yet to the job invoice are assigned to the job invoice. If this is done, any exclusion records on sample scheme or sample scheme analyte invoiceability, as set in the invoice sample grid, are removed as well.

  • Append unassigned samples and tests—For the current job invoice, all samples and tests in the job that are not assigned as yet to ANY job invoice are assigned to the job invoice.

Samples, schemes and analytes can be cleared from a job invoice. If this is done, then any exclusion records on sample scheme or sample scheme analyte invoiceability, as set in the invoice sample grid, are removed as well.

Also, when a job invoice sample, job invoice scheme or job invoice samples scheme analyte is deleted, then any associated job invoice sample, job invoice scheme and job invoice scheme analyte is deleted also.

Conditions which prohibit the update of job invoice samples and tests are:

  • The job's Workflow Status is Registered, that is, the job has not been activated yet, or Finalised.

  • The job invoice has Samples and Tests Locked for Update selected.

  • The job invoice is included in an invoice that has an Invoice Status of Released or beyond release, or Cancelled. (The Invoice Status must be Initial or Draft.)

Job's Workflow Status

Registered

Can't release invoice as no samples and tests are on the invoice and job not completed

Not Started
Started
Analysed
Released
Completed

Can't release invoice as job not completed

Completed Finalised Cancelled

Invoice's Invoice Status

Initial

Draft
Edited

Initial
Draft

Edited

Released
Authorised
Transmitted
Sent
Accepted
Rejected
Paid
Credited
Booked

Cancelled

<any>

<any>

Open Invoice Sample Grid

Y, but it is empty

Y, but it is empty

Y

Y

Y

Y

Not available

Not available

Append Unassigned Samples and Tests

Not available

Not available

Y

Y, but returns error: Samples/Tests can only be added to job invoices in Initial or Draft state.

Y, but returns error: Samples/Tests can only be added to job invoices in Initial or Draft state.

Y, but returns error: Samples/Tests can only be added to job invoices in Initial or Draft state.

Not available

Not available

Append All Samples and Tests

Y, but returns error: Samples and tests cannot be appended until the job is activated

Y, but returns error: Samples/Tests can only be added to job invoices in Initial or Draft state.

Y

Y, but returns error: Samples/
Tests can only be added to job invoices in Initial or Draft state.

Y, but returns error: Samples/
Tests can only be added to job invoices in Initial or Draft state.

Y, but returns error: Samples/
Tests can only be added to job invoices in Initial or Draft state.

Not available

Not available

Clear Samples and Tests

Y

Y

Y

Y, but returns error: Samples/Tests can only be removed from job invoices in Initial or Draft state

Y, but returns error: Samples/Tests can only be removed from job invoices in Initial or Draft state

Y, but returns error: Samples/Tests can only be removed from job invoices in Initial or Draft state

Not available

Not available

Upon maintaining samples and tests in a job invoice:

  • Any changes to a job invoice are reflected in the associated invoice. Also, where the invoice is for a single job invoice, or the job invoice is the primary job invoice of a merged invoice, then the changes are reflected in the header of the merged invoice.

  • The event is audited. Refer to Reviewing Operational Data Audits.

    Note: A reprice of the invoice must be completed if any property that affects the line items is updated, that is, the related invoice's Is WIP/EST Outdated state of the invoice is true. Clicking the Generate Invoice button does not cause the invoice to be re-calculated, it merely creates the invoice documents.

Maintain job invoice samples and tests in registration

Maintain a job invoice sample grid in registration

Lock job invoice samples and tests from update in registration

These actions can also be done from within the invoice. Refer to Maintaining the Samples and Tests on a Job Invoice in an Invoice.

Job Invoice Samples

All samples and invoiceable tests can be appended to a job invoice, or unassigned samples and tests can be assigned to a job invoice.

Samples are added to a job invoice only where the related condition is true for the sample's Primary Analytical Type:

  • Unknown—All unknown samples are added to the job invoice.
  • Duplicate—Duplicate QC samples are added to the job invoice only where the laboratory's Invoice Duplicates is selected.
  • Replicate—Replicate QC samples are added to the job invoice only where the laboratory's Invoice Replicates is selected.
  • Blank—blank QC samples are added to the job invoice only where the laboratory's Invoice Blanks is selected.
  • Standard—Standard QC samples are added to the job invoice only where the laboratory's Invoice Standards is selected.
  • Spike—Spike QC samples are added to the job invoice only where the laboratory's Invoice Spikes is selected.

A job invoice sample's Is Invoiceable defaults to the sample's Is Invoiceable.

If a job invoice has Samples and Tests Locked for Update selected, then samples and tests cannot be added to the job invoice either via the user interface or via services run from a script, and a job invoice sample's Is Invoiceable cannot be updated.

Job Invoice Tests

When tests from a job are appended to a job invoice, all schemes where the scheme's Price Type is Scheme-based, Sample-based or Unit-based are added to the job invoice, and all analytes where the scheme's Price Type is Analyte-based and the scheme version analyte's Is Invoiceable is selected are added to the job invoice. The job invoice scheme's Is Invoiceable defaults to checked and the job invoice scheme analyte's Is Invoiceable defaults to checked.

Laboratory settings denote which QC samples are added to a job invoice. Refer to Maintaining Costing and Invoicing Details for a Laboratory. Refer to Conditions for Auto-addition of Samples and Tests to a Job Invoice.

Job Samples and Tests Invoiceability

For sample-based, or unit-based pricing, a sample scheme is invoiceable where:

  • The job invoice sample is invoiceable.
  • The job invoice scheme is invoiceable.
  • The sample scheme in the job is invoiceable.
  • No invoice sample grid exclusion exists for the job invoice sample scheme.

For scheme-based pricing, a sample scheme is invoiceable where:

  • The job invoice sample is invoiceable.
  • The job invoice scheme is invoiceable.
  • The sample scheme in the job is invoiceable.
  • No invoice sample grid exclusion exists for the job invoice sample scheme.
  • More than one sample scheme analyte is invoiceable where:
    • The job invoice scheme analyte is invoiceable.
    • The sample scheme analyte in the job is invoiceable.
    • No invoice sample grid exclusion exists for the job invoice sample scheme analyte.

For analyte-based pricing, a sample scheme analyte is invoiceable where:

  • The job invoice sample is invoiceable.
  • The job invoice scheme and job invoice scheme analyte are invoiceable.
  • The sample scheme and sample scheme analyte in the job is invoiceable.
  • No invoice sample grid exclusion exists for the job invoice sample scheme or job invoice sample scheme analyte.

A job invoice sample's invoiceability is inherited from the sample's invoiceability. Refer to Adding a Group of Samples to a Job and Maintaining Samples.

Invoice Sample Grid

The invoice sample grid, maintained using the CCINVGRD—Invoice Grid application, is used to applying invoice sample gridding to an invoice at the granular levels of job invoice sample scheme and job invoice sample scheme analyte. This allows pricing to change per client recipient of the invoice.

The grid shows the intersections between samples and tests for a job invoice, and allows job invoice sample schemes and job invoice sample scheme analytes to be made not invoiceable, even where the job invoice, job invoice scheme or job invoice scheme analyte is invoiceable in the job invoice.

When the invoice sample grid is opened, it is displayed in normal mode with schemes and analytes across the page and samples down the page. The INVOICE_GRID_SCHEME_HDR_FIELD and INVOICE_GRID_ANALYTE_HDR_FIELD application preferences control the column width and which scheme attribute and analyte attribute are displayed in the column header for an invoice sample grid presented in normal mode.

A sample row in an invoice sample grid displays the Primary Analytical Type, Sample Name, Client Sample Name, Sample Code, Product Code and Row Number.

Job invoice schemes are expanded or collapsed to display or hide the job invoice scheme analytes. Sub-analytes are displayed like ordinary analytes. The INVOICE_GRIDDING_EXPAND_ALL_SCHEMES application preference is used to default whether the invoice sample grid opens expanded to show all scheme and analyte columns or collapsed to show scheme columns only.

In collapsed mode, the invoice sample grid cells are highlighted based on whether the sample scheme Is Invoiceable. In expanded mode, the sample grid cells are highlighted based on whether the sample scheme analyte Is Invoiceable.

Loading Samples and Tests into the Invoice Sample Grid

When the invoice sample grid is opened, then all job invoice schemes and job invoice scheme analytes are displayed in their various columns, regardless of their Invoiceable flag.

When the invoice sample grid is opened using the Open Invoice Sample Grid flow, then only samples where the job invoice sample's Invoiceable is selected and the sample's Workflow Status is something other than Listed Not Received, Insufficient Sample or Not Analysed, are included in the grid.

Where the invoice sample grid is opened using the Open Invoice Sample Grid (All) flow, then all samples in the job invoice are included in the grid.

Invoice Sample Grid Exclusion Records

When a sample scheme or sample scheme analyte is 'gridded off', then an associated exclusion record is created that excludes those entities from the invoiceable sample schemes and invoiceable sample scheme analytes in the job invoice.

When a job invoice sample, job invoice scheme or job invoice samples scheme analyte is deleted, then exclusion records associated with the job invoice sample scheme and job invoice sample scheme analyte are deleted also.

Invoice Sample Grid Cell Colours

The grid displays each related job invoice sample scheme's and job invoice sample scheme analyte's Invoiceable state.

Note: When samples and tests are added to a job invoice, whilst the sample's Invoiceable flag is pushed into the related job invoice sample's Invoiceable flag, it is NOT pushed down to related job invoice sample schemes and job invoice sample scheme analytes. But when a job invoice sample's Invoiceable flag is updated on the job invoice's Samples tab, then on submit, the job invoice sample's Invoiceable flag IS pushed down to related job invoice sample schemes and job invoice sample scheme analytes.

The colour of the grid's cells indicates the Invoiceable state of the job invoice sample schemes and job invoice sample scheme analytes:

  • Green—Indicates that the job invoice sample scheme's or job invoice sample scheme analyte's Invoiceable flag is true.

  • Red—Indicates that the job invoice sample scheme's or job invoice sample scheme analyte's Invoiceable flag is false.

  • Blue—Indicates that the sample scheme or sample scheme analyte is not included in the job invoice, or does not exist in the job at all.

When the grid is save with cells highlighted red, then job invoice sample scheme and job invoice sample scheme analyte exclusion records are written only. These exclusion records are used as follows:

  • During invoicing of a scheme that has a Price Type of Scheme-Based, then a job invoice sample scheme is invoiced only where the job invoice sample is invoiceable, the job invoice scheme is invoiceable, and no exclusion record exists for the job invoice sample scheme, and analytes are counted in the scheme where the job invoice sample is invoiceable, the job invoice scheme analyte is invoiceable, and no exclusion record exists for the job invoice sample scheme analyte.

  • During invoicing of a scheme that has a Price Type of Sample-Based or Unit-Based, then a job invoice sample scheme is invoiced only where the job invoice sample is invoiceable, the job invoice scheme is invoiceable, and no exclusion record exists for the job invoice sample scheme.

  • During invoicing of a scheme that has a Price Type of Analyte-Based, then a job invoice sample scheme analyte is invoiced only where the job invoice sample is invoiceable, the job invoice scheme analyte is invoiceable, and no exclusion record exists for the job invoice sample scheme analyte.

Invoice sample grid functions

Right-click menu options are available to set sample schemes or sample scheme analytes, which are invoiceable in the job, to be invoiceable or not invoiceable for the job invoice.

The invoice sample grid supports the following right-click menu options:

Name

Action

Set to Invoiceable

Remove the exclusion for the job invoice sample scheme or job invoice sample scheme analyte, thereby driving invoiceability only from the sample scheme or sample scheme analyte in the job.

Set to Not Invoiceable

Apply an exclusion for the job invoice sample scheme or job invoice sample scheme analyte, by flagging each selected sample scheme analyte as not invoiceable for the job invoice, thereby overriding where a sample scheme or sample scheme analyte is invoiceable in the job.

Expand All Schemes

Expand the invoice sample grid to show sample scheme analytes.

Collapse All Schemes

Collapse the invoice sample grid to show sample schemes.

Important: Upon persisting changes to the invoice sample grid:

  • A job invoice sample's Invoiceable flag is set to true where at least one related job invoice sample scheme or job invoice sample scheme analyte is invoiceable.

    A job invoice scheme's Invoiceable flag is set to true where at least one related job invoice sample scheme is invoiceable.

    A job invoice scheme analyte's Invoiceable flag is set to true where at least one related job invoice sample scheme analyte is invoiceable.