details: https://code.openbravo.com/erp/devel/pi/rev/8ba7ab55dd7a changeset: 33944:8ba7ab55dd7a user: Armaignac <collazoandy4 <at> gmail.com> date: Mon May 07 18:21:59 2018 -0400 summary: Fixes issue 38469:Wrong Total Movement Quantity and Stock Valuation resulting in wrong average cost if Costing Rule 'Fix Backdated From' is empty
diffstat: src/org/openbravo/costing/CostingUtils.java | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diffs (21 lines): diff -r 76d2f588a1c7 -r 8ba7ab55dd7a src/org/openbravo/costing/CostingUtils.java --- a/src/org/openbravo/costing/CostingUtils.java Thu May 10 16:03:18 2018 +0200 +++ b/src/org/openbravo/costing/CostingUtils.java Mon May 07 18:21:59 2018 -0400 @@ -442,7 +442,7 @@ trxQry.setParameter("dateTo", dateTo); if (existsCumulatedStock) { if (costingRule.isBackdatedTransactionsFixed()) { - trxQry.setParameter("fixbdt", costingRule.getFixbackdatedfrom()); + trxQry.setParameter("fixbdt", getCostingRuleFixBackdatedFrom(costingRule)); trxQry.setParameter("mvtdate", costing.getInventoryTransaction().getMovementDate()); } trxQry.setParameter("refid", CostAdjustmentUtils.MovementTypeRefID); @@ -576,7 +576,7 @@ trxQry.setParameter("dateTo", dateTo); if (existsCumulatedValuation) { if (costingRule.isBackdatedTransactionsFixed()) { - trxQry.setParameter("fixbdt", costingRule.getFixbackdatedfrom()); + trxQry.setParameter("fixbdt", getCostingRuleFixBackdatedFrom(costingRule)); trxQry.setParameter("mvtdate", costing.getInventoryTransaction().getMovementDate()); } trxQry.setParameter("refid", CostAdjustmentUtils.MovementTypeRefID); ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Openbravo-commits mailing list Openbravo-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbravo-commits