GradePotencyWarnings

Grade Potency Warnings

Minor Business Rule

Object Name: B4100080

Parent DLL: COPBASE

Location: Client/Server

Language: C

Functional Description

Purpose
This function does two things.  If the grade or potency changed from the original and there are quantities committed for the location give a warning. 
Validates that the grade or potency is within the valid range for the branch


Setup Notes and Prerequisites


Special Logic


Technical Specifications

Edits:


1.) If the Grade is different from the Original Grade
      Or the Potency is different from the Original Potency

Fetch the ItemBalance Record (F4102) with two keys (ITM, MCU)


If the grade is different than the original grade

If  the Quantity Soft Committed (PCOM)is not equal to zero

Or the Quantity Hard Committed (HCOM) is not equal to zero

give warning "0045" and highlight the grade


If Grade Control (OT2Y) from the F41021 is equal to Y

If the grade is less than the From Grade(FRGD) from the F41021

Or greater than the ThruGrade (THDG) from the F41021

give warning "4493" and highlight the grade


If the potency is different than the original potency

If  the Quantity Soft Committed (PCOM) is not equal to zero

Or the Quantity Hard Committed (HCOM) is not equal to zero

give warning "0045" and highlight the potency


If Potency Control (OT1Y) from the F41021 is equal to Y

If the grade is less than the From Potency(FRMP) from the F41021

Or greater than the ThruPotency (THRP) from the F41021

give warning "4492" and highlight the potency


Retrievals:




Returns:

1.) Warning messages


^

Data Structure

D4100080 - Grade Potency Warnings

Parameters:
Data Item Data Structure DescriptionI/ORequired

LOTGszGradeIN

LOTPmnPotencyIN

LOTGszOriginalGradeIN

LOTPmnOriginalPotencyIN

ITMmnShortItemNumberIN

MCUszBranchPlantIN

PCOMmnSoftCommittedIN

HCOMmnHardCommittedIN

EV01cSuppressErrorMsgIN

ERRcErrorCodeON

DTAIszErrorMessageIDON



^

Parameter NameData ItemData TypeReq/OptI/O/Both
szGradeLOTGcharNONENONE

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 
grade    A2   Secondary grade  The grade for a lot is stored in the Lot Master table (F4108).

mnPotencyLOTPMATH_NUMERICNONENONE

A code that indicates the potency of the lot expressed as a percentage of active or useful material (for example, the percentage of alcohol 
in a solution). The actual potency of a lot is defined in the Lot Master table (F4108).

szOriginalGradeLOTGcharNONENONE

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 
grade    A2   Secondary grade  The grade for a lot is stored in the Lot Master table (F4108).

mnOriginalPotencyLOTPMATH_NUMERICNONENONE

A code that indicates the potency of the lot expressed as a percentage of active or useful material (for example, the percentage of alcohol 
in a solution). The actual potency of a lot is defined in the Lot Master table (F4108).

mnShortItemNumberITMMATH_NUMERICNONENONE

An inventory item number. The system provides three separate item numbers plus an extensive cross-reference capability to other item 
numbers (see data item XRT) to accommodate substitute item numbers, replacements, bar codes, customer numbers, supplier numbers, and 
so forth. The item numbers are as follows:   o Item Number (short) - An eight-digit, computer-assigned item number     o 2nd Item Number - The 
25-digit, free-form, user defined alphanumeric item number     o 3rd Item Number - Another 25-digit, free-form, user defined alphanumeric item 
number

szBranchPlantMCUcharNONENONE

An alphanumeric code that identifies a separate entity within a business for which you want to track costs. For example, a business unit 
might be a warehouse location, job, project, work center, branch, or plant. You can assign a business unit to a document, entity, or person for 
purposes of responsibility reporting. For example, the system provides reports of open accounts payable and accounts receivable by 
business unit to track equipment by responsible department. Business unit security might prevent you from viewing information about business units 
for which you have no authority.

mnSoftCommittedPCOMMATH_NUMERICNONENONE

The number of units soft committed to sales orders or work orders in the primary units of measure.

mnHardCommittedHCOMMATH_NUMERICNONENONE

The number of units committed to a specific location and lot.

cSuppressErrorMsgEV01charNONENONE

An option that specifies the type of processing for an event.

cErrorCodeERRcharNONENONE

The Data Field Error Code field is simply a generic data field to pass an error condition flag.  This field is one of the fields that make up the 
external parameter data structure of the Data Dictionary Server.

szErrorMessageIDDTAIcharNONENONE

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 
special characters such as %, &, or +. You create new data items using system codes 55-59. You cannot change the alias.

Related Functions

B4000420 Analyze Grade Range.
B4000430 Analyze Potency Range

Related Tables

F4102 Item Branch File