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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0031550
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 03. Procurement managementmajoralways2015-11-20 13:412015-12-04 15:58
ReporterngarciaView Statuspublic 
Assigned Toaferraz 
PriorityurgentResolutionfixedFixed in Version
StatusclosedFix in branchFixed in SCM revisione867bcaa1cc6
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Todmiguelez
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0031550: Net Unit Price is changed after saving the invoice line if price includes taxes and price precision is higher than 2

DescriptionNet Unit Price is changed after saving the invoice line if price includes taxes and price precision is higher than 2
Steps To ReproduceConfigure the Format.xml file in order to show 6 decimals for prices

As system admin role:
   Change the price precision of EUR currency to 6

As group admin role:
   Create a price list:
      Sales Price List = 'N'
      Price Includes Taxes = 'Y'
   Create a version and add a product to it with a price of 1.573
   Create a Purchase Invoice with that price list
   Add a line with that product and check the Net Unit Price is shown as 1.30
   Save it and check the Net Unit Price changes to 1.297521
Proposed SolutionThe c_get_net_price_from_gross database function is being called with different values in the p_grossamt parameter in the SL_Invoice_Amt callout and in the c_invoiceline_before_trg:

- SL_Invoice_Amt: 1.573 (gross unit price)
- c_invoiceline_before_trg: 1.57 (line gross amount)
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0082536)
psanjuan (manager)
2015-12-02 14:48
edited on: 2015-12-02 15:10

Issue Verified.

Net Unit price changes to 1.297521
Line Net Amount = 1.30
Tax = Adquisiciones IVA 21%
Total Net Amount = 1.30
Total Gross Amount = 1.57

(0082537)
psanjuan (manager)
2015-12-02 14:51
edited on: 2015-12-02 14:53

Test Plan

Configure the Format.xml file in order to show 6 decimals for prices

As system admin role:
   Change the price precision of EUR currency to 6

As group admin role:
   Create a price list:
      Sales Price List = 'N'
      Price Includes Taxes = 'Y'
   Create a version and add a product to it with a price of 1.573
   Create a Purchase Invoice for Bebidas Alegres with that price list
   Add a line with that product and check that the Gross Unit Price shown is 1.573, while line gross amount is 1.57

(0082566)
hgbot (developer)
2015-12-04 10:11

Repository: erp/devel/pi
Changeset: e867bcaa1cc6d81847568342992f0040429f0d4f
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Tue Dec 01 19:06:20 2015 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/e867bcaa1cc6d81847568342992f0040429f0d4f [^]

Fixes issue 31550: Net Unit Price is changed after saving the invoice line

Update call to C_GET_NET_PRICE_FROM_GROSS from C_ORDERLINE_TRG and C_INVOICELINE_BEFORE_TRG to do it with gross_unit_price * qtyinvoiced and taxbaseamt.

---
M src-db/database/model/triggers/C_INVOICELINE_BEFORE_TRG.xml
M src-db/database/model/triggers/C_ORDERLINE_TRG.xml
---
(0082567)
dmiguelez (developer)
2015-12-04 10:12

Code Review + Testing Ok
(0082576)
hudsonbot (developer)
2015-12-04 15:58

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/e875b083dc70 [^]
Maturity status: Test

- Issue History
Date Modified Username Field Change
2015-11-20 13:41 ngarcia New Issue
2015-11-20 13:41 ngarcia Assigned To => Triage Finance
2015-11-20 13:41 ngarcia Modules => Core
2015-11-20 13:41 ngarcia Triggers an Emergency Pack => No
2015-11-20 13:42 ngarcia Issue Monitored: networkb
2015-11-20 13:43 ngarcia Resolution time => 1451516400
2015-11-20 16:20 eugeni Issue Monitored: eugeni
2015-11-27 10:05 aferraz Assigned To Triage Finance => aferraz
2015-11-27 10:05 aferraz Status new => scheduled
2015-12-02 14:48 psanjuan Note Added: 0082536
2015-12-02 14:51 psanjuan Note Added: 0082537
2015-12-02 14:53 psanjuan Note Edited: 0082537 View Revisions
2015-12-02 15:10 psanjuan Note Edited: 0082536 View Revisions
2015-12-04 10:11 hgbot Checkin
2015-12-04 10:11 hgbot Note Added: 0082566
2015-12-04 10:11 hgbot Status scheduled => resolved
2015-12-04 10:11 hgbot Resolution open => fixed
2015-12-04 10:11 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/e867bcaa1cc6d81847568342992f0040429f0d4f [^]
2015-12-04 10:12 dmiguelez Review Assigned To => dmiguelez
2015-12-04 10:12 dmiguelez Note Added: 0082567
2015-12-04 10:12 dmiguelez Status resolved => closed
2015-12-04 15:58 hudsonbot Checkin
2015-12-04 15:58 hudsonbot Note Added: 0082576


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker