Fix bug on stock calculation for replenishment: wrong order in ifsql.
Merge pull request #1378 from KreizIT/fix

Fix bug on stock calculation for replenishment: wrong order in ifsql.