Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0030156
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Localization Pack: Spain] AEAT 390 Cash VAT compatiblemajoralways2015-06-11 12:292015-06-12 12:23
ReportervmromanosView Statuspublic 
Assigned Tovmromanos 
PrioritynormalResolutionfixedFixed in Version
StatusclosedFix in branchFixed in SCM revisionf34cff28ee30
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Regression date
Regression introduced by commit
Regression level
Review Assigned To
Regression introduced in release
Summary

0030156: Wrong amounts calculated in scenarios where invoice's amount is higher that order's amount

DescriptionIn case an invoice is generated from an order, and the invoice's amount is higher that order's amount, the 390 wrongly calculates the tax %.

The reason is that the negative tax amount in Invoice | Tax | Cash VAT tab is added to the total 390 tax amount.
Steps To ReproduceCreate a Sales Order dated on 2014 with a 21% Cash VAT tax rate. Total amount 10.000€
Create an invoice from the previous order. Edit the net unit price and set a lower amount (for instance 5.000,00 tax base amount = Line Net Price, therefore tax amount = 1050.00)

Complete the invoice and post it.

Pay the invoice dated on 2014.

Realize that two lines have been created under Cash VAT tab:
Percentage // Taxable Amount // Tax Amount
-100 // -5000.00 // -1050.00
200 // 10000.00 // 21000.00
Sum up of above two lines is:

100 // 5000.00 // 1050.00


Launch the 390. Verify that the tax amount is not properly calculated.
TagsNo tags attached.
Attached Filesxml file icon 3902014Antes.xml [^] (3,055 bytes) 2015-06-12 12:17
xml file icon 3902014Error.xml [^] (3,056 bytes) 2015-06-12 12:17
xml file icon 3902014Despues.xml [^] (3,056 bytes) 2015-06-12 12:17

- Relationships Relation Graph ] Dependency Graph ]
related to defect 00274843.0PR14Q4 closedAtulOpenbravo Openbravo ERP Wrong cash vat lines when payment is automatically created and invoice's amount is higher that order's amount 

-  Notes
(0078210)
hgbot (developer)
2015-06-11 15:23

Repository: erp/pmods/org.openbravo.module.aeat390.es
Changeset: f34cff28ee305274ab0ec904b31289b81f399adc
Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com>
Date: Thu Jun 11 15:20:33 2015 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.module.aeat390.es/rev/f34cff28ee305274ab0ec904b31289b81f399adc [^]

Fixed bug 30156: Wrong amounts calculated in scenarios where invoice's amount is higher that order's amount
In this scenario, the ITCV tax amount was added as a positive value to the total tax amount. Now we add it to the total tax amount taking into account its sign.
This should be safe because Cash VAT taxes don't have complex scenarios with several child tax rates with negative rates

---
M src-db/database/sourcedata/AD_MODULE.xml
M src/org/openbravo/module/aeat390/es/api/cashvat/AEAT390CashVATReadyCalculationsHelper.java
---
(0078232)
psanjuan (manager)
2015-06-12 12:15
edited on: 2015-06-12 12:25

Verified. See xml files attached.

Antes:
<RegGeneral>
<BaseImponibleyCuota>
            <RegCriterioCaja>
                <Tipo4>
                    <BI>11538.56</BI>
                    <Cuota>461.54</Cuota>
                </Tipo4>
                <Tipo10>
                    <BI>1041.03</BI>
                    <Cuota>104.11</Cuota>
                </Tipo10>
                <Tipo21>
                    <BI>99385.08</BI>
                    <Cuota>20870.88</Cuota>
                </Tipo21>

Error:

<RegGeneral>
        <BaseImponibleyCuota>
            <RegCriterioCaja>
                <Tipo4>
                    <BI>11538.56</BI>
                    <Cuota>461.54</Cuota>
                </Tipo4>
                <Tipo10>
                    <BI>1041.03</BI>
                    <Cuota>104.11</Cuota>
                </Tipo10>
                <Tipo21>
                    <BI>104385.08</BI> (99385.08 + 5000.00)
                    <Cuota>24020.88</Cuota> (20870.88 + 1050.00 +2100.00)
                </Tipo21>

Despues:
<RegGeneral>
        <BaseImponibleyCuota>
            <RegCriterioCaja>
                <Tipo4>
                    <BI>11538.56</BI>
                    <Cuota>461.54</Cuota>
                </Tipo4>
                <Tipo10>
                    <BI>1041.03</BI>
                    <Cuota>104.11</Cuota>
                </Tipo10>
                <Tipo21>
                    <BI>104385.08</BI> (99385.08 + 5000.00)
                    <Cuota>21920.88</Cuota> (20870.88 + 1050.00)
                </Tipo21>


- Issue History
Date Modified Username Field Change
2015-06-11 12:29 vmromanos New Issue
2015-06-11 12:29 vmromanos Assigned To => vmromanos
2015-06-11 12:29 vmromanos Issue generated from 0030155
2015-06-11 12:29 vmromanos Relationship added related to 0027484
2015-06-11 12:45 vmromanos Priority immediate => normal
2015-06-11 15:23 vmromanos Status new => scheduled
2015-06-11 15:23 hgbot Checkin
2015-06-11 15:23 hgbot Note Added: 0078210
2015-06-11 15:23 hgbot Status scheduled => resolved
2015-06-11 15:23 hgbot Resolution open => fixed
2015-06-11 15:23 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.module.aeat390.es/rev/f34cff28ee305274ab0ec904b31289b81f399adc [^]
2015-06-12 11:31 psanjuan Steps to Reproduce Updated View Revisions
2015-06-12 12:15 psanjuan Note Added: 0078232
2015-06-12 12:15 psanjuan Status resolved => closed
2015-06-12 12:15 psanjuan Steps to Reproduce Updated View Revisions
2015-06-12 12:17 psanjuan File Added: 3902014Antes.xml
2015-06-12 12:17 psanjuan File Added: 3902014Error.xml
2015-06-12 12:17 psanjuan File Added: 3902014Despues.xml
2015-06-12 12:20 psanjuan Note Edited: 0078232 View Revisions
2015-06-12 12:23 psanjuan Steps to Reproduce Updated View Revisions
2015-06-12 12:24 psanjuan Note Edited: 0078232 View Revisions
2015-06-12 12:25 psanjuan Note Edited: 0078232 View Revisions


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker