Fix sql for purchase stats
bom/purchase: Update condition
logs: Logs are now full json
Merge pull request #321 from trecouvr/fix

Fix sql for purchase stats
Merge pull request #323 from trecouvr/jsoniffy-logs

logs: Logs are now full json