Fix sql for purchase stats
bom/purchase: Update condition
Merge pull request #321 from trecouvr/fix

Fix sql for purchase stats