Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0031207 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Openbravo ERP] 04. Warehouse management | major | always | 2015-10-21 16:43 | 2015-11-23 21:17 | |||
Reporter | VictorVillar | View Status | public | |||||
Assigned To | aferraz | |||||||
Priority | immediate | Resolution | fixed | Fixed in Version | ||||
Status | closed | Fix in branch | Fixed in SCM revision | ba4bca8ad196 | ||||
Projection | none | ETA | none | Target Version | 3.0PR16Q1 | |||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | pi | SCM revision | ||||||
Review Assigned To | dmiguelez | |||||||
Web browser | ||||||||
Modules | Core | |||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0031207: The costing background process fails when the 'fixbackdated from' is defined before the costing rule's starting date | |||||||
Description | The costing background process fails when the 'fixbackdated from' is defined before the costing rule's starting date and it should not. | |||||||
Steps To Reproduce | The costing background process fails when the 'fixbackdated from' is defined before the costing rule's starting date and it should not because it does not make sense to adjust something either that was calculated by the old costing engine or by other costing algorithm. Because of that we have identified 3 problems: 1.- UI: possibility to select the 'Fix backdated From' date before the starting date of the costing rule and if the starting date is blank it should not be possible to select one before it started the costing rule 2.- necessary to fix the following method: getCostingRuleFixBackdatedFrom in CostingUtils.java because is the same as getCostingRuleStartingDate. if (rule.getStartingDate() == null) { SimpleDateFormat outputFormat = new SimpleDateFormat("dd-MM-yyyy"); try { return outputFormat.parse("01-01-1900"); } catch (ParseException e) { // Error parsing the date. log4j.error("Error parsing the date.", e); return null; } } return rule.getStartingDate(); } 3.- Necessary to control in our code the FixBackdatedFrom date in order to adjust the backdated. Proposed solution (CostingServer.java - method:checkCostAdjustments) if (getCostingRule().isBackdatedTransactionsFixed() && transaction.getMovementDate().after( CostingUtils.getCostingRuleStartingDate(getCostingRule())) && transaction.getMovementDate().after( CostingUtils.getCostingRuleFixBackdatedFrom(getCostingRule())) && CostAdjustmentUtils.isNeededBackdatedCostAdjustment(transaction, getCostingRule() .isWarehouseDimension(), CostingUtils.getCostingRuleStartingDate(getCostingRule()))) { // BDT= Backdated transaction CostAdjustment costAdjustmentHeader = CostAdjustmentUtils.insertCostAdjustmentHeader( transaction.getOrganization(), "BDT"); | |||||||
Tags | No tags attached. | |||||||
Attached Files | ||||||||
Relationships [ Relation Graph ] [ Dependency Graph ] | ||||||||
|
Notes | |
(0081894) hgbot (developer) 2015-11-16 17:11 |
Repository: erp/devel/pi Changeset: ba4bca8ad1962501fc3946fa699d2b5965ac27d3 Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com> Date: Fri Nov 06 13:14:15 2015 +0100 URL: http://code.openbravo.com/erp/devel/pi/rev/ba4bca8ad1962501fc3946fa699d2b5965ac27d3 [^] Fixes issue 31207: Error when the FixBackdatedFrom is before StartingDate The costing background process was failing when the 'fixbackdated from' is defined before the costing rule's starting date. Check transaction movement date is equals or after than costing rule fix backdated from date, when creating BDT cost adjustments. getCostingRuleFixBackdatedFrom method in CostingUtils was wrongly retrieving costing rule starting date instead of fix backdated from date. --- M src/org/openbravo/costing/CostingServer.java M src/org/openbravo/costing/CostingUtils.java --- |
(0081896) dmiguelez (developer) 2015-11-16 17:11 |
Code Review + Testing Ok |
(0082240) hudsonbot (developer) 2015-11-23 21:17 |
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/7b56bebaaa88 [^] Maturity status: Test |
Issue History | |||
Date Modified | Username | Field | Change |
2015-10-21 16:43 | VictorVillar | New Issue | |
2015-10-21 16:43 | VictorVillar | Assigned To | => Triage Finance |
2015-10-21 16:43 | VictorVillar | Modules | => Core |
2015-10-21 16:43 | VictorVillar | Resolution time | => 1447110000 |
2015-10-21 16:43 | VictorVillar | Triggers an Emergency Pack | => No |
2015-10-21 16:53 | heccam | Issue Monitored: heccam | |
2015-11-04 17:19 | aferraz | Assigned To | Triage Finance => aferraz |
2015-11-04 17:19 | aferraz | Status | new => scheduled |
2015-11-16 17:11 | hgbot | Checkin | |
2015-11-16 17:11 | hgbot | Note Added: 0081894 | |
2015-11-16 17:11 | hgbot | Status | scheduled => resolved |
2015-11-16 17:11 | hgbot | Resolution | open => fixed |
2015-11-16 17:11 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/ba4bca8ad1962501fc3946fa699d2b5965ac27d3 [^] |
2015-11-16 17:11 | dmiguelez | Review Assigned To | => dmiguelez |
2015-11-16 17:11 | dmiguelez | Note Added: 0081896 | |
2015-11-16 17:11 | dmiguelez | Status | resolved => closed |
2015-11-23 21:17 | hudsonbot | Checkin | |
2015-11-23 21:17 | hudsonbot | Note Added: 0082240 | |
2016-03-21 13:33 | VictorVillar | Relationship added | related to 0030100 |
Copyright © 2000 - 2009 MantisBT Group |