Functional Description
Purpose
To perform edits against lot numbers.  Lot grade and potency edits, assigning of the lot number
and lot number processing.
Setup Notes and Prerequisities
The lot grade and potency fields will need to be passed in.
Special Logic
Technical Specifications
Parameters
Data Item     Data Structure Description     I/O      Required     Notes
ITM           Short Item Number               I    Y
MCU           Branch/Plant                    I           Y
LOTN          Lot Number                      B           N
LOCN          Location                        B           N
LOTG          Lot Grade                       B           Y
LOTP          Lot Potency                     B           Y
MMEJ          Expiration Date                 I           Y
SRCE          Lot Process Type                I           Y
PID           Program ID                      I           Y
EV01          Default from Primary            I           Y
EV01          Suppress Error Message          I           Y
DTAI          Error Message ID                O           Y
OT1Y          Potency Control                 I           N
OT2Y          Grade Control                   I           N
FRDG          From Grade                      I           N
THGD          Thru Grade                      I           N
FRMP          From Potency                    I           N
THRP          Thru Potency                    I           N
STDP          Standard Potency                I           N
STDG          Standard Grade                  I           N
EV01          Item Location Rcd Not Found     I           N      
Related Tables
F41021 - Item Location
Related Business Functions
Verify Duplicate Lot - X41DUP
Lot Number By Process Type - B4100500
Processing
If Lot Number(LOTN) is blank and Lot Grade(LOTG) is not blank, issue error '4190'.
If Lot Number(LOTN) is not blank,
 If Grade Control(OT2Y) equals '1' or 'Y', and Lot Grade(LOTG) < From Grade(FRDG)
 or Lot Grade(LOTG) > Thur Grade(THGD), issue error '3892'.  This is only a WARNING.
 If Grade Control(OT2Y) is NOT a '1' or 'Y', and Lot Grade(LOTG) is not blank, issue
 error'3856'.  This is only a WARNING.
 If Grade Control(OT2Y) equals '1' or 'Y' and Lot Grade(LOTG) equals blank, move
 Standard Grade(STDG) into Lot Grade(LOTG).
If Lot Number(LOTN) is blank and Lot Potency(LOTP) is not blank, issue error'4190.
If Lot Number(LOTN) is not blank,
 If Potency Control(OT1Y) equals '1' or 'Y', and Lot Potency(LOTP) < From Potency(FRMP)
 or Lot Potency(LOTP) > Thru Potency(THRP), issue error '4037'.  This is only a WARNING.
 If Potency Control(OT1Y) is NOT a '1' or 'Y', and Lot Potency(LOTP) is not blank, issue
 error '3857'.  This only a WARNING.
 If Potency Control(OT1Y) equals '1' or 'Y' and LOTP equals blank, move Standard
 Potency(STDP) into LOTP.
//If location and lot are blank and the primary default flag is on, and you are doing lot 
  processing, need to assign lot number.  Also if you are not defaulting from the primary,
  need to assign lot number.//
If SRCE not equal blanks AND SRCE not equal zeros
 If Default equals '1'
 If LOCN equals blanks AND LOTN equals blanks
 If Item Location Rcd Not Found equals '1',
 Call LotNumberAssignByProcessType (B4100500)
 Else
 Call LotNumberAssignByProcessType (B4100500)
//Edit for duplicate lot numbers if parameter set to do so.//
If LOTN not blank
 Call VerifyDuplicateLot (X41DUP).  If error, issue '2501'.
//If lot processing, a lot must be entered.//
If SRCE equals '3' and LOTN equals blank and Default From Potency equals '0', 
error '2745'.
 
 
D4100300 - Lot Processing
Parameters
Data Item     Data Structure Description     I/O     Required     Notes
ITM           Short Item Number               I         Y
MCU           Branch/Plant                    I         Y
LOTN          Lot Number                      B         N
LOCN          Location                        B         N
LOTG          Lot Grade                       B         Y
LOTP          Lot Potency                     B         Y
MMEJ          Expiration Date                 I         Y
SRCE          Lot Process Type                I         Y
PID           Program ID                      I         Y
EV01          Default from Primary            I         Y
EV01          Suppress Error Message          I         Y
DTAI          Error Message ID                O         Y
OT1Y          Potency Control                 I         N
OT2Y          Grade Control                   I         N
FRDG          From Grade                      I         N
THGD          Thru Grade                      I         N
FRMP          From Potency                    I         N
THRP          Thur Potency                    I         N
STDP          Standard Potency                I         N
STDG          Standard Grade                  I         N
EV01          Item Location Rcd Not Found     I         N
TRDJ          Transaction Date - Julian       I         N
^
| Parameter Name | Data Item | Data Type | Req/Opt | I/O/Both | 
|---|---|---|---|---|
| mnShortItemNumber | ITM | MATH_NUMERIC | NONE | NONE | 
An inventory item number. The system provides three separate item numbers plus an extensive cross-reference capability to other item 
  | ||||
| szBranchPlant | MCU | char | NONE | NONE | 
An alphanumeric code that identifies a separate entity within a business for which you want to track costs. For example, a business unit 
  | ||||
| szLocation | LOCN | char | NONE | NONE | 
The storage location from which goods will be moved.  | ||||
| szLotNumber | LOTN | char | NONE | NONE | 
A number that identifies a lot or a serial number. A lot is a group of items with similar characteristics.  | ||||
| szLotGrade | LOTG | char | NONE | NONE | 
A code that indicates the grade of a lot. The grade is used to indicate the quality of the lot. Examples include the following:
   A1   Premium 
  | ||||
| mnLotPotency | LOTP | MATH_NUMERIC | NONE | NONE | 
A code that indicates the potency of the lot expressed as a percentage of active or useful material (for example, the percentage of alcohol 
  | ||||
| jdExpirationDate | MMEJ | JDEDATE | NONE | NONE | 
The date on which a lot of items expires.
The system automatically enters this date if you have specified the shelf life days for the item on 
  | ||||
| cSuppressErrorMessage | EV06 | char | NONE | NONE | 
An option that specifies the type of processing for an event.  | ||||
| szErrorMessageID | DTAI | char | NONE | NONE | 
A code that identifies and defines a unit of information. It is an alphanumeric code up to 8 characters long that does not allow blanks or 
  | ||||
| cPotencyControl | OT1Y | char | NONE | NONE | 
A code that indicates whether you control the item by potency.  | ||||
| cGradeControl | OT2Y | char | NONE | NONE | 
A code that indicates whether you control the item by grade.  | ||||
| szFromGrade | FRGD | char | NONE | NONE | 
A user defined code (40/LG) that indicates the minimum grade that is acceptable for an item.
The system displays a warning message if 
  | ||||
| szThruGrade | THGD | char | NONE | NONE | 
A user defined code (40/LG) that indicates the maximum grade that is acceptable for an item.
The system displays a warning message if 
  | ||||
| mnFromPotency | FRMP | MATH_NUMERIC | NONE | NONE | 
A number that indicates the minimum potency or percentage of active ingredients acceptable for an item.
The system displays a warning 
  | ||||
| mnThruPotency | THRP | MATH_NUMERIC | NONE | NONE | 
A number that indicates the maximum potency or percentage of active ingredients that is acceptable for an item.
The system displays a 
  | ||||
| mnStandardPotency | STDP | MATH_NUMERIC | NONE | NONE | 
The percentage of active ingredients normally found in an item.  | ||||
| szStandardGrade | STDG | char | NONE | NONE | 
A code (table 40/LG) that represents the normal grade for an item.  | ||||
| jdTransactionDate | TRDJ | JDEDATE | NONE | NONE | 
The date that an order was entered into the system. This date determines which effective level the system uses for inventory pricing.  | ||||
| None | 
| None |