Maintaining Invoice Syntaxes and Laboratory-based Numbering Patterns
Overview
Invoice syntaxes are used to generate invoice numbers and names, email subject and message text, and invoice file names.
Process
Invoice Creation
Configure a syntax to generate invoice names
When an invoice is created the invoice's Name is generated from a syntax from the current laboratory or organisation, where the syntax's Syntax Type is Invoice and the Syntax Code is INVOICE_NAME.
For a production invoice, the invoice's Number is generated from syntax from the current laboratory or organisation, where the syntax's Syntax Type is Invoice and the Syntax Code is INVOICE_SYNTAX_CODE. Where this syntax is not defined, the laboratory's Invoice Number Pattern and Invoice Last Used Number is used to generate the invoice number.
For a proposal invoice, the invoice's Number is generated from syntax from the current laboratory or organisation, where the syntax's Syntax Type is Invoice and the Syntax Code is PROPOSAL_SYNTAX_CODE. Where this syntax is not defined, the laboratory's Proposal Invoice Pattern and Proposal Invoice Last Used Number is used to generate the invoice number.
Credit Note Creation
Configure a syntax to generate credit note numbers
For a credit note, the invoice's Number is generated from syntax from the current laboratory or organisation, where the syntax's Syntax Type is Invoice and the Syntax Code is CREDIT_SYNTAX_CODE. Where this syntax is not defined, the laboratory's Credit Note Pattern and Credit Note Last Used Number is used to generate the credit note number.
Invoice File Names
Configure a syntax to generate invoice file names
The invoice's File Name is generated using syntax from the current laboratory or organisation, where the syntax's Syntax Type is Invoice and the Syntax Code is selected by the user.
Invoice Email Text
Configure a syntax to generate invoice email text
The invoice's Email Subject Text is generated using syntax from the current laboratory or organisation, where the syntax's Syntax Type is Invoice and the Syntax Code is EMAIL_SUBJECT_TEXT.
The invoice's Email Message Text is generated using syntax from the current laboratory or organisation, where the syntax's Syntax Type is Invoice and the Syntax Code is EMAIL_MESSAGE_TEXT.
Syntax Generation Process
The syntax comprises a pattern (for example, $yyyy_###), a floor, ceiling and increment value, and the last number used for both the inner and outer patterns. Note that the magnitude of the ceiling must match the available size of pattern, for example, #### could only fit a number up to 9999.
Org-scope and lab-scope variables are available for use in the syntaxes. Variables can include references to properties of objects exposed to the syntax generator and can invoke custom scripts. Refer to Maintaining and Using Syntax Variables.
Multiple syntaxes can be generated in one run. When a syntax is generated, the last number is updated.
When a syntax is not defined or available, a quote code, proposal invoice number, production invoice number, and credit note number can be generated for a lab-scope quote, proposal invoice, production invoice and credit note, respectively, using a simple pattern and last used number counter set on the laboratory. System managers and laboratory administrators can create and maintain these numbering patterns using the CCLBRT—Laboratory application.
These numbering patterns cannot use variables nor invoke custom script. If a syntax is available, it is used in preference to the simple numbering pattern.
Examples
- An Invoice Subject Text Syntax comprising invoice number and other text:
Invoice for Job: $Invoice.invoiceNo.asEllipseValue
where:
- Outer Seq Floor = 1
- Outer Seq Ceiling = 1
- Outer Seq Increment = 1
- An Invoice Name Syntax comprising invoice number and running number sequence:
${String Field=Invoice.invoiceNo.asEllipseValue
return Field
}_####
where:
- Outer Seq Floor = 1
- Outer Seq Ceiling = 9999
- Outer Seq Increment = 1
- Last No = 362
- An Invoice Message Text Syntax comprising client name, invoice number and other text:
To $Client.name.asEllipseValue
Attached is the invoice for Job name $Invoice.invoiceNo.asEllipseValue
Regards,
Lab Administrator
where:
- Outer Seq Floor = 1
- Outer Seq Ceiling = 1
- Outer Seq Increment = 1
