Openbravo Issue Tracking System - Localization Pack: Spain
View Issue Details
0020568Localization Pack: SpainAEAT 349public2012-05-21 18:532015-11-12 12:34
dmiguelez 
vmromanos 
normalmajoralways
closedfixed 
20Community Appliance
 
 
0020568: Add compatibility with new Document Type Return Material Sales Invoice
A new Document Type has been created, Return Material Sales Invoice, with a new document base type associated, ARI_RM.

This module has to be modified to be compatible with it.
This is the code that may be affected.

org.openbravo.module.aeat349.es/src/org/openbravo/module/aeat349/es/AEAT3492010ReportDao.java: .append(" and (fa.documentCategory = 'ARI' or (fa.documentCategory = 'ARC' and i.grandTotalAmount > 0)"
org.openbravo.module.aeat349.es/src/org/openbravo/module/aeat349/es/AEAT3492010ReportDao.java: + "or (fa.documentCategory = 'ARI' and fa.documentType.reversal = 'Y' and i.grandTotalAmount > 0)) ");
No tags attached.
related to defect 0018825 closed jecharri 349 should properly manage Reverse Purchase/Sales invoices 
Issue History
2012-05-21 18:53dmiguelezNew Issue
2012-05-21 18:53dmiguelezAssigned To => jonalegriaesarte
2012-05-21 19:05jonalegriaesarteAssigned Tojonalegriaesarte => vmromanos
2014-04-15 11:47psanjuanTypefeature request => defect
2014-07-23 14:09psanjuanNote Added: 0068841
2014-07-23 14:09psanjuanTypedefect => design defect
2015-10-14 16:59vmromanosStatusnew => scheduled
2015-10-14 17:38vmromanosRelationship addedrelated to 0018825
2015-10-14 18:28vmromanosNote Added: 0081022
2015-10-14 18:28hgbotCheckin
2015-10-14 18:28hgbotNote Added: 0081023
2015-10-14 18:28hgbotStatusscheduled => resolved
2015-10-14 18:28hgbotResolutionopen => fixed
2015-10-14 18:28hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.module.aeat349.es/rev/2a76b6457bf306e86841471116c0e8216ba4b304 [^]
2015-10-14 18:30vmromanosNote Added: 0081024
2015-10-28 10:10dmitry_mezentsevNote Added: 0081376
2015-11-12 12:26psanjuanNote Added: 0081750
2015-11-12 12:34psanjuanNote Edited: 0081750bug_revision_view_page.php?bugnote_id=0081750#r10180
2015-11-12 12:34psanjuanStatusresolved => closed

Notes
(0068841)
psanjuan   
2014-07-23 14:09   
Issue changed to design defect as this is not a bug.
(0081022)
vmromanos   
2015-10-14 18:28   
Test Plan:

As Openbravo Admin
 Apply the Taxes dataset to * org
 Apply the 349 dataset to FB España
 Go to sales invoice window.
 Create a new Return Material sales invoice for Alimentos y Supermercados
 Enter any line with negative amount and tax rate = Entregas intracomunitarias (%N=>0%)
 Complete and post the invoice
 
 Go to Tax Report Launcher window
 Select FB España, 349 report v2010 and the year where the previous invoice has been created
 Launch the report. Fill the necessary data and press OK.
 An error message is shown: Se han detectado devoluciones por valor superior al importe facturado para el tercero: Alimentos y Supermercados, S.A
 because the invoice is detected.
 Go back to the invoice and unpost and reactivate it
 Launch the report again.
 An error message is shown: No se han detectado en el sistema transacciones correspondientes al modelo 349 para el periodo seleccionado.
(0081023)
hgbot   
2015-10-14 18:28   
Repository: erp/pmods/org.openbravo.module.aeat349.es
Changeset: 2a76b6457bf306e86841471116c0e8216ba4b304
Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com>
Date: Wed Oct 14 18:21:04 2015 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.module.aeat349.es/rev/2a76b6457bf306e86841471116c0e8216ba4b304 [^]

Fixed bug 20568: Add compatibility with new Document Type Return Material Sales Invoice

A Return Material Sales Invoice is like a sales invoice with negative amounts.
The fix only extends the filters for the queries to support this document type in the same places ARI is used.

---
M src-db/database/sourcedata/AD_MODULE.xml
M src/org/openbravo/module/aeat349/es/AEAT3492010ReportDao.java
M src/org/openbravo/module/aeat349/es/AEAT349ReportDao.java
---
(0081024)
vmromanos   
2015-10-14 18:30   
Fixed in Modelo 349 2.1.1 (or higher)
(0081376)
dmitry_mezentsev   
2015-10-28 10:10   
Not closed for 14 days!
(0081750)
psanjuan   
2015-11-12 12:26   
(edited on: 2015-11-12 12:34)
Test Plan above verified.

Besides that:

Create a sales invoice for a UE Customer for a total amount of 10.00. Complete and Post the invoice in November 2015. Check that the tax rate shown in the invoice is "Entregas Intracomunitarias....."

Launch 349 tax report for November 2015 and check that UE customer transaction for an amount of 10.00 is included.

Create a return material sales invoice for the UE Customer for a total amount of -5.00 dated also in Nov 2015. Complete and Post the return sales invoice in November 2015.

Launch 349 tax report for November 2015 and check that UE customer transaction shows now an amount of 5.00.

Go to Sales invoice window and enter a new return material sales invoice dated on Dec 2015. Add a line for an invoice quantity -1, line net amount = -1.00
Go to "Reversed Invoices" tab and select the positive invoice created in November (amount = 10.00) and check the flag "Correctiva del 349". After that enter below data:
Año = 2015
Periodo = 11-Noviembre
Base Imponible del 349 Productos = 5.00

complete and post the invoice.

Launch 349 tax report for December 2015. See file attached.
Import that file in Informativas and realize that the return material sales invoice is properly shown in "Rectificaciones" with below data:
Base declarada anteriormente = 5.00
Base imponible rectificada = 4.00


Issue closed.