Openbravo Issue Tracking System - Openbravo Localizations
View Issue Details
0050831Openbravo LocalizationsLocalization Italypublic2022-11-10 13:122022-11-14 12:17
ucarrion 
jetxarri 
normalmajoralways
closedfixed 
5
 
 
0050831: Discount tag is in the eInvoice XML even if the transaction has no discount related
Currently the eInvoice XML informs always the discount tag, even if in the related transaction No discount has been applied. In those cases, the discount tag is informed as below:

        <ScontoMaggiorazione>
          <Tipo>SC</Tipo>
          <Importo>0.00</Importo>
        </ScontoMaggiorazione>

Following the authorities' specs, there is NO need to inform this tag if there is no real discount in the transaction. See point 2.1.1.8. For the example attached check that, if the mentioned tag is removed, the https://www.fatturacheck.it/ [^] web validator validates perfectly the file.
-Login an Italian terminal.
-Do a sales invoice adding a product with NO discount involved.
-Pay in cash and complete.
-Go to the backoffice and run the 'Export Italy Invoices to a XML file' background process.
Go to the Sales Order window and see the attachment generated for the record of the just generated invoice.
-Open the XML file and check.
The <ScontoMaggiorazione> must be informed ONLY if there is a discount in the transaction (no matter if it is manual and/or automatic).
NOR, NORAUTO
xml IT06026940012_0lfvn.xml (2,953) 2022-11-10 13:12
https://issues.openbravo.com/file_download.php?file_id=17791&type=bug
xls Table view B2B Ordinary invoice (5).xls (180,736) 2022-11-10 13:44
https://issues.openbravo.com/file_download.php?file_id=17795&type=bug
Issue History
2022-11-10 13:12ucarrionNew Issue
2022-11-10 13:12ucarrionAssigned To => psanjuan
2022-11-10 13:12ucarrionFile Added: IT06026940012_0lfvn.xml
2022-11-10 13:12ucarrionTag Attached: NOR
2022-11-10 13:12ucarrionTag Attached: NORAUTO
2022-11-10 13:44ucarrionFile Added: Table view B2B Ordinary invoice (5).xls
2022-11-10 15:57jetxarriAssigned Topsanjuan => jetxarri
2022-11-10 18:27hgbotNote Added: 0143437
2022-11-14 12:17hgbotNote Added: 0143519
2022-11-14 12:17hgbotResolutionopen => fixed
2022-11-14 12:17hgbotStatusnew => closed
2022-11-14 12:17hgbotNote Added: 0143520

Notes
(0143437)
hgbot   
2022-11-10 18:27   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.localization.italy.einvoice/-/merge_requests/25 [^]
(0143519)
hgbot   
2022-11-14 12:17   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.localization.italy.einvoice/-/merge_requests/25 [^]
(0143520)
hgbot   
2022-11-14 12:17   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.localization.italy.einvoice [^]
Changeset: 34b230fef0cbcc06661a5db4698797085eb4a635
Author: Javier Etxarri <javier.etxarri@openbravo.com>
Date: 14-11-2022 11:17:24
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.localization.italy.einvoice/-/commit/34b230fef0cbcc06661a5db4698797085eb4a635 [^]

Fixes ISSUE-50831: Discount tag is in the eInvoice XML even if the transaction has no discount related

---
M src-test/org/openbravo/localization/italy/einvoice/TestItalyXMLCreationFromJson.java
M src/org/openbravo/localization/italy/einvoice/xmlengine/document/ItalyDettaglioLinee.java
---