As per section 15 of gst, value of supply shall not include any discount which is given before or at the time of supply. As stated by you that discount is shown in invoice ,so this is the case of discount at the time of supply. So you have to record the purchase after discount. For ex purchase 1000 dis 100 net 900 cgst @ 9% 81 sgst @ 9% 81 Total 1062
Then entry is Purchase 900 input cgst 81 input sgst 81 To Vendor 1062