Skip to Content

Discounts on Electronic Invoices? Avoid Errors with SUNAT by Correctly Applying Line and Global Discounts

Learn to tell them apart: discover how to apply discounts on your electronic invoices without problems with SUNAT, differentiating between product-line discounts and total discounts, and optimize your tax management with Odoo.
December 10, 2025 by
Discounts on Electronic Invoices? Avoid Errors with SUNAT by Correctly Applying Line and Global Discounts
Wilfredo Fernando Pastor Avila
| No comments yet

The frustration of an invoice rejected because of an incorrectly applied discount

María, manager of a medical supplies distributor in Lima, was about to close a major order with a regional hospital. To win over the client, she decided to apply a 15% discount on surgical gloves, which represented 70% of the total value. Confident in her system, she generated the electronic invoice and sent it to SUNAT. Hours later, she received a notification: "XML validation error - inconsistency in discount amounts". The order stalled, the client grew impatient, and María spent the afternoon on calls with her accountant and manually reviewing calculations. The problem: she had applied a global discount when she needed one on a specific line. Situations like this are more common than they seem, and understanding the difference can save you tax headaches.

Line discount: when the benefit is for specific products

A line discount is applied to one or more specific products within an invoice. In Odoo, it is configured directly on the product line in the invoice, and its declaration in the SUNAT XML is precise: it appears within each affected item, showing the percentage applied and reducing the taxable base of that specific product before taxes are calculated.

Applied example: TechSoluciones sells enterprise software. For a client who buys 3 basic licenses at S/1,000 each and 1 premium license at S/3,000, they decide to apply a 10% discount only on the premium license as an incentive. In Odoo, on the premium license line, they enter 10% in the discount field. The generated XML will show the discount in the block of that specific line, calculating a new base of S/2,700 for that item. The tax (IGV) will be calculated on S/2,700 + S/3,000 (basic licenses) = S/5,700. Implementing this correctly from the start avoids tedious reviews; tools like Ganemo's ensure that the Odoo configuration always generates valid XMLs aligned with SUNAT requirements.

Global discount: when the benefit applies to the entire transaction

A global discount affects the total amount of the invoice, not individual products. In Odoo, it is applied as a general discount on the invoice. In the SUNAT XML, it is declared outside the item lines, in a specific block (AllowanceCharge) with code 2 for global discount, indicating the absolute amount of the discount and how it is proportionally distributed among all items to recalculate the total taxable base.

Applied example: Constructora Andina closes a materials supply contract for S/10,000. To celebrate the long-term partnership, they offer a S/500 discount on the total. In Odoo, they apply a global discount of S/500. The XML will show a global discount block indicating the S/500, and will proportionally calculate how this discount reduces the base of each item (cement, rebar, etc.). The new total taxable base will be S/9,500, and the IGV will be calculated on this amount. Managing global discounts can be complex if the system does not calculate the proportion automatically; with Ganemo's advice, you can configure Odoo to handle these calculations flawlessly, ensuring compliance without manual effort.

Why is it crucial to correctly declare discounts to SUNAT?

SUNAT requires that any change to the original value (such as discounts) be declared in the XML to maintain tax traceability and correctly calculate taxes. Not declaring a discount, or declaring it in the wrong block, creates inconsistencies between what was invoiced and what was declared, leading to rejections, fines or observations that delay your operations.

Applied example: A café in Arequipa applied "2-for-1 on desserts" discounts directly at the register, without reflecting them in its electronic invoicing. During an audit, SUNAT detected that the declared income did not match its sales projections, generating an under-declaration observation. After regularizing, they implemented line discounts for desserts in Odoo, correctly declaring each promotion in the XML. This not only solved the tax problem but also gave them precise data to analyze the effectiveness of their promotions. Complying with SUNAT does not have to be a burden; comprehensive solutions like those offered by Ganemo turn this requirement into a management advantage.

Conclusion: choose the type of discount according to your business need

Use line discounts when the benefit is for specific products (e.g., stock clearance, volume discount on one item). Use global discounts when the benefit applies to the entire invoice (e.g., early payment discount, customer loyalty discount). In both cases, Odoo (version 19 onward) handles the generation of the XML automatically, but the key is to configure and use it correctly from the start to avoid errors. Integrating these best practices into your invoicing flow not only ensures compliance but also streamlines your business operations.

Related video

Discounts on Electronic Invoices? Avoid Errors with SUNAT by Correctly Applying Line and Global Discounts
Wilfredo Fernando Pastor Avila December 10, 2025
Share this post
Tags
Archive
Sign in to leave a comment
Is Your Team Drowning in WhatsApp Voice Notes? Discover How to Automate Smart Replies
Turn your customers' voice messages into immediate sales opportunities with AI agents that understand meaning, not just words