Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0010422Openbravo ERP07. Sales managementpublic2009-08-27 20:332009-11-19 18:28
elopio 
rafaroda 
normalmajoralways
closedduplicate 
20Ubuntu 9.04
main 
 
Core
No
0010422: Tax amount is calculated with less decimals than it should.
I created a sales order line with a tax of 0.5%+3%. The Format.xml file uses 4 decimals for internal format and 2 for output.
However, the tax is calculated with a precission of 2 decimals.
Execute testcases ID 1094 :: Test Case Create a Project Type and ID 1096 :: Test Case Create a Multiphase Project (full documentation is on testlink)

Create the products SERVICE A, SERVICE B with the following attributes:
    * Search key: sera, serb, name: Service A, Service B, Tax category:VAT 10%, UOM: Day, Product type: Expense type
    * Login as userA
    * Go to Project & Service Management->Setup->Project Type
    * Click New and fill:
          o Name: Technical consultancy
    * Go to Standard Phase tab.
    * Click New and fill:
          o Name: Project preparation
          o Product: A Final goods
          o Standard Quantity: 10
    * Go to Standard Task tab.
    * Click New and fill:
          o Name: First draft
          o Product: Service A
          o Standard Quantity: 25
    * Click New and fill:
          o Name: Final prototype
    * Go back to Standard Phase tab.
    * Click New and fill:
          o Name: Project delivery
    * Go to Standard Task tab.
    * Click New and fill:
          o Name: Project closing
          o Product: A Final goods
          o Standard Quantity: 15

# Go to Project & Service Management->Transactions->Multiphase Project
# Click New and fill:

    * Search Key: cca
    * Name: Consultancy for Customer A

# Click on Set Project Type button and select Technical consultancy. Click OK
# Go to Project Phase tab.
# Edit Project preparation and fill:

    * Quantity: 14
    * Unit Price: 1.8

# Go to Project Task tab.
# Edit First draft and fill:

    * Unit Price: 1.7

# Go to back Project Phase tab.
# Edit Project delivery and fill:

    * Starting date: 06-01-2008
    * Ending date: 25-12-2008

# Go to Project Task.
# Edit Project closing and fill:

    * Quantity: 20

# Click New and fill:

    * Name: Project presentation

# Go back to Multiphase Project tab.
# Edit Consultancy for Customer A and fill:

    * Business Partner: CUSTOMER A

# Edit:

    * Sales representative: Sales A

# Click on Change Project Status button.
# Go to Project Phase tab.
# Move to Project preparation and click on Create Sales Order from Project Phase button. Click OK
# Navigate to the sales order through the link.

Expected Grand Total Amount is 72.83, but 72.84 is displayed.

Go to tax tab.
Tax amount for 3%+0.5% should be 0.88, but is 0.89, because:
- Taxable amount = 25.2
- 25.2 * 3% = 0.756
- 25.2 * 0.5% = 0.126
- 0.756 + 0.126 = 0.882

The application is using 2 decimals, but it should use 4.

Use 4 decimals to calculate the tax.
No tags attached.
duplicate of defect 0010067 closed rafaroda Grant total amount changes before and after the completion of the sales order document. 
Issue History
2009-08-27 20:33elopioNew Issue
2009-08-27 20:33elopioAssigned To => rafaroda
2009-08-28 15:32rafarodaNote Added: 0019271
2009-08-28 15:32rafarodaStatusnew => feedback
2009-08-28 21:46elopioNote Added: 0019275
2009-08-28 21:49elopioNote Added: 0019276
2009-08-31 08:27rafarodaRelationship addedrelated to 0010067
2009-09-04 07:57elopioStatusfeedback => new
2009-09-18 14:44rafarodaRelationship replacedduplicate of 0010067
2009-09-18 14:44rafarodaStatusnew => closed
2009-09-18 14:44rafarodaNote Added: 0020213
2009-09-18 14:44rafarodaDuplicate ID0 => 10067
2009-09-18 14:44rafarodaResolutionopen => duplicate
2009-09-19 00:00anonymoussf_bug_id0 => 2861728
2009-11-19 18:25plujanNote Added: 0022033
2009-11-19 18:25plujanStatusclosed => new
2009-11-19 18:25plujanResolutionduplicate => open
2009-11-19 18:26plujanStatusnew => scheduled
2009-11-19 18:26plujanfix_in_branch => pi
2009-11-19 18:28plujanNote Added: 0022035
2009-11-19 18:28plujanStatusscheduled => closed
2009-11-19 18:28plujanResolutionopen => duplicate

Notes
(0019271)
rafaroda   
2009-08-28 15:32   
Leo,

Which is the precision of the currency that you are using?

Thanks.
(0019275)
elopio   
2009-08-28 21:46   
4 digits. (The Format.xml file uses 4 decimals for internal format)
(0019276)
elopio   
2009-08-28 21:49   
oh wait. I din't know about the precision assigned to the currency.

It's Euro, Standard Precision 2, Costing Precision 4, Price Precision 4.
(0020213)
rafaroda   
2009-09-18 14:44   
Leo,

This issue seems duplicated of 0010067

Thanks.
(0022033)
plujan   
2009-11-19 18:25   
Issue can still be reproduced in our daily smokes. Sometimes can be a little tricky to make this issue to show up. The best procedure is to run an automated test and check the created value for the G_02 test case.
(0022035)
plujan   
2009-11-19 18:28   
Reopened by mistake