Fixes in Stock Entry and test cases