Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0022853Openbravo ERP08. Project and service managementpublic2013-01-21 12:222013-04-19 12:52
malsasua 
Sandrahuguet 
highmajoralways
closedfixed 
20Community Appliance
 
 
pramakrishnan
Google Chrome
Core
No
0022853: Error in Create AP Expense process when price precision is 4
When 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.
. 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
. 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
No tags attached.
Issue History
2013-01-21 12:22malsasuaNew Issue
2013-01-21 12:22malsasuaAssigned To => dmiguelez
2013-01-21 12:22malsasuaWeb browser => Google Chrome
2013-01-21 12:22malsasuaModules => Core
2013-01-21 12:22malsasuaTriggers an Emergency Pack => No
2013-04-15 09:32SandrahuguetAssigned Todmiguelez => Sandrahuguet
2013-04-15 09:32SandrahuguetStatusnew => scheduled
2013-04-15 09:32Sandrahuguetfix_in_branch => pi
2013-04-16 09:54SandrahuguetNote Added: 0057916
2013-04-16 13:19hgbotCheckin
2013-04-16 13:19hgbotNote Added: 0057928
2013-04-16 13:19hgbotStatusscheduled => resolved
2013-04-16 13:19hgbotResolutionopen => fixed
2013-04-16 13:19hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/5f12b1476761c4c4b1ae92d9c31e2e3a5e183938 [^]
2013-04-16 13:19hgbotCheckin
2013-04-16 13:19hgbotNote Added: 0057929
2013-04-16 13:25pramakrishnanReview Assigned To => pramakrishnan
2013-04-16 13:25pramakrishnanNote Added: 0057931
2013-04-16 13:25pramakrishnanStatusresolved => closed
2013-04-19 12:52hudsonbotCheckin
2013-04-19 12:52hudsonbotNote Added: 0058036
2013-04-19 12:52hudsonbotCheckin
2013-04-19 12:52hudsonbotNote Added: 0058037

Notes
(0057916)
Sandrahuguet   
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   
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   
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   
2013-04-16 13:25   
Code Review + Testing - OK.
(0058036)
hudsonbot   
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   
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