If someone performs a service for a poor person and gives a discount in order to help him out, does the difference count as tzedakah? If so, can the full amount be counted towards maaser, or do we say that he can only count 90% of it towards maaser, since he would anyhow have had to give away 10%? (Example: The full charge is $1,000, but he discounts it to $500, so now he's losing $500. However, even if he had not given the discount, he still would have had to give $50 of that $500 to tzedakah, so he's really only losing $450 due to the discount.)
If I recall correctly from Rabbi Breitowitz's tzedaka lecture, you'd only count 90%. I think he gave the example of providing gratis, for a charity, some service that would otherwise cost $100/hr. You would only have pocketed $90 from providing that service for non-charity, so you only write off $90 to Tzedaka. I think that was his case; if I'm correct, and this is analogous, then that's your answer. (Afraid I don't know what his source was, though at the beginning of the lecture he mentioned an AOJS book on tzedaka.)
Though lacking in sources, Rabbi Aryeh Levine and Rabbi Mordechai Sharabi both felt so. They used to work out with the shop owners of the Mahane Yehuda Shuk, to give discounts to poor people in the community so that they could buy their groceries in dignity. They used to call the shop keepers "their partners in tzedaka". I know stories of this are in biographies written about them, such as "A Tzadik in our Times."