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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0031207
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 04. Warehouse managementmajoralways2015-10-21 16:432015-11-23 21:17
ReporterVictorVillarView Statuspublic 
Assigned Toaferraz 
PriorityimmediateResolutionfixedFixed in Version
StatusclosedFix in branchFixed in SCM revisionba4bca8ad196
ProjectionnoneETAnoneTarget Version3.0PR16Q1
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionpiSCM revision 
Review Assigned Todmiguelez
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0031207: The costing background process fails when the 'fixbackdated from' is defined before the costing rule's starting date

DescriptionThe costing background process fails when the 'fixbackdated from' is defined before the costing rule's starting date and it should not.
Steps To ReproduceThe 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");
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to design defect 0030100 scheduleddmiguelez Costing Process fails when tries to calculate backdated Transactions with a Movement Date Prior to the 1 set in the Costing Rule 

-  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
Powered by Mantis Bugtracker