Default Facility Lookup
Contents |
Relative Tracker
- Tracker entry : https://sourceforge.net/tracker/index.php?func=detail&aid=1488815&group_id=128662&atid=712358
- Created : 2006.05.15 by holivier
- Status : Done
Summary
Main goal is to have a clear process to choose a facility for a product and a specific action (shipment, rework, Backflush, order)
Rationale
Before facility choice depend only on productStore and ProductFacility and sometime on NFacilityType not on purpose.
Further Details
Use the ProductStoreFacility to declare which facility is for what.
The process will be :
- look in the ProductStoreFacility which facility for the purpose (normally only one per purpose)
- if no specific facility exist, use ProductStore inventoryFacility
- look in ProductFacility if the facility found or one of its childs exist
- if yes take it
- if not
- for shipment, rework use the selected facility from ProductStoreFacility
- for Backflush, product is not backflush (return null)
- other, use ProductStore inventoryFacility (or properties if it's empty)
Assumptions
currently nothing
Use Cases
Backward compatibility
Be carreful to be sure, the new solution continue to work in old configuration (no specific parameters in ProductStoreFacility)
Order
Sales or Purchase order, how to choose Facility to check stock level and to creat stockEventPlan
Shipment
In the pickingList process how to choose the destination facility, a SHIPMENT NFacilityType one
Rework, Reception
In the reception process, in which facility stock the rejected product
Production Run, Backflushing
How to declare a product as a backflushing one, and how to choose the pickingFacility
Implementation
Implement in ProductNFacilityHelper, getDefaultProductNFacility with one more parameters facilitPurpose
Implement in each place getDefaultProductNFacility is call, the new parameters facilityPurpose.
UI Changes
generate ProductStoreFacility editAssoc and use CommonEditAssocDecoratorSubList (only subEdit and subList, like for ProductRevision )
For ProductStoreFacility or Facility the defaut value for FacilityPurpose must be "empty"
Code Changes
In facility object creat method isPurposeShipment, isPurposeRework, ... and test FacilityPurpose or NFacilityType for compatibility
findProductNFacilityByPurpose
Parameters :
- productStore
- productId
- nFacilityPurpose
Return :
- a ProductNFacility or null
findNFacilityByPurpose
Parameters :
- productStore
- productId
- nFacilityPurpose
Return :
- a NFacility,
- always with a value except with purpose BackFlush
Call :
- findProductNFacilityByPurpose
Schema Changes
Create FacilityPurpose : (enumeration) SHIPMENT, REWORK, BACKFLUSH, ORDER
associate FacilityPurpose to ProductStoreFacility
associate FacilityPurpose to NFacility
Tests
Test for each use case ;-)
Discussion
WRun_OUT & WRun_USE
For FacilityPurpose and Work Order, I think it's necessary to say WRun_OUT and WRun_USE and not at the ProductStore Level.
Order Item Choice
In some case it's necessary to be able to choice for each Order Item, so it wil be necessary, in some situation, to manage the facility at the Order Item level (in the user interface)
Unresolved Issues
Questions and Answers
How Facility is choose for Work Order (Wrun) ?
answer is in code, waiting for someone look


