Merge pull request #2209 from nabinhait/hotfix

Minor fix in gross profit report
Escaped single quote in authorization control queries