Penalty for giving up unprofitable business is deductible for tax purposes. A charge paid for earlier termination of a property management contract in the event of sale of the property may be deductible for tax purposes if it is intended to limit losses (Warsaw Provincial Administrative Court, case no. III Sa/Wa 3832/16, judgment of 13 Dec 2017). For more, see here.