jreinke / magento-stock-movements

Magento extension to save products stock movements.
http://www.bubblecode.net/en/2012/02/07/magento-save-product-stock-moves/
79 stars 50 forks source link

Stock movement display a nonsense #23

Open mustdobetter opened 9 years ago

mustdobetter commented 9 years ago

The 'Movement' column in the admin grid doesn't seem to make any sense. The values are calculated on-the-fly after the collection is loaded, with each movement being relative to the previous item loaded(!). Unless you only have one product, this information would seem to make no sense. Furthermore, if you reorder the grid by clicking on one of the column headings (not 'Movement' as this throws an exception), the values in the Movement column are not updated and so make even less sense.

Instead, I suggest that the stock movement qty value should be stored against each row at the time of creation, and should be a calculation of the individual stock item's change in quantity.

I'm at a loss as to why this was created in the way it has been. Maybe when developing this feature only one product was used in testing, and no thought was given to a more general case? Very odd, especially given that the rest of the extension seems to be fairly well coded (although lacking comments).