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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0033937
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 04. Warehouse managementmajoralways2016-09-09 11:172016-09-13 23:49
ReporterngarciaView Statuspublic 
Assigned Tomarkmm82 
PriorityimmediateResolutionfixedFixed in Version3.0PR16Q4
StatusclosedFix in branchFixed in SCM revisiond45e9fe52bb3
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Toaferraz
Web browser
ModulesCore
Regression levelProduction - Confirmed Stable
Regression date2016-02-09
Regression introduced in release3.0PR16Q2
Regression introduced by commithttps://code.openbravo.com/erp/devel/pi/rev/4e9e547d8199 [^]
Triggers an Emergency PackNo
Summary

0033937: Error in Costing Background Process if first costing rule validated with starting date,previous transactions cost not calculated

DescriptionError in Costing Background Process if first costing rule is validated by setting a starting date, the cost of all previous transactions is not set as calculated. The trxprocessdate of the opening inventory is wrong (the time is updated to 0:00:00)
Steps To ReproduceAs group admin role:
   1. Create the following master data:
      Legal with accounting organization (set its currency)
      Fiscal calendar, year and periods
      Business Partner (set it as vendor and set a location)
      Tax Category
      Product (set it as Item as Stocked)
      Warehouse and storage bin
   2. Allow period control and assign the fiscal calendar to the organization
      Set it as ready
      Open the periods
   3. Create a goods receipt with the previously created master data and complete it
   4. Validate a costing rule with average algorithm and a starting date (now)
   5. Go to Product - Transaction tab and check the transaction process date of the opening inventory is previous the transaction process date of the closing inventory. This is wrong
   6. Check also the cost of the Goods Receipt is not calculated and it should be 0
   7. Schedule the Costing Background process and check the following error message is shown:
      No valid Costing Rule found for given organization and date.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
depends on backport 00339573.0PR16Q3.2 closedmarkmm82 Error in Costing Background Process if first costing rule validated with starting date,previous transactions cost not calculated 
depends on backport 00339583.0PR16Q2.3 closedmarkmm82 Error in Costing Background Process if first costing rule validated with starting date,previous transactions cost not calculated 
caused by defect 00317723.0PR16Q2 closedaferraz Performance problem when you try to validate the costing rule with high volume of data 
related to defect 0036534 closedcollazoandy4 Error in Costing Background Process if starting date of first costing rule is lower than movement date of existing transactions 

-  Notes
(0089918)
markmm82 (developer)
2016-09-13 15:20
edited on: 2016-09-16 11:54

Test Plan: https://testlink.openbravo.com/testlink/linkto.php?tprojectPrefix=Communit&item=testcase&id=Communit-10181 [^]
As group admin role:
Create the following master data:
1. Create a new organization by Initial organization setup as follow:
   Organization: Test
   Organization type: Legal with accounting.
   Uncheck the "Include Accounting File or Accounting Reference Data" flag.
   Select the existing data sets.
   Ok
2. Go to Warehouse and storage bin window and create a header:
   Search key/Name: WTest
3. Create a storage bin:
   Search key: WT-0-0-0
   Row = Stack = Level = 0.
   Save.
4. Go to Fiscal calendar and create a new one:
   Organization: Test
   Name: FCTest
5. Add 2016 Year to the created fiscal calendar and create periods for this year.
6. Go to General Ledger Configuration and create a new one for the org.
   Organization: Test
   Name: GLTest
7. Go to Organization window and select the previosuly org (Test). Update the following information:
   Currency: EUR
   Allow Period Control: Yes
   Calendar: FCTest
   General Ledger: GLTest
8. Go to Warehouses tab and add the previously created (WTest) to the organization
9. Set As Ready
10. Log out and log in. Change the profile to log as Group Admin, Test org and warehouse WTest. Apply to use these as default in next steps.
11. Go to Open/Close periods windows and open the periods for the created calendar (FCTest)
12. Go to Tax Category window and create a new one:
    Organization: Test
    Name: TCatTest
13. Go to Price List Schema window and create a new one.
    Organization: Test
    Name: PLSchTest
14. Add a line to it (with default data)
15. Create two Price lists (for sales and purchases)
    Price List 1
      Organization: Test
      Name: PLTest_SO
      Sales Price List: YES
     Add a version to it
      Name: SO
      Valid from: Today
      Price List Schema: PLSchTest

    Price List 2
      Organization: Test
      Name: PLTest_PO
      Sales Price List: NO
     Add a version to it
      Name: PO
      Valid from: Today
      Price List Schema: PLSchTest
16. Go to Product window and create a new one:
    Organization: Test
    Name: PTest
    Tax Category: TCatTest
    Purchase = Sale = Stocked = YES
17. Add a price to it (Sales):
    Price List Version: SO
    Unit Price = List Price = 10.00
18. Add a second price to it (Purchase):
    Price List Version: PO
    Unit Price = List Price = 10.00
19. Create a new Business Partner Category (BPCatTest)
20. Go to Business Partner window and create a new one:
    Organization: Test
    Business Partner Category: BPCatTest
    Name: BPTest
21. Mark as Vendor and use as Purchase Price list the previously created: PLTest_PO
22. Add a Location/Address to the business partner.

23. Create a goods receipt with the previously created master data:
    Organization: Test
    Business Partner: BPTest
24. Add a line to the receipt:
    Product: PTest
    Movement Quantity: 10
    Storage Bin: WT-0-0-0
    Complete it

25. Validate a costing rule with average algorithm and a starting date (now). To do this:
   Go to Costing Rules window and create a new costing rule with the following data:
   Organization: Test
   Costing Algorithm: Average Algorithm
   Starting Date: Now.
   Clic on Validate Costing Rule button.
   
26. Go to Product window, move to Transaction tab and check the transaction process date of the opening inventory is later than the transaction process date of the closing inventory. This is correct
   Check also the cost of the Goods Receipt is calculated and it is 0. It is correct.
   Notice the Closing inventory cost is also calculated and it is 0 too. It is correct.
   Notice the Opening inventory cost is not calculated yet. It is correct.
   
27. Schedule the Costing Background process. To do that:
   Go to Process and Request window and schedule (create) a new process only for the new organization.
   Organization: Test
   Process: Costing Background process
   Timing: Run immediately
   Clic on Schedule Process to run the Costing Background process.

   Notice that process ends successfully and no error message is shown in logs.
   Back again to the Product/Transaction tab and refresh. Check that the opening inventory is now calculated and costs are 100 (10 units x 10.00EUR price). It is correct.

(0089930)
hgbot (developer)
2016-09-13 18:53

Repository: erp/devel/pi
Changeset: d45e9fe52bb38e513ea8660359a5d7a915f76895
Author: Mark <markmm82 <at> gmail.com>
Date: Mon Sep 12 15:06:46 2016 -0400
URL: http://code.openbravo.com/erp/devel/pi/rev/d45e9fe52bb38e513ea8660359a5d7a915f76895 [^]

Fixes issue 33937: Fixed trx date of inventory in Costing Background Process

Used the setTimestamp method instead of the setDate, by this way the details like the hours, minutes and seconds of the transactions are not lost.

---
M src/org/openbravo/costing/CostingRuleProcess.java
---
(0089932)
aferraz (manager)
2016-09-13 18:56

Code review + Testing OK
(0089936)
hudsonbot (developer)
2016-09-13 23:49

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

- Issue History
Date Modified Username Field Change
2016-09-09 11:17 ngarcia New Issue
2016-09-09 11:17 ngarcia Assigned To => Triage Finance
2016-09-09 11:17 ngarcia Modules => Core
2016-09-09 11:17 ngarcia Resolution time => 1475186400
2016-09-09 11:17 ngarcia Triggers an Emergency Pack => No
2016-09-09 11:18 ngarcia Issue Monitored: networkb
2016-09-09 11:21 ngarcia Steps to Reproduce Updated View Revisions
2016-09-09 12:33 ngarcia Description Updated View Revisions
2016-09-09 12:35 ngarcia Description Updated View Revisions
2016-09-09 13:20 aferraz Assigned To Triage Finance => markmm82
2016-09-12 16:22 markmm82 Status new => acknowledged
2016-09-12 18:56 aferraz Regression level => Production - Confirmed Stable
2016-09-12 18:56 aferraz Regression date => 2016-02-09
2016-09-12 18:56 aferraz Regression introduced in release => 3.0PR16Q2
2016-09-12 18:56 aferraz Regression introduced by commit => https://code.openbravo.com/erp/devel/pi/rev/4e9e547d8199 [^]
2016-09-12 18:56 aferraz Relationship added caused by 0031772
2016-09-12 18:57 aferraz Status acknowledged => scheduled
2016-09-13 15:20 markmm82 Note Added: 0089918
2016-09-13 18:53 hgbot Checkin
2016-09-13 18:53 hgbot Note Added: 0089930
2016-09-13 18:53 hgbot Status scheduled => resolved
2016-09-13 18:53 hgbot Resolution open => fixed
2016-09-13 18:53 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/d45e9fe52bb38e513ea8660359a5d7a915f76895 [^]
2016-09-13 18:56 aferraz Review Assigned To => aferraz
2016-09-13 18:56 aferraz Note Added: 0089932
2016-09-13 18:56 aferraz Status resolved => closed
2016-09-13 18:56 aferraz Fixed in Version => 3.0PR16Q4
2016-09-13 23:49 hudsonbot Checkin
2016-09-13 23:49 hudsonbot Note Added: 0089936
2016-09-16 11:54 aferraz Note Edited: 0089918 View Revisions
2017-07-26 17:10 ngarcia Relationship added related to 0036534


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker