Done
Pinned fields
Click on the next to a field label to start pinning.
Details
Details
Assignee
Paweł Gesek
Paweł GesekReporter
Chongsun Ahn
Chongsun AhnLabels
Story Points
2
Original estimate
4h
Time tracking
3h 30m logged30m remaining
Components
Sprint
None
Fix versions
Priority
Time Assistant
Time Assistant
Created August 28, 2017 at 8:10 PM
Updated November 21, 2020 at 1:17 PM
Resolved November 13, 2017 at 3:25 PM
There appears to be some incomplete and confusing parts to stock management in the schema and in the backend Java code. Notably:
physical_inventory_line_item_reasons is not actually a table of reasons (that is stock_card_line_item_reasons), but is actually a table of adjustments to a physical inventory line item. Therefore, a better name would be physical_inventory_line_item_adjustments. The Java code has the name StockAdjustment, which would be better named PhysicalInventoryLineItemAdjustment.
physical_inventory_line_item_reasons should have id as primary key
physical_inventory_line_item_reasons should have foreign keys for all attributes that make sense (reasonid, physicalinventorylineitemid, stockcardlineitemid, stockeventlineitemid)
The quantity field for StockAdjustment is a bit confusing, since there is a quantity field in the PhysicalInventoryLineItem; it would be better named something like quantityOfDifference or adjustmentQuantity (in both the backend code and schema); if the class is better named, I might be open to leaving this, as long as it's clear the quantity is the quantity of adjustment, not the quantity of the line item
Acceptance Criteria
Make schema and code changes recommended above
Make sure there are no regressions with these changes