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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0022853
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 08. Project and service managementmajoralways2013-01-21 12:222013-04-19 12:52
ReportermalsasuaView Statuspublic 
Assigned ToSandrahuguet 
PriorityhighResolutionfixedFixed in Version
StatusclosedFix in branchpiFixed in SCM revision5f12b1476761
ProjectionnoneETAnoneTarget Version
OSLinux 32 bitDatabasePostgreSQLJava version1.6.0_18
OS VersionCommunity ApplianceDatabase version8.3.9Ant version1.7.1
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

0022853: Error in Create AP Expense process when price precision is 4

DescriptionWhen you use the process "Create AP Expense", if the price in the expense line has got 3 decimals, and the price precision is 4 (in the currency), the line net amount, in invoice line created is wrong.
Steps To Reproduce. F&B
. currency: EUR -> price precision= 4
. BP Javier Martin ->
  . tab Vendor
   vendor: 'Y'
   po price list: tarifa bebidas alegres
   po payment method: al contado
   po payment terms: 30 days
. product:
   cerveza ale 0.5L
   . product type: Expense type

. new Expense Sheet:
  . employee Javier Martin
  . line: product Cerveza ale 0.5L
          time sheet: N
          qty: 57.15
          net unit price: 1.258 (when you save, 1.26 is displayed)
          (expense amt= 72.01)
  . process
. run process Create AP Expense
the line, in the invoice created, the expense amt is 71.89, and it should be 72.01
Proposed Solution. the problem is in line 343 of file ExpenseAPInvoice.java:
 (new BigDecimal(strPricestd).multiply(qty)).toPlainString()
should be
(new BigDecimal(strPricestd).multiply(qty)).setScale(StdPrecision, BigDecimal.ROUND_HALF_UP).toPlainString()
and move the line 376
int StdPrecision = Integer.valueOf(strStdPrecision).intValue();
to the line 283
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0057916)
Sandrahuguet (developer)
2013-04-16 09:54

Test Plan:
. F&B
. currency: EUR -> price precision= 4
. BP Javier Martin ->
  . tab Vendor
   vendor: 'Y'
   po price list: tarifa bebidas alegres
   po payment method: al contado
   po payment terms: 30 days
. product:
   cerveza ale 0.5L
   . product type: Expense type

. new Expense Sheet:
  . employee Javier Martin
  . line: product Cerveza ale 0.5L
          time sheet: N
          qty: 57.15
          net unit price: 1.258 (when you save, 1.26 is displayed)
          (expense amt= 72.01)
  . process
. run process Create AP Expense
the line, in the invoice created, the expense amt is 72.01
(0057928)
hgbot (developer)
2013-04-16 13:19

Repository: erp/devel/pi
Changeset: 5f12b1476761c4c4b1ae92d9c31e2e3a5e183938
Author: Sandra Huguet <sandra.huguet <at> openbravo.com>
Date: Fri Apr 12 09:49:05 2013 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/5f12b1476761c4c4b1ae92d9c31e2e3a5e183938 [^]

Fixed bug 22853 Error in Create APExpenseProcess when price precision is 4

---
M src/org/openbravo/erpCommon/ad_process/ExpenseAPInvoice.java
---
(0057929)
hgbot (developer)
2013-04-16 13:19

Repository: erp/devel/pi
Changeset: 5c4354047500beaadfaf89bfc65778a734649c9c
Author: Pandeeswari Ramakrishnan <pandeeswari.ramakrishnan <at> openbravo.com>
Date: Tue Apr 16 13:03:50 2013 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/5c4354047500beaadfaf89bfc65778a734649c9c [^]

Related to Issue 22853: Error in Create AP Expense process when price precision is 4

---
M src/org/openbravo/erpCommon/ad_process/ExpenseAPInvoice.java
---
(0057931)
pramakrishnan (developer)
2013-04-16 13:25

Code Review + Testing - OK.
(0058036)
hudsonbot (developer)
2013-04-19 12:52

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/872081925d42 [^]

Maturity status: Test
(0058037)
hudsonbot (developer)
2013-04-19 12:52

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/872081925d42 [^]

Maturity status: Test

- Issue History
Date Modified Username Field Change
2013-01-21 12:22 malsasua New Issue
2013-01-21 12:22 malsasua Assigned To => dmiguelez
2013-01-21 12:22 malsasua Web browser => Google Chrome
2013-01-21 12:22 malsasua Modules => Core
2013-01-21 12:22 malsasua Triggers an Emergency Pack => No
2013-04-15 09:32 Sandrahuguet Assigned To dmiguelez => Sandrahuguet
2013-04-15 09:32 Sandrahuguet Status new => scheduled
2013-04-15 09:32 Sandrahuguet fix_in_branch => pi
2013-04-16 09:54 Sandrahuguet Note Added: 0057916
2013-04-16 13:19 hgbot Checkin
2013-04-16 13:19 hgbot Note Added: 0057928
2013-04-16 13:19 hgbot Status scheduled => resolved
2013-04-16 13:19 hgbot Resolution open => fixed
2013-04-16 13:19 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/5f12b1476761c4c4b1ae92d9c31e2e3a5e183938 [^]
2013-04-16 13:19 hgbot Checkin
2013-04-16 13:19 hgbot Note Added: 0057929
2013-04-16 13:25 pramakrishnan Review Assigned To => pramakrishnan
2013-04-16 13:25 pramakrishnan Note Added: 0057931
2013-04-16 13:25 pramakrishnan Status resolved => closed
2013-04-19 12:52 hudsonbot Checkin
2013-04-19 12:52 hudsonbot Note Added: 0058036
2013-04-19 12:52 hudsonbot Checkin
2013-04-19 12:52 hudsonbot Note Added: 0058037


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker