fix bugs on margin reports
update changelog
better margin calculation (especially for credit notes)
Merge pull request #1250 from altairis-fr/margin1

fix bugs on margin calculation and margin reports