help on create receipt function