How to issue credit note for discount?

Hi,

If a credit note is to be issued for an invoice, how should the values inside the XML populated?

For example, there is a invoice for SAR 100 with tax SAR 15.
A credit note is required to be issued for a discount amount of SAR 20.
Then the xml file should contain only discount amount? Or it will look like the invoice against which the credit note is being issued, along with the discount specified within allowance tab in XML file.

@itujar_it Yes the Credit Note should be issued only for 20. Please look at sample credit note in SDK. Do not use allowance charge field (discount) in credit note. You should mention Discount in the item description and add a line for SAR 20 in Credit Note.