How to fill Credit note XML 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.

Below is our implementation of the credit note issued for this discount.
Kindly check and validate if this implementation is correct.
Invoice
<cac:TaxTotal xmlns=“”>
<cbc:TaxAmount currencyID=“SAR”>15.00</cbc:TaxAmount>
</cac:TaxTotal>
<cac:TaxTotal xmlns=“”>
<cbc:TaxAmount currencyID=“SAR”>15.00</cbc:TaxAmount>
cac:TaxSubtotal
<cbc:TaxableAmount currencyID=“SAR”>100.00</cbc:TaxableAmount>
<cbc:TaxAmount currencyID=“SAR”>15.00</cbc:TaxAmount>
cac:TaxCategory
<cbc:ID schemeAgencyID=“6” schemeID=“UN/ECE 5305”>S</cbc:ID>
cbc:Percent15.0</cbc:Percent>
cac:TaxScheme
<cbc:ID schemeAgencyID=“6” schemeID=“UN/ECE 5153”>VAT</cbc:ID>
</cac:TaxScheme>
</cac:TaxCategory>
</cac:TaxSubtotal>
</cac:TaxTotal>
<cac:LegalMonetaryTotal xmlns=“”>
<cbc:LineExtensionAmount currencyID=“SAR”>100.00</cbc:LineExtensionAmount>
<cbc:TaxExclusiveAmount currencyID=“SAR”>100.00</cbc:TaxExclusiveAmount>
<cbc:TaxInclusiveAmount currencyID=“SAR”>115.00</cbc:TaxInclusiveAmount>
<cbc:AllowanceTotalAmount currencyID=“SAR”>0.00</cbc:AllowanceTotalAmount>
<cbc:ChargeTotalAmount currencyID=“SAR”>0.00</cbc:ChargeTotalAmount>
<cbc:PrepaidAmount currencyID=“SAR”>0.00</cbc:PrepaidAmount>
<cbc:PayableRoundingAmount currencyID=“SAR”>0.00</cbc:PayableRoundingAmount>
<cbc:PayableAmount currencyID=“SAR”>115.00</cbc:PayableAmount>
</cac:LegalMonetaryTotal>
<cac:InvoiceLine xmlns=“”>
cbc:ID1</cbc:ID>
<cbc:InvoicedQuantity unitCode=“PCE”>5.0</cbc:InvoicedQuantity>
<cbc:LineExtensionAmount currencyID=“SAR”>100.00</cbc:LineExtensionAmount>
cac:TaxTotal
<cbc:TaxAmount currencyID=“SAR”>15.00</cbc:TaxAmount>
<cbc:RoundingAmount currencyID=“SAR”>115.00</cbc:RoundingAmount>
</cac:TaxTotal>
cac:Item
cbc:NameYonex cock</cbc:Name>
cac:ClassifiedTaxCategory
cbc:IDS</cbc:ID>
cbc:Percent15.0</cbc:Percent>
cac:TaxScheme
cbc:IDVAT</cbc:ID>
</cac:TaxScheme>
</cac:ClassifiedTaxCategory>
</cac:Item>
cac:Price
<cbc:PriceAmount currencyID=“SAR”>20.0</cbc:PriceAmount>
cac:AllowanceCharge
cbc:ChargeIndicatorfalse</cbc:ChargeIndicator>
cbc:AllowanceChargeReasondiscount</cbc:AllowanceChargeReason>
<cbc:Amount currencyID=“SAR”>0.00</cbc:Amount>
</cac:AllowanceCharge>
</cac:Price>
</cac:InvoiceLine>

Credit Note for Discount
<cac:TaxTotal xmlns=“”>
<cbc:TaxAmount currencyID=“SAR”>12.00</cbc:TaxAmount>
</cac:TaxTotal>
<cac:TaxTotal xmlns=“”>
<cbc:TaxAmount currencyID=“SAR”>12.00</cbc:TaxAmount>
cac:TaxSubtotal
<cbc:TaxableAmount currencyID=“SAR”>80.00</cbc:TaxableAmount>
<cbc:TaxAmount currencyID=“SAR”>12.00</cbc:TaxAmount>
cac:TaxCategory
<cbc:ID schemeAgencyID=“6” schemeID=“UN/ECE 5305”>S</cbc:ID>
cbc:Percent15.0</cbc:Percent>
cac:TaxScheme
<cbc:ID schemeAgencyID=“6” schemeID=“UN/ECE 5153”>VAT</cbc:ID>
</cac:TaxScheme>
</cac:TaxCategory>
</cac:TaxSubtotal>
</cac:TaxTotal>
<cac:LegalMonetaryTotal xmlns=“”>
<cbc:LineExtensionAmount currencyID=“SAR”>80.00</cbc:LineExtensionAmount>
<cbc:TaxExclusiveAmount currencyID=“SAR”>80.00</cbc:TaxExclusiveAmount>
<cbc:TaxInclusiveAmount currencyID=“SAR”>92.00</cbc:TaxInclusiveAmount>
<cbc:AllowanceTotalAmount currencyID=“SAR”>0.00</cbc:AllowanceTotalAmount>
<cbc:ChargeTotalAmount currencyID=“SAR”>0.00</cbc:ChargeTotalAmount>
<cbc:PrepaidAmount currencyID=“SAR”>0.00</cbc:PrepaidAmount>
<cbc:PayableRoundingAmount currencyID=“SAR”>0.00</cbc:PayableRoundingAmount>
<cbc:PayableAmount currencyID=“SAR”>92.00</cbc:PayableAmount>
</cac:LegalMonetaryTotal>
<cac:InvoiceLine xmlns=“”>
cbc:ID1</cbc:ID>
<cbc:InvoicedQuantity unitCode=“PCE”>5.0</cbc:InvoicedQuantity>
<cbc:LineExtensionAmount currencyID=“SAR”>80.00</cbc:LineExtensionAmount>
cac:TaxTotal
<cbc:TaxAmount currencyID=“SAR”>12.00</cbc:TaxAmount>
<cbc:RoundingAmount currencyID=“SAR”>92.00</cbc:RoundingAmount>
</cac:TaxTotal>
cac:Item
cbc:NameYonex cock</cbc:Name>
cac:ClassifiedTaxCategory
cbc:IDS</cbc:ID>
cbc:Percent15.0</cbc:Percent>
cac:TaxScheme
cbc:IDVAT</cbc:ID>
</cac:TaxScheme>
</cac:ClassifiedTaxCategory>
</cac:Item>
cac:Price
<cbc:PriceAmount currencyID=“SAR”>80.0</cbc:PriceAmount>
cac:AllowanceCharge
cbc:ChargeIndicatorfalse</cbc:ChargeIndicator>
cbc:AllowanceChargeReasondiscount</cbc:AllowanceChargeReason>
<cbc:Amount currencyID=“SAR”>20.00</cbc:Amount>
</cac:AllowanceCharge>
</cac:Price>
</cac:InvoiceLine>

@itujar_it 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.

@Ankit.K.Tiwari

How tax amount is reflected in the xml for an invoice where disount is given after the sale?

eg: An invoice has been issued for an amount of 300SAR. Now the seller is giving 30SAR discount for the given sale.

How tax has to be handled for this discount amount?

After applying the discount, total taxable amount will be decreased to 270, and the corresponding tax amount will also be reduced. This tax difference has to be credited to the customer or not. How to handle this tax difference?

The discount amount of 30SAR will also have tax related to it. Who is supposed to pay this tax?

@itujar_it Article 54 of KSA VAT Regulations mandate issuance of a Credit Note for post sales adjustments in order to reduce the output VAT liability. In above example, you have to issue Credit Note for 30 SAR. Credit note will go on to reduce the VAT payable by the seller to ZATCA. This is a business as usual scenario, please consult with your tax and accounting team.