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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0041749
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 04. Warehouse managementcriticalalways2019-09-04 13:562019-11-19 08:20
ReportergorkaionView Statuspublic 
Assigned Tocollazoandy4 
PriorityimmediateResolutionfixedFixed in Version3.0PR19Q4
StatusclosedFix in branchFixed in SCM revisionab32e01b7992
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned ToSandrahuguet
Web browser
ModulesCore
Regression levelProduction - Confirmed Stable
Regression date2016-10-11
Regression introduced in release3.0PR17Q1
Regression introduced by commithttps://code.openbravo.com/erp/devel/pi/rev/37c5b07cf5e7 [^]
Triggers an Emergency PackNo
Summary

0041749: Fix backdated transaction is not fixing all backdated transactions

DescriptionWhen the fix backdated transaction process is executed in a costing rule to enable backdated corrections the process is not adjusting all existing backdated transactions.
Steps To Reproduce*** NOTE: Currently in live builds there are many products with costing in an inconsistent status with overlapped ranges in the costings. To properly reproduce the issue search a product without this problem to avoid collateral issues related to this problem (for example Cola de Cereza) ***

1. Ensure that the costing rule is not fixing backdated transactions.
2. Create 3 new Purchase Orders with relevant changes in the price and enough quantity to ensure that the average is changed. All of them with different dates in the past.
2.1. For example using cola de cereza whose regular price is 0.55:
        del date qty price
 PO1 - 04-08-2018 - 50000ud - 0.02 EUR
 PO2 - 04-09-2018 - 70000ud - 5 EUR
 PO3 - 04-07-2018 - 30000ud - 10 EUR

3. Create 3 goods receipts using Pending Goods Receipt each one using the same date as de delivery date of the order and processed in the same order than the orders.
  GR01 - PO1 - 04-08-2018
  GR02 - PO2 - 04-09-2018
  GR03 - PO3 - 04-07-2018

4. Execute costing background process to ensure that all costs are calculated.
5. Go to Costing Rule for Spain org and execute the Fix Backdated Transactions with starting date 01-01-2018.
6. Go to Cost Adjustment window and check if there is any adjustment. It is expected to be a new cost adjustment for Backdated Transaction with at least 3 lines with the 3 goods receipts with the source flag as true and all the shipments from 04-07-2018 adjusted with the new average cost.
7. Go to Costing tab and sort by starting date. We expect that the costings related to the backdated receipt to be correctly ordered between other receipts by their date.
Proposed SolutionThe method isNeededBackdatedCostAdjustment from CostAdjustmentUtils is not returning value when a old transaction already calculated is passed as parameter.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
depends on backport 00417933.0PR19Q3.1 closedcollazoandy4 Fix backdated transaction is not fixing all backdated transactions 
depends on backport 00417943.0PR19Q2.3 closedcollazoandy4 Fix backdated transaction is not fixing all backdated transactions 
causes defect 0045830 closedmarkmm82 Error on Fix Backadated Transaction process. A trx is wrongly considered as backdated 

-  Notes
(0114473)
collazoandy4 (developer)
2019-09-09 22:24

Test Plan

Create 3 new Purchase Orders with the following values:
  1 - Order Date: 04-08-2018 - Price List: Tarifa Refrescos Naturales - Product: Cola de Cereza 0,5L - Ordered Quantity: 50000 - Price: 0.02 EUR
  2 - Order Date: 04-09-2018 - Price List: Tarifa Refrescos Naturales - Product: Cola de Cereza 0,5L - Ordered Quantity: 70000 - Price: 5.00 EUR
  3 - Order Date: 04-07-2018 - Price List: Tarifa Refrescos Naturales - Product: Cola de Cereza 0,5L - Ordered Quantity: 30000 - Price: 10.00 EUR
Create 3 goods receipts using Pending Goods Receipt each one using the same date as de delivery date of the order and processed in the same order than the orders.
  GR01 - PO1 - 04-08-2018
  GR02 - PO2 - 04-09-2018
  GR03 - PO3 - 04-07-2018
Execute costing background process and check in Transaction tab of Cola de Cereza 0,5L product the cost of transaction has been calculated
Go to Costing Rule for Spain org and execute the Fix Backdated Transactions with starting date 01-01-2018.
Go to Cost Adjustment window and check there are a new adjustment with at least 3 lines with the 3 goods receipts with the source flag as true and all the shipments from 04-07-2018 adjusted with the new average cost.
(0114528)
hgbot (developer)
2019-09-11 17:51

Repository: erp/devel/pi
Changeset: ab32e01b7992884ef9a3eb2281fbf82f25a89008
Author: Armaignac <collazoandy4 <at> gmail.com>
Date: Mon Sep 09 12:07:53 2019 -0400
URL: http://code.openbravo.com/erp/devel/pi/rev/ab32e01b7992884ef9a3eb2281fbf82f25a89008 [^]

Fixes issue 41749:Fix backdated transaction is not fixing all backdated trx

When the fix backdated transaction process is executed in a costing rule to enable
backdated corrections the process is not adjusting all existing backdated transactions
because the method isNeededBackdatedCostAdjustment from CostAdjustmentUtils is
not returning value when an old transaction already calculated is passed as parameter if was
processed after last transaction and the old transaction movement date is before

Now the process create an ajustment if the transaction movement date is before previous
adjusted transaction movement date

---
M src/org/openbravo/costing/AverageCostAdjustment.java
M src/org/openbravo/costing/FixBackdatedTransactionsProcess.java
---
(0114534)
Sandrahuguet (developer)
2019-09-11 17:53

code review + testing ok
(0114543)
collazoandy4 (developer)
2019-09-12 15:17

This issue can't be automated because the date from in the Fix Backdated Transactions process can't be before the Costing Rule starting date
(0114579)
hudsonbot (developer)
2019-09-15 08:41

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/8beffe46daaa [^]
Maturity status: Test
(0115677)
Sandrahuguet (developer)
2019-11-19 08:20

Test case added to testlink
https://testlink.openbravo.com/testlink/linkto.php?tprojectPrefix=Communit&item=testcase&id=Communit-11586 [^]

- Issue History
Date Modified Username Field Change
2019-09-04 13:56 gorkaion New Issue
2019-09-04 13:56 gorkaion Assigned To => Triage Finance
2019-09-04 13:56 gorkaion Modules => Core
2019-09-04 13:56 gorkaion Resolution time => 1569362400
2019-09-04 13:56 gorkaion Regression level => Production - Confirmed Stable
2019-09-04 13:56 gorkaion Regression date => 2016-10-11
2019-09-04 13:56 gorkaion Regression introduced in release => 3.0PR17Q1
2019-09-04 13:56 gorkaion Regression introduced by commit => https://code.openbravo.com/erp/devel/pi/rev/37c5b07cf5e7 [^]
2019-09-04 13:56 gorkaion Triggers an Emergency Pack => No
2019-09-04 14:00 ngarcia Issue Monitored: ngarcia
2019-09-04 15:06 Sandrahuguet Assigned To Triage Finance => collazoandy4
2019-09-09 22:02 collazoandy4 Status new => scheduled
2019-09-09 22:24 collazoandy4 Note Added: 0114473
2019-09-10 16:51 collazoandy4 Status scheduled => feedback
2019-09-10 16:52 collazoandy4 Status feedback => scheduled
2019-09-11 17:51 hgbot Checkin
2019-09-11 17:51 hgbot Note Added: 0114528
2019-09-11 17:51 hgbot Status scheduled => resolved
2019-09-11 17:51 hgbot Resolution open => fixed
2019-09-11 17:51 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/ab32e01b7992884ef9a3eb2281fbf82f25a89008 [^]
2019-09-11 17:53 Sandrahuguet Review Assigned To => Sandrahuguet
2019-09-11 17:53 Sandrahuguet Note Added: 0114534
2019-09-11 17:53 Sandrahuguet Status resolved => closed
2019-09-11 17:53 Sandrahuguet Fixed in Version => 3.0PR19Q4
2019-09-12 15:17 collazoandy4 Note Added: 0114543
2019-09-15 08:41 hudsonbot Checkin
2019-09-15 08:41 hudsonbot Note Added: 0114579
2019-11-19 08:20 Sandrahuguet Note Added: 0115677
2021-02-11 10:56 dmitry_mezentsev Relationship added causes 0045830


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker