When a business decides to give goods in charity it also needs to account for those goods in the appropriate financial statement(s), in this case, stock/purchases are reduced with the exact cost of goods donated.
Journal entry