MAC-PAC Homecontact ussupport login 
Documentation > MAC-PAC Technical Library > Distribution > Purchasing > Programs > Receipt Quantity Control - Purpose > Receipt Quantity Control - Calculations

Receipt Quantity Control - Calculations

PO220E

A.   Housekeeping

1.   See Common Processing Routines - Housekeeping of this manual for a general discussion of the Housekeeping subroutine.  Processing specific to this program is described below.

2.   A parameter list is set up for the fast path and help screen parameters.

a.   Electronic Data Collection Flag (BCFLAG), which is passed from the asynchronous monitor, is checked for EDC mode or multi-line receiving mode.

3.   Key lists are defined for each file retrieved by the program.

4.   Workfields are defined and program constants are initialized.

5.   The following records are retrieved from the Reference file (REFERP):

a.   The date format record (category 049) is retrieved.  If this record is not found, the date format defaults to MMDDYY.

b.   The default company/warehouse is retrieved from the workstation assignment record (category 428).  This company/warehouse is validated against the array of authorized company/warehouses for the user.  This is not checked for EDC transactions.

c.   The decimal field precision record (category 446) is retrieved.

d.   The Assign Lots option is retrieved from Reference File category Y34, Lot System Defaults.  If the value of the option is Y, then lots may be assigned automatically using the number from the Next Available Lot Number option.  This option is also on Reference File category Y34.

e.   All company/warehouses to which the user is authorized are retrieved from the user company/warehouse authorization record (category 409) and loaded into an array.  If no records are found for the user, a flag is set authorizing the user to all company/warehouses.

f.    The applications installed record (category 012) is retrieved to determine if the Shop Floor Control, Product Costing, Inventory Accounting, Expert Configurator, and Job Control modules are installed.  If Job Control is installed, the job/group number will be displayed (for a job-controlled part).  If Expert Configurator is installed, the Configuration Code will be displayed (for configuration coded parts).

g.   The Inventory Accounting system defaults record (category 436) is retrieved for the positive and negative adjustment codes used in system-generated adjustments.

h.   If the Inventory Accounting Application is installed, the Inventory Accounting close grace period record (category 456) is retrieved.

i.    The following categories are retrieved and stored in arrays for access during processing:

·     Purchase order document release codes (category 484)

·     Approval status codes (category 499)

·     Quantity control status codes (category 466)

·     Quality control status codes (category 467)

j.    The Purchasing application system defaults 1 record (category 491) is retrieved.  The purchase order receipt number assignment method is saved to determine whether the receipt number on the Function Select screen must be entered or will be system assigned.

k.   The Purchasing application system defaults 2 record (category 492) is retrieved.  The default ID tag release code and on-time delivery filter are saved.

l.    The dispute tolerance amount is retrieved from the purchasing location defaults record (category D32).

m.  The current purchasing calendar record (category 490) and the previous year purchasing calendar record (category 471) are retrieved.  The Purchasing statistics posting periods record (category 488) is also retrieved.  The Current Period End Date and Last Period End Date are calculated and formatted with the receiving type codes and the associated quality control flags are retrieved (category 475).

n.   The multiple/location priority code default is retrieved (category Y34) when new multiple location records for a part are being created.

6.   The following records are retrieved from the System Control file (CT100M):

a.   The Lot Option and the Purchase Order Receipts Pending Flag are retrieved from the first Inventory Control control record (ICCTL1).  If the Lot Option equals Y, a lot control environment is in effect, and the lot control files are opened.

b.   The valid balance types are retrieved from the second Inventory Control control record (ICCTL2).

c.   If the Shop Floor Control application is installed, the Automatic Move/Receive Option is retrieved from the Shop Floor Control control record (SFCTL1).  The Shop Floor Audit Trail and Labor Requirements files are opened.

7.   All valid company/warehouse combinations, plant names, plant flags, and calendar codes are retrieved from the Warehouse Description file (IC170M) and stored in arrays.  The default company/warehouse retrieved in step 5.b. above is validated against this array.

B.   Mainline

When the program is not in async processing mode, control is passed among the following six screens.  If the program is in an async mode for multi-line receiving, receipt lines will be read and checked to determine whether they are posted or unposted.  If they are unposted, receipt fields will go through normal validation and if no errors occurred then master files are updated.  A message will be sent to the user upon completion of async processing. 

Receipt Quantity Control Function Select Screen (PO220S01)

The Function Select screen allows the user to choose the maintenance function he/she wishes to perform.  Two maintenance options may be chosen from this screen:  to create a new purchase order receipt transaction or to modify an existing purchase order receipt transaction.  The following processing is performed:

1.   The Function Select screen is formatted and displayed.

2.   The Function Select screen is validated.  See the Purchasing User Manual for validation rules.

3.   The transaction is processed according to the maintenance mode.

a.   For an add transaction, the Purchase Order Header file (PO180M1) and Purchase Order Receipt Header file (PO210M1) are locked.  A minimal amount of information from the purchase order header record is used to create a new receipt header record to reserve the receipt number and prevent an intervening update.  The Purchase Order Receipt Header file is updated with the new record.  If automatic receipt number assignment is in effect, the Next Available Receipt Number (category 496) is updated on the Reference file (REFERPU).

The logical Purchase Order Line file (PO180ML7) is accessed; the recap screen subfile is loaded with all open purchase order lines for the current purchase order number.

b.   For a change transaction in which only the Receipt Number was entered, the Purchase Order Header file (PO180M1) and Purchase Order Receipt Header file (PO210M1) are logically locked.  The existing records from the receipt line file are loaded into the recap subfile.

The Purchase Order Receipt Line file (PO210M2) is accessed; all lines for the current receipt number are loaded into the recap screen subfile.

c.   For a change transaction in which a Receipt Number and a Receipt Line Number were entered, the Purchase Order Header file (PO180M1) and Purchase Order Receipt Header file (PO210M1) are logically locked.  The existing records from the receipt line file are loaded into the recap subfile.

The Purchase Order Receipt Line file (PO210M2) is accessed and the requested line record is retrieved.  A flag is set to go directly to the detail screen.  If the line is closed, a warning message is written for display on the detail screen.  If the line has already been matched to an invoice, a warning message is written to the detail screen and flags are set so that only the Comments Flag may be changed.

4.   The following conditions determine which screen is displayed next if the Enter key is pressed:

Mode

 

Conditions

 

Screen Displayed

Add

No errors

Header screen (PO220S02)

Change

Receipt Number entered

Recap screen (PO220S04)

Change

Receipt Number and Line Number entered

Detail screen (PO220S03)

Receipt Quantity Control Header Screen (PO220S02)

The Header screen allows the entry or modification of data pertaining to the entire receipt.  The following processing is performed:

1.   If the header has not been previously posted (that is, an add transaction), the header information is displayed using the system date as a default for the Receipt Date and the Transaction Date.  If the Order Type is direct ship, the ID Tags Release Code is not displayed; for a non-direct ship order, the ID Tags Release Code defaults to the value retrieved from the Purchasing System Defaults record (category 492) on the Reference file.  The Comments Flag is set.  For a change transaction, the Purchase Order Receipt Comment file is accessed; if comments exist, the flag is set to Y.  For an add transaction, the flag is set to N.

2.   The header screen is validated.  See the Purchasing User Manual for validation rules.

3.   If the transaction is valid, the data on the screen is used to update the Receipt Header file (PO210M1).  An audit trail record is formatted and written to the Purchase Order Receipt Header Audit Trail file (PO210BP1).

4.   The following conditions determine which screen is displayed next if the ENTER key is pressed:

Conditions

 

Screen Displayed

An add transaction is being processed and the Comments Flag equals N

Detail screen (PO220S03)

The previous screen was the detail screen

Detail screen (PO220S03)

The previous screen was the recap screen

Recap screen (PO220S04)

The Comments Flag equals Y

Comment screen (PO220S05)

5.   Command keys are available to display the Recap screen (PO220S04) or the Function Select screen (PO220S01) or to call the multiple purchase order window (PORCTWIN).  In change made the window displays purchase orders being used for this receipt.  If a new receipt is added, the user can enter multiple purchase orders. 

Receipt Quantity Control Detail screen (PO220S03) (non-phantom orders)

The detail screen allows the addition and modification of receipt line records and the display of purchase order line information.  Purchase order line information without receipt line information is displayed for those purchase order lines without associated receipt lines in the transaction.  Receipt lines may be associated with only one purchase order line.  Purchase order lines may be associated with several receipt lines.

1.   The detail screen is initialized for display.

a.   For a change transaction, the following processing is performed:

(1)  Current receipt data is loaded from the Purchase Order Receipt Line file (PO210M2).

(2)  If a stock shortage condition is detected, a flag is set to display a warning to the user.  Shortage conditions are calculated as follows:

(a)  The Warehouse Balance File balance type quantities are summed as follows to give the On-Hand Quantity:

(i)   For a manufacturing warehouse, if the Order Planning flag on the balance type is Y, the quantity is added to the total.

(ii)   For a manufacturing warehouse, if any balance types are available for both planning and distribution (both Order Planning Flag and Distribution Flag = Y on the balance type), and sales orders are not considered for planning (the Sales Order Planning Flag on the Warehouse Description file is N), then the inventory quantity reserved for customer orders is subtracted from the total.

(iii)  For a distribution warehouse, if the Distribution flag on the balance type is Y, the quantity is added to the total.

(b)  For non-direct ship purchase orders:

(i)   If the company/warehouse is the manufacturing company/warehouse, the Sales Order Planning Flag (WDSOPL) is No, and the On-Hand Quantity (WKHAND) is less than the Allocated Quantity - Manufacturing (WBAQMF), the Shortage Flag is set to Y.

      If the company/warehouse is the manufacturing company/warehouse, the Sales Order Planning Flag (WDSOPL) is Yes, and the On-Hand Quantity (WKHAND) is less than the Allocated Quantity - Manufacturing plus the Reserved Quantity (WBRSOQ) plus the Backordered Quantity (WBBOSQ), the Shortage Flag is set to Y

(ii)   If the company/warehouse is a distribution company/warehouse and the On-Hand Quantity (WKHAND) is less than the sum of the Reserved Sales Order Quantity (WBRSOQ) and Backordered Sales Order Quantity (WBBOSQ), the Shortage Flag is set to Y.

(c)  For direct ship purchase orders, if the On-Order Quantity - Direct Ship Purchase Order (WBQDSP) is less than the On-Order Quantity - Direct Ship Sales Order (WBQDSS), the Shortage Flag is set to Y.

(3)  Data is retrieved from the Purchase Order Line file (PO180M2).  The Unreceived Quantity is calculated as follows:

UNRECEIVEDQUANTITY

=

CURRENT ORDER

minus

CURRENT RECEIVED

 

 

QUANTITY

 

QUANTITY

If the Unreceived Quantity is less than or equal to zero, a flag is set to display a message to the user that there is no quantity left to receive on the line.

(4)  The Purchase Order Receipt Comment file (PO210M4) is accessed; if line comments exist for the current receipt record, the Comments Flag is set to Y.  Otherwise, it is set to N.

(5)  The Purchase Order Receipt Parcel file (PO210M3) is accessed.  If parcel records exist for the current receipt, they are retrieved and loaded into the subfile.

b.   For an add transaction, the following processing is performed:

(1)  The screen fields are loaded with blanks and default values.

(2)  Data is retrieved from the logical Purchase Order Line file (PO180ML7).  The Unreceived Quantity is calculated as follows:

UNRECEIVED QUANTITY

=

CURRENT ORDER

minus

CURRENT RECEIVED

 

 

QUANTITY

 

QUANTITY

If the Unreceived Quantity is less than or equal to zero, a flag is set to display a message to the user that there is no quantity left to receive on the order.

(3)  The Comments Flag is defaulted to N.

(4)  The part's Lot Control Flag and Part Type are retrieved from the Part Master file (DE100M).  These values are used to determine which fields on the detail screen will be displayed or suppressed.

(5)  The part's location flag and preferred location are retrieved from the Warehouse Balance file (IC140M) to determine whether the part is location controlled.

(6)  If any line has been invoiced, or order line is closed, a flag is set allowing only the Comments Flag to be changed.

2.   Command keys are available to display the previous receipt or purchase order line and the next receipt or purchase order line.  F14 - Accumulate Total accumulates the quantities on the parcel subfile and displays the total in the Counted Quantity field.  F20 - Add Receipt Line allows the association of an additional receipt line to a purchase order line.  F23 - Split Parcel Lines, allows the user to specify N parcels at size X. N lines are formatted with the quantity of X.  F23 is only available for parts that are location controlled.

When the user accesses the detail screen, the primary stock location for a part is defaulted into the Location field.  This information is retrieved from the Part Master file (DE100M).  The user may override this stock location with another valid location.  If there is no primary stock location for a part, the Location field is formatted with blanks.  The user can receive a purchase order line into a specific location.  F23 allows each parcel to be received into a separate location.  The location-controlled flag (WBLCTL) is retrieved.  The program then determines if IC960E (Part Location Search) is called (WBLCTL = Y) or if IC900E is called (WBLCTL = N).  A valid location can be selected and returned to the detail screen.  The location retrieved must be on the Location Validation file (DE140M).

If a part is location controlled and Enter is pressed on the receipt screen, the Valid Location file is searched for empty locations in the current company/warehouse.  If a location is entered for a part that is location controlled, it is passed to IC980E to check whether the location is empty or not.  If the location is not empty, a message is displayed.  If Enter is pressed again, the part is received into that location.  If the entered location is empty, the line will be received into that location.  If any errors are found in the detail screen, the command keys are disabled.

3.   The detail screen is validated.  See the Purchasing User Manual Screens section for validation rules.

4.   The Transaction Quantity is calculated as follows:

TRANSACTION QUANTITY

=

NEW COUNTED

minus

OLD COUNTED

 

 

QUANTITY

 

QUANTITY

Therefore, if the Counted Quantity of a line is decreased, the Transaction Quantity will be negative.

5.   Records to be updated are physically locked.

6.   Calculations are performed.  During all calculations, overflow is monitored and causes a critical error.

a.   New balances are calculated for the Multiple Location file (IC130M) if the multiple location record was found during detail screen validation and if the order type is not direct ship.

(1)  The Transaction Quantity is added to the appropriate balance quantity work field.

(2)  If the Transaction Quantity is positive, the Transaction Quantity is added to the Activity Since Last Cycle Count.

b.   In a lot control environment, if the part is lot controlled new balances are calculated for the Lot Control file (IC150M) if the lot control record was found during detail screen validation.

c.   Warehouse Balance file (IC140M) fields are calculated for non-direct ship purchase orders.  If the record was not found during record locking, the program ends since it will have been initialized when the purchase order was set up.

(1)  If the Transaction Quantity is positive, the Transaction Quantity is added to the Year-to-Date Activity (WBYTDU).

(2)  The Current Unit Cost is calculated with values retrieved from the Part Master file (DE100M):

CURRENT UNIT

=

CURRENT MATERIAL

plus

CURRENT LABOR

plus

CURRENT OVERHEAD

COST

 

TOTAL (MUCSM)

 

TOTAL (MUCSL)

 

TOTAL (MUCO)

(3)  The transaction monetary value can then be calculated by multiplying the Transaction Quantity by the Current Unit Cost.

(4)  The monetary value is then added to the Year-to-Date Activity Amount (WBYTDA).

(5)  The Transaction Quantity is added to the appropriate balance quantity.  If the balance quantity is driven negative, a warning message is written.

d.   If the part is configuration costed (PMCFCO = 3 or 4), configuration costing is performed.  The standard total cost (CCCFT) on the Configuration Code file (EC140M) is the transaction unit cost at receipt (CRCPUC), and the standard acquired cost (CCSACQ) is the transaction acquisition cost (CRCACQ).

e.   If the company/warehouse is moving average costed (WDCOOP = M) or the part type of the part is non-standard, moving average costing is performed.

(1)  The On-Hand Quantity is calculated by adding Balance Type Quantities 1 through 4.

(2)  The transaction value is calculated by multiplying the Transaction Quantity by the Purchase Order Unit Cost (SKU) in bookkeeping currency.

(3)  The transaction value is then added to the Part Value - Posting (WBPVAL).

(4)  If the new Part Value - Posting is out of balance with the new On-Hand Quantity, a system-generated adjustment is made to the new part value and adjustment records are written to the Inventory Adjustment Audit Trail (IC120BP1) and Inventory Adjustment Transaction Register (IC120CP1).  Other balance exceptions cause the transaction to be rejected, and a critical error message is issued.

(5)  The new Moving Average Cost is calculated as the new Part Value - Posting divided by new On-Hand Quantity.  The new Moving Average Cost is used to format the Transaction Unit Cost at Receipt (CRCPUC) on the Purchase Order Receipt Audit Trail file (IC140BP).

f.    If the company/warehouse is standard costed or the part type is not non-standard, the Transaction Unit Cost at Receipt (CRCPUC) for the manufacturing company/warehouse is calculated using Part Master File values.

(1)  If the Product Costing application is installed, the Standard Total Labor, Material and Overhead are summed to give the Transaction Unit Cost at Receipt.

(2)  If the Product Costing application is not installed, the Standard This-Level Labor, Material and Overhead are summed to give the Transaction Unit Cost at Receipt.

(3)  If the company/warehouse is distribution, the Transaction Unit Cost at Receipt is the same as the Standard Unit Cost (WBUNCS).

g.   The Received Quantities on the Purchase Order Line file (PO180ML7) and the On-Order Quantity (WBOOMF) on the Warehouse Balance file (IC140M) are calculated.  The On-Order Adjustment Quantity work field is first calculated in order to calculate the new On-Order Quantity (WBOOMF).

(1)  The Old Outstanding Balance (ODOUTB) is calculated as the Current Order Quantity - SKU (PHSKOQ) minus the Current Received Quantity - SKU (PHSKRQ).

(2)  The new Current Quantity Received and Total Quantity Received in stockkeeping units of measure and purchasing units of measure are calculated.  The following calculation is used:

TOTAL RECEIVED QUANTITY

=

QUANTITY
PER SCREEN

plus

RECEIVED QUANTITY
per PO180M2

If the user enters an amount that is greater than the order quantity, a warning message is displayed.

(3)  The New Outstanding Balance (NWOUTB) is calculated as the Current Order Quantity minus the new Current Quantity Received.

(4)  How the On-Order Adjustment Quantity is calculated depends on the specific conditions, since the On-Order Quantity cannot be negative.

(a)  If the Old Balance Outstanding (ODOUTB) and the New Balance Outstanding (NWOUTB) are greater than or equal to zero:

ON-ORDER ADJUSTMENT

=

NEW OUTSTANDING

minus

OLD OUTSTANDING

AMOUNT

 

BALANCE

 

BALANCE

(b)  If the New Outstanding Balance is less than or equal to zero and if the Old Outstanding Balance is greater than or equal to zero:

ON-ORDER ADJUSTMENT

=

OLD OUTSTANDING

times

(-1)

AMOUNT

 

BALANCE

 

 

(c)  If the New Outstanding Balance is greater than or equal to zero and if the Old Outstanding Balance is less than or equal to zero:

ON-ORDER ADJUSTMENT

=

NEW OUTSTANDING

AMOUNT

 

BALANCE

(d)  If the Old Outstanding Balance and the New Outstanding Balance are both less than or equal to zero:

ON-ORDER ADJUSTMENT AMOUNT

=

0

(5)  For non-direct ship orders, the On-Order Quantity (WBOOMF) is calculated as the On-Order Quantity (WBOOMF) plus the On-Order Adjustment Quantity (ADJMNT).

For direct ship orders, the On-Order Quantity - Direct Ship Purchase Order (WBQDSP) is calculated as the On-Order Quantity - Direct Ship Purchase Order (WBQDSP) plus the On-Order Adjustment Quantity (ADJMNT).

h.   The Purchase Order Release Detail file (PO180M3) is read and calculations are performed.

(1)  If the Transaction Quantity is positive, the file is positioned on the release with the oldest due date.  If the transaction quantity is negative (a reduction in counted quantity has occurred), the file is positioned on the release with the most recent due date.  The absolute value of the Transaction Quantity is moved to Release Quantity to be Updated (RELQTY).

(2)  If the Transaction Quantity is positive, the Release Quantity to be Updated (RELQTY) and Balance Due (PDBDSK) are used to determine if the release should be updated.  If the Balance Due is greater than zero and the Release Status is not closed, the New Balance calculations are performed.

(a)  If the Release Quantity to be Updated equals the Balance Due (PDBDSK):

(i)   The Release Quantity to be Updated is added to the Received Quantity.

(ii)   The Balance Due is set to zero.

(iii)  The Release Quantity to be Updated is set to zero.

(b)  If the Release Quantity to be Updated is less than the Balance Due:

(i)   The Release Quantity to be Updated is added to the Received Quantity.

(ii)   The Release Quantity to be Updated is subtracted from the Balance Due.

(iii)  The Release Quantity to be Updated is set to zero.

(c)  If the Release Quantity to be Updated is greater than the Balance Due:

(i)   The Received Quantity is set to the Release Quantity.

(ii)   The Balance Due is subtracted from the Release Quantity to be Updated.

(iii)  The Balance Due is set to zero.

(3)  If the Transaction Quantity is negative, the Release Quantity to be Updated (RELQTY), Received Quantity (PDRCSK) and Release Quantity (PDQTSK) are used to determine how the balance calculations should be performed.  The release is not processed if it is closed.

(a)  If the Release Quantity to be Updated is greater than or equal to the Received Quantity:

(i)   The Balance Due is set to the Release Quantity.

(ii)   The Received Quantity is subtracted from the Release Quantity to be Updated.

(iii)  The Received Quantity is set to zero.

(b)  If the Release Quantity to be Updated is less than the Received Quantity, the Release Quantity to be Updated is subtracted from the Received Quantity.

(i)   If the Release Quantity is greater than or equal to the new Received Quantity, the Received Quantity is subtracted from the Release Quantity to give the Balance Due, and the Release Quantity to be Updated is set to zero.

(ii)   If the Release Quantity is less than the new Received Quantity, the Release Quantity to be Updated is set to zero.

(4)  The receipt record's allowable receipt quantity is compared with its balance quantity.  If automatic purchase order close processing is being performed and the balance quantity is equal to or less than the allowable receipt quantity, a message is sent to the purchase order asynchronous monitor to close the purchase order and the related requisitions that it covers.  The asynchronous monitor will send a warning message to the workstation if the purchase order and its related requisitions are closed.  If automatic purchase order close processing is not being performed or if the balance quantity is greater than the allowable receipt quantity the purchase order is not automatically closed. 

7.   The delivery status of the release (on time, late, or early) is determined.  This status will be used for classifying the transaction when updating the Item/Buyer Statistics file (PO260M), Item/Vendor Statistics file (PO280M) and Vendor Purchase History file (PO290M).

a.   The Release Due Date is subtracted from the Receipt Date to obtain the Delay Interval.  If the Delivery Performance Statistics option on Reference File category 492 specifies original date, the original promised ship date is used as the release due date.  In the event that the original promised date is blank, the promised date is used.  Otherwise, the dock date is used as the release date to calculate the delay interval.

b.   The On-Time Filter that was retrieved from the Purchasing System Defaults record (category 492) on the Reference file is compared to the Delay Interval.  This filter specifies the number of days before or after the due date that a delivery is still considered on time.

c.   For every release where the Balance Due is reduced to zero (or augmented to non-zero if the transaction quantity is negative), the appropriate counter (On-Time, Early, or Late) is incremented by 1 (or decremented by 1 if the transaction quantity is negative).

8.   Various files are updated as appropriate.

a.   The Part Master File Net Change Flag is set and the file updated if a manufacturing company/warehouse is being processed and the part type is not reference (Part Type = 5) or non-stocked (Part Type = 7) under any of the following conditions:

(1)  The new Current Quantity Received (WKCRR1) is greater than the Current Order Quantity accounting for scrap (WKCR02).

(2)  The old Current Quantity Received (PHSKRQ) is greater than the Current Order Quantity accounting for scrap (WKCR02) if the transaction quantity is negative.

b.   The Purchase Order Receipt Line file (PO210M2) is updated.

The Purchase Order Receipt Header file (PO210M1) is updated with the new Number of Receipt Lines (RHNOLN).

The Recap Subfile is updated if needed.

c.   The Purchase Order Receipt Parcel file (PO210M3) is updated using the parcel subfile values.

d.   The Vendor Purchase History file (PO290M) is updated.

e.   The Purchase Order Line file (PO180ML7) is updated with the new received quantities and Date of Last Receipt.

f.    The Purchase Order Header file (PO180M1) is updated with the new total received amount and Date of Last Receipt.

g.   The Lot Control file (IC150M) is updated.  If the lot control record was not found during detail validation, it is added.

h.   If the part is configuration coded and a Lot/Configuration Assignment record was not found during detail validation, it is added (EC170M).

i.    The Multiple Location file (IC130M) is updated.  If the multiple location record was not found during detail validation, it is added.

j.    Statistics updates are performed on the Item/Vendor Statistics file (PO280M) and Item/Buyer Statistics file (PO260M).  If these records do not already exist, they are created.  If a previous purchasing period is being processed (Receipt Date is less than or equal to Last Purchasing Period Posted Ending Date), the Item/Vendor Analysis file (PO270M) fields and Item/Buyer Analysis file (PO300M) fields are also updated.  If the Item/Vendor Analysis records and the Item/Buyer Analysis records do not exist, they are created.

k.   Audit trail records are formatted and written to the following files:

(1)  An audit trail record is written to the Purchase Order Receipt Line Audit Trail file (PO210BP2).

(2)  Records are written to the Purchase Order Receipt Audit Trail file (IC140BP) and Purchase Order Receipt Transaction Register file (IC140CP).

(3)  If in a lot control environment and processing a lot controlled part, a Lot Control Audit Trail File (IC150BP) record is written.

(4)  If a system-controlled adjustment was detected in the warehouse balance moving average calculations, the Inventory Adjustment Audit Trail file (IC120BP1) and Inventory Adjustment Transaction Register File (IC120CP1) records are written.  Warning messages are written to the Inventory Control Transaction Error file (IC505AP).

l.    The Purchase Order Receipt Pending Flag on the System Control file (CT100M) is set to Y for the first receipt line in the transaction and the file is updated.

9.   The following conditions determine which screen is displayed next if the ENTER key is pressed:

Conditions

 

Screen Displayed

The Comments Flag equals Y

Comment screen (PO220S05)

More detail lines exist and the Comments Flag equals N

Detail screen (PO220S03)

No more detail lines exist and the Comments Flag equals N

Recap screen (PO220S04)

The detail line displayed was selected from the Recap screen and the Comments Flag equals N

Recap screen (PO220S04)

Receipt Quantity Control Detail screen (PO220S30) (phantom orders only)

 

The detail screen allows the addition and modification of receipt line records and the display of purchase order line information.  Purchase order line information without receipt line information is displayed for those purchase order lines without associated receipt lines in the transaction.  Receipt lines may be associated with only one purchase order line.  Purchase order lines may be associated with several receipt lines.

1.   The detail screen is initialized for display.

a.   For a change transaction, the following processing is performed:

(1)  Current receipt data is loaded from the Purchase Order Receipt Line file (PO210M2).

(2)  If a stock shortage condition is detected, a flag is set to display a warning to the user.  Shortage conditions are calculated as follows:

(a)  The Warehouse Balance File balance type quantities with a Planning Action Flag equal to Y are summed to give the On-Hand Quantity (WKHAND).

(b)  For non-direct ship purchase orders:

(i)   If the company/warehouse is the manufacturing company/warehouse and the On-Hand Quantity (WKHAND) is less than the Allocated Quantity - Manufacturing (WBAQMF), + Allocated Quantity - JIT (WBFRAQ) + Allocated Quantity - Synchro (WBSIAQ) the Shortage Flag is set to Y.

(ii)   If the company/warehouse is the manufacturing company/warehouse, the Sales Order Planning flag (WDSOPL) is Yes, and the On-Hand Quantity (WKHAND) is less than the Allocated Quantity + Allocated Quantity - JIT (WBFRAQ) + Allocated Quantity - Synchro (WBSIAQ) - Manufacturing plus the Reserved Quantity plus the Backordered Quantity, then the Shortage Flag is set to Y.

(iii)  If the company/warehouse is a distribution company/warehouse, the Sales Order Planning flag (WDSOPL) is No, and the On-Hand Quantity (WKHAND) is less than the sum of the Reserved Sales Order Quantity (WBRSOQ) and Backordered Sales Order Quantity (WBBOSQ), the Shortage Flag is set to Y.

(c)  For direct ship purchase orders, if the On-Order Quantity - Direct Ship Purchase Order (WBQDSP) is less than the On-Order Quantity - Direct Ship Sales Order (WBQDSS), the Shortage Flag is set to Y.

(3)  Data is retrieved from the Purchase Order Line file (PO180ML7).  The Unreceived Quantity is calculated as follows:

UNRECEIVED QUANTITY

=

CURRENT ORDER QUANTITY

minus

CURRENT RECEIVED

 

 

 

 

QUANTITY

If the Unreceived Quantity is less than or equal to zero, a flag is set to display a message to the user that there is no quantity left to receive on the order.

(4)  The Purchase Order Receipt Comment file (PO210M4) is accessed; if header comments (line 00) exist for the current receipt record, the Comments Flag is set to Y.  Otherwise, it is set to N.

(5)  The Purchase Order Release Detail file (PO180M3) is accessed.

(a)  If the Release Status of the record is not closed, the release record is loaded into the subfile.

(b)  If the Release Status is closed, the Purchase Order Receipt Parcel file (PO210M3) is accessed.  If a record exists corresponding to the closed purchase order release record, the parcel record is loaded into the subfile.  This record will be displayed, but no modifications to it will be allowed.

b.   For an add transaction, the following processing is performed:

(1)  The screen fields are loaded with blanks and default values.

(2)  Data is retrieved from the logical Purchase Order Line file (PO180ML7).  The Unreceived Quantity is calculated as follows:

UNRECEIVED QUANTITY

=

CURRENT ORDER QUANTITY

minus

CURRENT RECEIVED

 

 

 

 

QUANTITY

If the Unreceived Quantity is less than or equal to zero, a flag is set to display a message to the user that there is no quantity left to receive on the order.

(3)  The Comments Flag is defaulted to N.

(4)  The part's Lot Control Flag and Part Type are retrieved from the Part Master file (DE100M).  These values are used to determine which fields on the detail screen will be displayed or suppressed.

(5)  The Purchase Order Release Detail file (PO180M3) is accessed.  If the Release Status of the record is not closed, it is loaded into the subfile.

(6)  If the part is configuration costed, save the configuration code on the manufacturing order.

2.   Command keys are available to display the previous receipt or purchase order line and the next receipt or purchase order line.  F14 - Accumulate Total accumulates the quantities on the parcel subfile and displays the total in the Counted Quantity field.  F20 - Add Receipt Line allows the association of an additional receipt line to a purchase order line.  F23 - Split Parcel Lines, allows the user to specify N parcels at size X. N lines are formatted with the quantity of X.  F23 is only available for parts that are location controlled.

When the user accesses the detail screen, the primary stock location for a part is defaulted into the Stock Location field.  This information is retrieved from the Part Master file (DE100M).  The user may override this stock location with another valid location.  If there is no primary stock location for a part, the Stock Location field is formatted with blanks.  The user can receive a purchase order line into a specific location.  F23 allows each parcel to be received into a separate location. The location-controlled flag (WBLCTL) is retrieved.  The program then determines if IC960E (Part Location Search) is called (WBLCTL = Y) or if IC900E is called (WBLCTL = N).  A valid location can be selected and returned to the detail screen.  The location retrieved must be on the Location Validation file (DE140M).

If a part is location controlled and Enter is pressed on the receipt screen, the Valid Location file is searched for empty locations in the current company/warehouse.  If a location is entered for a part that is location controlled, it is passed to IC980E to check whether the location is empty or not.  If the location is not empty, a message is displayed.  If Enter is pressed again, the part is received into that location.  If the entered location is empty, the line will be received into that location.  If any errors are found in the detail screen, the command keys are disabled.

3.   The detail screen is validated.  See the Screens section of Purchasing User Manual for validation rules.

4.   The Transaction Quantity is calculated as follows:

TRANSACTION QUANTITY

=

NEW COUNTED QUANTITY

minus

OLD COUNTED QUANTITY

Therefore, if the Counted Quantity of a line is decreased, the Transaction Quantity will be negative.

5.   Records to be updated are physically locked.  A logical locking record is written to the Manufacturing Order Async Transactions file (IC130DP) to lock the labor requirements records of the manufacturing order(s) being received during detail screen validation.

6.   Calculations are performed.

a.   The Purchase Order Receipt Line file (PO210M2) is updated with the new or added line.

b.   The Purchase Order Receipt Header file (PO210M1) is updated with the new Number of Receipt Lines (RHNOLN).

c.   The recap subfile is updated if needed.

d.   The parcel subfile is read and the corresponding Purchase Order Release Detail record is retrieved.  If the Transaction Quantity is positive, the Release Transaction Quantity is added to the Received Quantity.

(1)  If the Release Transaction Quantity is greater than or equal to the Received Quantity (PDRCSK), the Balance Due is set to zero.

(2)  If the Release Transaction Quantity is less than the Received Quantity (PDRCSK), the Received Quantity is subtracted from the Release Quantity to give the Balance Due.

(3)  If the Release Transaction Quantity is negative, the absolute value of the release Transaction Quantity is subtracted from the Received Quantity.

(4)  If the Release Transaction Quantity is negative and the Release Quantity is greater than or equal to the Received Quantity, the Received Quantity is subtracted from the Release Quantity to give the new Balance Due.

7.   The delivery status of the release (on time, late, or early) is determined.  This status will be used for classifying the transaction when updating the Item/Buyer Statistics file (PO260M), Item/Vendor Statistics file (PO280M) and Vendor Purchase History file (PO290M).

a.   The Release Due Date is subtracted from the Receipt Date to obtain the Delay Interval.

b.   The On-Time Filter that was retrieved from the Purchasing System Defaults record (category 492) on the Reference file is compared to the Delay Interval.  This filter specifies the number of days before or after the due date that a delivery is still considered on time.

c.   For every release where the Balance Due is reduced to zero (or augmented to non-zero if the transaction quantity is negative), the appropriate counter (On-Time, Early, or Late) is incremented by 1 (or decremented by 1 if the transaction quantity is negative).

8.   If processing a purchase order for a part that had a production type of MRP at the time of the order creation, and the Shop Floor Control application is installed, the Labor Requirements file (IC125M) is accessed and updated.

a.   The Transaction Quantity is added to the Quantity Complete.

b.   In addition, if the Automatic Move/Receive Option on the System Control file (CT100M) has been specified and the last operation is not being processed, the Transaction Quantity is added to the Quantity Available for the Next Operation.

c.   Activity is checked and, if no activity has been reported, the Activity Reported Flag (LRACTR) is set to N and the Actual Start Date is set to zero.  Otherwise, the Activity Reported Flag is set to Y and the Actual Start Date is set to the Transaction Date.

d.   If activity has been reported and the Actual Start Date is greater than the Transaction Date, the Actual Start Date is set to the Transaction Date.

e.   If the Automatic Move/Receive Option has been specified and if not the last operation of the order, the Quantity Available for the Next Operation is updated.

f.    The Activity Reported Flag and Actual Start Date are updated for the next operation in the same manner as for the previous operation.

g.   Audit trail records are formatted and written to the Shop Floor Audit Trail file (SF120BP1), the Purchase Order Receipt Audit Trail file (IC140BP) and the Purchase Order Receipt Transaction Register file (IC140CP) for each phantom order release processed.

9.   If processing a purchase order for a part that had a production type of JIT at the time of the order creation, and JIT time reporting is in effect, an audit trail record is formatted and written to the JIT Shop Reporting Audit Trail file (JT200BP1)) for each phantom order release processed.

10.  Other files are updated as appropriate.

a.   The Purchase Order Receipt Parcel file (PO210M3) is updated with the Transaction Quantity applied to the release.

b.   The Vendor Purchase History file (PO290M) is updated.

c.   The Purchase Order Line file (PO180ML7) is updated with the new received quantities and Date of Last Receipt.

d.   The Purchase Order Header file (PO180M1) is updated with the new Receipt Amount and Date of Last Receipt.

e.   Statistics updates are performed on the Item/Vendor Statistics file (PO280M) and Item/Buyer Statistics file (PO260M).  If these records do not already exist, they are created.  If a previous purchasing period is being processed (Receipt Date is less than or equal to Last Purchasing Period Posted Ending Date), the Item/Vendor Analysis File (PO270M) fields and Item/Buyer Analysis File (PO300M) fields are updated also.  If the Item/Vendor Analysis records and the Item/Buyer Analysis records do not exist, they are created.

f.    If the last operation of the order is being processed and the stock location is not blank, a record is written to the Manufacturing Order Async Transaction file (IC130DP) and a message is sent.  This initiates the asynchronous processing of a manufacturing order receipt by the Manufacturing Order Receipts/Component Issues program (IC130E).

11.  The following conditions determine which screen is displayed next if the ENTER key is pressed:

Conditions

 

Screen Displayed

The Comments Flag equals Y

Comment screen (PO220S05)

More detail lines exist and the Comments Flag equals N

Detail screen (PO220S03)

No more detail lines exist and the Comments Flag equals N

Recap screen (PO220S04)

The detail line displayed was selected from the Recap screen and the Comments Flag equals N

Recap screen (PO220S04)

Quantity Control Recap Screen (PO220S04)

The Recap screen displays the purchase order lines eligible for receipt and the receipt lines entered during the present transaction while in add mode.  During change mode, the receipt lines are displayed.  The following processing is performed:

1.   The recap screen is initialized and displayed.

2.   The screen is validated:

a.   One X may be entered in the Select field.  If more than one X is entered, an error message is displayed.  Otherwise, the selected line record is saved for processing according to which command key is pressed.

b.   If the ENTER key is pressed, an error message is displayed.

3.   The following conditions determine which screen is displayed next:

Conditions

 

Screen Displayed

F5 - Display Detail is pressed

Detail screen (PO220S03 or PO220S30)

F10 - Function Select is pressed

Function Select screen (PO220S01)

F12 - Comments is pressed

Comment screen (PO220S05)

F18 - Multiple PO is pressed

The multiple purchase order window (PORCTWIN) is called and displays all purchase orders being used for this receipt.  In add mode the user can enter multiple purchase orders. 

Quantity Control Comment Screen (PO220S05)

The multiple purchase order window (PORCTWIN) is called and displays all purchase orders being used for this receipt.  In add mode the user can enter multiple purchase orders.  Quantity Control Comment Screen (PO220S05)

The comment screen allows the addition or maintenance of comment records associated with a receipt header or a receipt line.  Up to 99 comment records can be entered for a header record.  In addition, up to 99 comment records can be entered for each line.

Each comment line has an associated Print Code, which determines if the comment should be printed and where.  To delete a comment line, both the Print Code and Comment Text must be blanked out.  The following processing is performed:

1.   The screen is initialized and displayed.

2.   The user's input is validated.  See the Purchasing User Manual, File Maintenance Screens-Purchasing Control, for validation rules.

3.   If the fields are valid, the comments are written to the Purchase Order Receipt Comment file (PO210M4) and an audit trail record is formatted and written to the Purchase Order Receipt Comment Audit Trail file (PO210BP4).

4.   The following conditions determine which screen will be displayed next:

Conditions

 

Screen Displayed

An add transaction is being processed and the previous screen was the Header screen which was displayed immediately following the Function Select screen

Recap screen (PO220S04)

The previous screen was the header screen, which was displayed by pressing a command key from the detail screen.

Detail screen (PO220S03)

The previous screen was the recap screen.

Recap screen (PO220S04)

The previous screen was the detail screen.

Detail screen (PO220S03)

F5 - Display Detail is pressed

Detail screen (PO220S03)

F11 - Display Recap is pressed

Recap screen (PO220S04)

 

PO220E Program Menu