regarding discount

Jayesh Kalal (17 Points)

13 July 2017  
one wholeseller sold goods at 16583 with with gst of 5%
but before charging gst he is giving discount amt equal to gst amt. i.e15794 after discount of 789..
now wholseller charge gst on 15794 i.e work out 789 and final invoive including gst is16583.
so whats the reason for giving discount amt.equal to gst before charging Gst.?