Update stock amounts with DB queries Closes #5367

@claudiosmweb and @coenjacobs please review