Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0036534Openbravo ERP04. Warehouse managementpublic2017-07-26 17:102017-09-21 16:49
ngarcia 
collazoandy4 
urgentmajoralways
closedfixed 
5
 
3.0PR17Q4 
aferraz
Core
No
0036534: Error in Costing Background Process if starting date of first costing rule is lower than movement date of existing transactions
Error in Costing Background Process if starting date of first costing rule is lower than movement date of existing transactions
As group admin role:
   Create a new Legal Without Accounting organization with Initial Organization Setup process
   Go to Organization window and set it as Ready
   Create the required master data: tax category, product, warehouse, storage bin
   Create a physical inventory with a movement date in the future
   Add a product and a cost to it and process it
   Go to Costing Rules window and create a new one
   Set today as Starting Date and Validate it
   Go to Process Request window and schedule Costing Background Process
   Check it finishes with the following error:
      No valid Costing Rule found for given organization and date
No tags attached.
related to defect 0033937 closed markmm82 Error in Costing Background Process if first costing rule validated with starting date,previous transactions cost not calculated 
related to defect 0028401 closed dmiguelez [Costing] Initialized All Trx process needs to be changed 
related to defect 0021406 closed gorkaion Costing Background Process blocked by Transactions without cost calculated. 
related to defect 0036675 closed markmm82 [Costing Migration Process]: Transactions related with closing inventory lines do not have an entry in Transaction Cost tab 
Issue History
2017-07-26 17:10ngarciaNew Issue
2017-07-26 17:10ngarciaAssigned To => Triage Finance
2017-07-26 17:10ngarciaModules => Core
2017-07-26 17:10ngarciaTriggers an Emergency Pack => No
2017-07-26 17:10ngarciaRelationship addedrelated to 0033937
2017-07-26 17:10ngarciaIssue Monitored: networkb
2017-07-27 09:52ngarciaResolution time => 1502834400
2017-07-27 10:05aferrazAssigned ToTriage Finance => collazoandy4
2017-07-27 15:53collazoandy4Statusnew => scheduled
2017-07-27 22:54collazoandy4Note Added: 0098250
2017-07-31 13:14aferrazRelationship addedrelated to 0028401
2017-07-31 22:15collazoandy4Note Edited: 0098250bug_revision_view_page.php?bugnote_id=0098250#r15559
2017-08-03 10:10aferrazNote Edited: 0098250bug_revision_view_page.php?bugnote_id=0098250#r15578
2017-08-03 10:11aferrazNote Edited: 0098250bug_revision_view_page.php?bugnote_id=0098250#r15579
2017-08-03 10:32hgbotCheckin
2017-08-03 10:32hgbotNote Added: 0098357
2017-08-03 10:32hgbotStatusscheduled => resolved
2017-08-03 10:32hgbotResolutionopen => fixed
2017-08-03 10:32hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/e862781be5c32d5a5e82d8fb6fbb1c02a43b91f3 [^]
2017-08-03 10:56aferrazReview Assigned To => aferraz
2017-08-03 10:56aferrazNote Added: 0098358
2017-08-03 10:56aferrazStatusresolved => closed
2017-08-03 10:56aferrazFixed in Version => 3.0PR17Q4
2017-08-03 11:19aferrazRelationship addedrelated to 0021406
2017-08-28 11:19aferrazRelationship addedrelated to 0036675
2017-09-21 16:49hudsonbotCheckin
2017-09-21 16:49hudsonbotNote Added: 0099293

Notes
(0098250)
collazoandy4   
2017-07-27 22:54   
(edited on: 2017-08-03 10:11)
Test Plan I: Transaction process date before and Movement date after the costing rule starting date
  As F&B International Group Admin role
    Create a new organization by Initial organization setup as follow:
      Organization: Test1
      Organization type: Legal without accounting.
      Include Accounting File or Accounting Reference Data: N
      Select all data sets.
    Go to Organization window select the previous organization created, set Currency: EUR and set it as Ready
    Go to Tax Category window and create a new record:
      Name: CategoryTest1
    Go to Product window and create a new record:
      Search Key/Name: ProductTest1
    Go to Warehouse and Storage Bin window and create a new record:
      Search Key/Name: WarehouseTest1
      Set any Location
      Create a new record in Storage bin tab:
        Search Key: SB1
    Go to Physical Inventory window and create a new record:
      Movement date: Next Month
      Create a new record in Lines tab:
        Product: ProductTest1
        Quantity count: 10
        Cost: 2
      Process Inventory count list
    Go to Costing Rules window and create a new record:
      Starting Date: Tomorrow
      Validate it
    Check in the Transaction tab of the previous product created that the inventory transaction cost is 0
    Check two more records have been created in Transaction tab related to closing and opening costing rule inventories.
    Check closing inventory cost is 0 and opening inventory cost is not calculated.
    Create a new record in Price tab:
      Create new Price List Version
      Unit and List Price: 3
    Go to Process Request window and schedule Costing Background Process
      Check it finishes successfully with no error
    Check in the Transaction tab of the previous product created that a cost of 30 has been calculated for opening inventory transaction.
    Check in the Costing tab a new record has been created with cost 3.

Repeat the same test setting Transaction process date and Movement date before costing rule starting date.

Test Plan II: Transaction process date after and Movement date before costing rule starting date
  As F&B International Group Admin role
    Create a new organization by Initial organization setup as follow:
      Organization: Test2
      Organization type: Legal without accounting.
      Include Accounting File or Accounting Reference Data: N
      Select all data sets.
    Go to Organization window select the previous organization created, set Currency: EUR and set it as Ready
    Go to Tax Category window and create a new record:
      Name: CategoryTest2
    Go to Product window and create a new record:
      Search Key/Name: ProductTest2
    Go to Warehouse and Storage Bin window and create a new record:
      Search Key/Name: WarehouseTest2
      Set any Location
      Create a new record in Storage bin tab:
        Search Key: SB2
    Go to Physical Inventory window and create a new record:
      Movement date: Last week
      Create a new record in Lines tab:
        Product: ProductTest2
        Quantity count: 10
        Cost: 2
      Process Inventory count list
    Go to Costing Rules window and create a new record:
      Starting Date: Yesterday
      Validate it
    Check in the Transaction tab of the previous product created that the inventory transaction cost is not calculated.
    Go to Process Request window and schedule Costing Background Process
      Check it finishes successfully with no error
    Check in the Transaction tab of the previous product created that a cost of 20 has been calculated for opening inventory transaction.
    Check in the Costing tab a new record has been created with cost 2.

Repeat the same test setting Transaction process date and Movement date after costing rule starting date.

(0098357)
hgbot   
2017-08-03 10:32   
Repository: erp/devel/pi
Changeset: e862781be5c32d5a5e82d8fb6fbb1c02a43b91f3
Author: Armaignac <collazoandy4 <at> gmail.com>
Date: Wed Jul 26 17:24:11 2017 -0400
URL: http://code.openbravo.com/erp/devel/pi/rev/e862781be5c32d5a5e82d8fb6fbb1c02a43b91f3 [^]

Fixes issue 36534: Error in Costing Background Process

Error in Costing Background Process if starting date of first costing rule is lower than movement date of existing transactions.

Now, when defining the first costing rule with a non empty starting date, all transactions with a transaction process date (instead of movement date) prior to that date will be calculated at a zero cost.
Also, transaction process date (instead of movement date), will be taken into account to get the stock when creating closing and opening costing rule inventories.

---
M src/org/openbravo/costing/CostingRuleProcess.java
---
(0098358)
aferraz   
2017-08-03 10:56   
Code review + Testing OK
(0099293)
hudsonbot   
2017-09-21 16: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/9750b78d3e5c [^]
Maturity status: Test