The National Rifle Association asked members attending its annual convention in Dallas on Friday to boycott a nearby restaurant after learning that it would be donating a portion of its proceeds to help end gun violence.

The restaurant, Ellen’s, began including a message on the bottom of its receipts on Friday morning, ahead of the N.R.A.’s weekend gathering.

“Thanks for visiting Ellen’s!” said the receipt, which went on to explain that some of the proceeds earned that week would be donated to organizations “dedicated to implementing reasonable and effective gun regulations.”