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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0022694
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 09. Financial managementminoralways2012-12-28 09:382013-03-14 11:50
ReportermalsasuaView Statuspublic 
Assigned Tonaiaramartinez 
PriorityhighResolutionfixedFixed in Version
StatusclosedFix in branchpiFixed in SCM revisionc305b1980e66
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseOracleJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Topramakrishnan
Web browserGoogle Chrome
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0022694: wrong amount with accruals & deferrals post invoice [oracle]

DescriptionIn oracle, the amount calculate when you post an invoice with deferred revenue is wrong.
Steps To ReproduceF&B
. create new sales invoice
. create new line:
 . product: Cerveza Ale 0.5 L
 . invoiced qty: 1
 . net unit price & list price: 350
 . deferred revenue: selected
 . revenue plan type: monthly
 . period number: 12
 . starting period: Nov-12
process and post
The accounting generated is:
the amount of entries to deferred account is 29.00
and it should be 29.17
Proposed Solutionchange in method calculateAccDefPlan of file DocInvoice.java
from
 BigDecimal periodAmount = amount.divide(new BigDecimal(periodNumber), BigDecimal.ROUND_HALF_UP);

to
    int stdPrecision = OBDal.getInstance().get(Currency.class, this.C_Currency_ID)
        .getStandardPrecision().intValue();
    BigDecimal periodAmount = amount.divide(new BigDecimal(periodNumber),
        new MathContext(32, RoundingMode.HALF_UP)).setScale(stdPrecision, BigDecimal.ROUND_HALF_UP);
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0023327 closednaiaramartinez Add SetAdminMode(true) to avoid an error 

-  Notes
(0055501)
naiaramartinez (developer)
2013-01-14 11:13

Test Plan
log in as F&B International Group Admin Role.

Go to Product window and select Cerveza Ale 0.5 L. Go to Accounting tab and fill out Product Deferred Revenue.

Go to Sales invoice window
  create new sales invoice
  create new line:
    product: Cerveza Ale 0.5 L
    invoiced qty: 1
    net unit price & list price: 350
    deferred revenue: selected
    revenue plan type: monthly
    period number: 12
    starting period: Nov-12
process and post it.

The accounting generated is:
the amount of entries to deferred account is 29.17, and it is correct
(0057243)
hgbot (developer)
2013-03-14 10:27

Repository: erp/devel/pi
Changeset: c305b1980e666b90a4aa386a1db9630f937aec11
Author: Naiara Martinez <naiara.martinez <at> openbravo.com>
Date: Mon Jan 14 10:24:20 2013 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/c305b1980e666b90a4aa386a1db9630f937aec11 [^]

fixed bug 22694: wrong amount with accruals & deferrals post invoice

---
M src/org/openbravo/erpCommon/ad_forms/DocInvoice.java
---
(0057251)
pramakrishnan (developer)
2013-03-14 11:50

Code Review + Testing - OK.

- Issue History
Date Modified Username Field Change
2012-12-28 09:38 malsasua New Issue
2012-12-28 09:38 malsasua Assigned To => dmiguelez
2012-12-28 09:38 malsasua Web browser => Google Chrome
2012-12-28 09:38 malsasua Modules => Core
2012-12-28 09:38 malsasua Triggers an Emergency Pack => No
2012-12-28 10:26 malsasua Web browser Google Chrome => Google Chrome
2012-12-28 10:26 malsasua Proposed Solution updated
2013-01-11 13:51 naiaramartinez Assigned To dmiguelez => naiaramartinez
2013-01-11 13:51 naiaramartinez Status new => scheduled
2013-01-11 13:51 naiaramartinez fix_in_branch => pi
2013-01-14 11:13 naiaramartinez Note Added: 0055501
2013-03-14 10:27 hgbot Checkin
2013-03-14 10:27 hgbot Note Added: 0057243
2013-03-14 10:27 hgbot Status scheduled => resolved
2013-03-14 10:27 hgbot Resolution open => fixed
2013-03-14 10:27 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/c305b1980e666b90a4aa386a1db9630f937aec11 [^]
2013-03-14 11:50 pramakrishnan Review Assigned To => pramakrishnan
2013-03-14 11:50 pramakrishnan Note Added: 0057251
2013-03-14 11:50 pramakrishnan Status resolved => closed
2013-03-18 12:20 naiaramartinez Relationship added related to 0023327


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker