Functional Description
Purpose
This function is used to retrieve a unique Next Number for a particular item (Batch, Journal Entry,
Voucher, Invoice, etc...)
Setup Notes and Prerequisites
The Next Number Constant field will be checked by the function, to determine the type of Next
Numbering that the J.D. World Source Company software is set up for.
Possible values are:
"0" or blank - NN by System Code method
"1" or blank - NN by Company/Document Type method
"2" or blank - NN by Company/Document Type/Fiscal Year/Century method
If using the System Code method, the function will retrieve the Next Number for the System Code and
Index specified in the parameters. If not found, it will return an error. If no Index is specified,
it will use a default Index. If the System Code is '09', it will default to Index 02. If the System
Code is 03, 03B, or 04, it will use the UDC table to determine the default Index by document type. You
can put the Index number in the first two positions of the second description. If System Code is 03
or 03B, it uses UDC 00/DI - A/R Document Types. If System Code is 04, it uses UDC 00/DV - A/P
Document Types. If the Index is still zero at this point, it defaults to Index 01. The Index can not be
greater than 10 or an error is returned.
If using the Company/Document Type method, the function will attempt to find the Next Number specific
to the Company and Document Type passed in the parameters. If not found it will add it.
If using the Company/Document Type/Fiscal Year/Century method, the function will attempt to find the
Next Number specific to the Company, Document Type, Fiscal Year, and Century passed in the parameters.
If no records exist for the Company and Document Type only, the function will default to the Next
Number by System Code method. If records exist, but not in the specified Fiscal Year Century, it will
be added for that Fiscal Year and Century.
The Same As Document Type functionality will work with a Next Number Constant of "1" or "2" only.
This will cause the function to use the Next Number of another Document Type, so that multiple Document
Types may use unique Next Numbers.
The Next Number retrieved will be returned in the Next Number 001 parameter of the function. When
using NN by System Code method, the next number can not be zero. If it is zero, it is incremented to 1.
Technical Specification
D0000065 - Get Next Number
Parameter Name | Data Item | Data Type | Req/Opt | I/O/Both |
---|---|---|---|---|
szSystemCode | SY | char | NONE | NONE |
Special Input Expected
| ||||
mnNextNumberingIndexNo | NNIX | MATH_NUMERIC | NONE | NONE |
| ||||
szCompanyKey | KCO | char | NONE | NONE |
Special Input Expected
| ||||
szDocumentType | DCT | char | NONE | NONE |
Special Input Expected
| ||||
mnCentury | CTRY | MATH_NUMERIC | NONE | NONE |
Special Input Expected
| ||||
mnFiscalYear1 | FY | MATH_NUMERIC | NONE | NONE |
Special Input Expected
| ||||
szSameAsDocumentType | SMAS | char | NONE | NONE |
Special Input Expected
| ||||
mnNextNumber001 | N001 | MATH_NUMERIC | NONE | NONE |
Special Output Returned
|
None |
F0002 Next Numbers - Automatic | ||||
F00021 Next Numbers by Company/Fiscal Year - Automatic | ||||
F0005 User Defined Codes |