I would like to definitely fix this before we implement the GL posting
service for inventory variances.
Here is my attempt (draft) to implement David's notes on this:
1) deprecate InventoryItemVariance and replace it with a new entity:
InventoryVariance with the following fields:
inventoryVarianceId (pk)
varianceReasonId
physicalInventoryId
comments
2) add the field inventoryVarianceId to the InventoryItemDetail entity
3) implement a new service createInventoryVariance that thakes as input
the following fields:
productId (mandatory)
availableToPromiseDiff (optional)
quantityOnHandVar (optional)
facilityId (mandatory)
locationSeqId (optional)
inventoryItemId (optional)
where facilityId, locationSeqId and inventoryItemId are used to select
the InventoryItems that will be considered for the variance; if we
specify the inventoryItemId then the service will work in the same way
the createPhysicalInventoryAndVariance is working now
What do you think?
Jacopo
David E Jones wrote:
I think this change is fine. It would throw a little kink in the special
handling of the financial impact for this sort of thing. However we do
this we just need to make sure it's very clear that the change is due to
inventory lost/found/damaged/etc. That would be in the reasonEnumId.
My thoughts on the inventory variance going back a ways is that it's
really weird to have the variance associated with a single inventory
item. It seems like something related to Product, Facility and perhaps
FacilityLocation would make more sense. Based on the record for that an
InventoryItem would generally be created.
In other words I'm saying that instead of having a variance entity that
points to the InventoryItem entity, the pointing would go in the other
direction (probably to the InventoryItemDetail entity rather than
InventoryItem).
I thought I should bring this up before we make any decisions about the
direction to go, or any changes to make, with InventoryItemVariance.
-David
On Nov 7, 2007, at 7:40 AM, Jacopo Cappellato wrote:
What about deprecating the InventoryItemVariance entity?
It seems duplicated by the newer InventoryItemDetail entity: we could
use the latter with the following mapping:
InventoryItemVariance.varianceReasonId -->
InventoryItemDetail.reasonEnumId
and
InventoryItemVariance.comments --> InventoryItemDetail.description
What do you think?
Jacopo