If a small donation is made to a local charity it is treated as an allowable expense against trading profits – otherwise a charitable donation made by a company is treated as a QCD – the fact that the company may gain “goodwill” through their generosity is not an issue