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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0033340
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Modules] Cash VAT Managementmajoralways2016-06-23 13:582016-06-24 22:11
ReporterpsanjuanView Statuspublic 
Assigned Tovmromanos 
PriorityurgentResolutionfixedFixed in Version
StatusclosedFix in branchFixed in SCM revision7341d1f97b97
ProjectionnoneETAnoneTarget Version
OSLinux 64 bitDatabasePostgreSQLJava version1.6.0_18
OS VersionProfessional ApplianceDatabase version8.3.9Ant version1.7.1
Product VersionSCM revision 
Regression date
Regression introduced by commit
Regression level
Review Assigned Topsanjuan
Regression introduced in release
Summary

0033340: Cash VAT management should handle at least 10 decimals while getting Tax/Tax Base Amounts calculations.

DescriptionCash VAT management should handle at least 10 decimals while getting Tax/Tax Base Amounts calculations.
Steps To ReproduceCreate a purchase invoice set as Cash VAT.
Invoice Amount = 1028500,00€ for instance.
Complete and Post.

Create a payment for that invoice for a small amount such as 20.00€

Go to Cash VAT tab and realize that the % calculated is = 0.00, because:


20/1028500.00 x 100 = 0.001944579 = 0.00
Proposed SolutionInternally more than 2 decimals need to be handle so amounts are calculated by using at leas 15 in our case 0.001944579, that will end in a tax base/tax base amount different to 0.00
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0087891)
psanjuan (manager)
2016-06-24 12:58
edited on: 2016-06-24 13:03

Test Plan for the verification of the issue:

Create a purchase invoice for F&B España, Bebidas Alegres BP. Set it us Cash VAT.
Go to lines and enter a line with Cerveza Ale 0.5L product, invoiced qty = 850.000. Make sure a Cash VAT tax is used.
Make sure no discount is applied.

Complete and Post the invoice. Make sure that invoice posting reflects a temporary tax ledger account.

Add a payment for 20.00. Check Cash VAT tab shows below info:
Percentage = 0
Tax Amount = 0.00
Taxable Amount = 0.00

Add a payment for 35000. Check Cash VAT tab shows below info:
Percentage = 2.5
Tax Amount = 6069.00
Taxable Amount = 28900.00

Add a payment for 363740.00. Check Cash VAT tab shows below info:
Percentage = 26
Tax Amount = 63117.60
Taxable Amount = 300560.00

Add a payment for 450000. Check Cash VAT tab shows below info:
Percentage = 32.17
Tax Amount = 78095.89
Taxable Amount = 371885.20

Add a payment for 550000.00. Check Cash VAT tab shows below info:
Percentage = 39.33
Tax Amount = 95477.51
Taxable Amount = 454654.80

Verify that the sum is:
Percentage = 100
Tax Amount = 242760.00
Taxable Amount = 1156000.00

(0087892)
psanjuan (manager)
2016-06-24 13:07
edited on: 2016-06-24 13:07

Test Plan for the verification of the fix:

Create a purchase invoice for F&B España, Bebidas Alegres BP. Set it us Cash VAT.
Go to lines and enter a line with Cerveza Ale 0.5L product, invoiced qty = 850.000. Make sure a Cash VAT tax is used.

Complete and Post the invoice. Make sure that invoice posting reflects a temporary tax ledger account.

Add a payment for 20.00. Check Cash VAT tab shows below info:
Percentage = 0.00143
Tax Amount = 3.47
Taxable Amount = 16.53

Add a payment for 35000. Check Cash VAT tab shows below info:
Percentage = 2.502216
Tax Amount = 6074.38
Taxable Amount = 28952.62

Add a payment for 363740.00. Check Cash VAT tab shows below info:
Percentage = 26.004461
Tax Amount = 63128.43
Taxable Amount = 300611.57

Add a payment for 450000. Check Cash VAT tab shows below info:
Percentage = 32.171352
Tax Amount = 78099.17
Taxable Amount = 371900.83

Add a payment for 550000.00. Check Cash VAT tab shows below info:
Percentage = 39.320541
Tax Amount = 95454.55
Taxable Amount = 454654.45

Verify that the sum is:
Percentage = 100
Tax Amount = 242760.00
Taxable Amount = 1156000.00

(0087893)
psanjuan (manager)
2016-06-24 13:08

Test Plan above verified.

Issue can be closed.
(0087897)
hgbot (developer)
2016-06-24 13:25

Repository: erp/devel/pi
Changeset: 7341d1f97b977f53160aeb31d2b1c5860bdb3ba4
Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com>
Date: Thu Jun 23 13:07:42 2016 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/7341d1f97b977f53160aeb31d2b1c5860bdb3ba4 [^]

Fixed bug 33340: Cash VAT percentage rounding issues,
Hardcoded a rounding precision of 15 for cash vat percentage

---
M src/org/openbravo/erpCommon/utility/CashVATUtil.java
---
(0087914)
hudsonbot (developer)
2016-06-24 22:11

A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/cc0900cf80c9 [^]
Maturity status: Test

- Issue History
Date Modified Username Field Change
2016-06-23 13:58 psanjuan New Issue
2016-06-23 13:58 psanjuan Assigned To => Triage Finance
2016-06-23 14:23 psanjuan Steps to Reproduce Updated View Revisions
2016-06-23 14:25 psanjuan Steps to Reproduce Updated View Revisions
2016-06-23 14:25 psanjuan Proposed Solution updated
2016-06-24 12:58 psanjuan Note Added: 0087891
2016-06-24 12:59 psanjuan Note Edited: 0087891 View Revisions
2016-06-24 13:01 psanjuan Note Edited: 0087891 View Revisions
2016-06-24 13:02 psanjuan Note Edited: 0087891 View Revisions
2016-06-24 13:03 psanjuan Note Edited: 0087891 View Revisions
2016-06-24 13:07 psanjuan Note Added: 0087892
2016-06-24 13:07 psanjuan Note Edited: 0087892 View Revisions
2016-06-24 13:08 psanjuan Note Added: 0087893
2016-06-24 13:24 vmromanos Status new => scheduled
2016-06-24 13:24 vmromanos Assigned To Triage Finance => vmromanos
2016-06-24 13:25 hgbot Checkin
2016-06-24 13:25 hgbot Note Added: 0087897
2016-06-24 13:25 hgbot Status scheduled => resolved
2016-06-24 13:25 hgbot Resolution open => fixed
2016-06-24 13:25 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/7341d1f97b977f53160aeb31d2b1c5860bdb3ba4 [^]
2016-06-24 13:25 vmromanos Review Assigned To => psanjuan
2016-06-24 13:25 vmromanos Status resolved => closed
2016-06-24 22:11 hudsonbot Checkin
2016-06-24 22:11 hudsonbot Note Added: 0087914


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker