Fixes issue 30417. Initialize global variable each time to
authorDavid Miguelez <david.miguelez@openbravo.com>
Thu, 23 Jul 2015 17:16:08 +0200
changeset 27567 c1a6e9f89016
parent 27566 7ea341ccbf45
child 27568 a5f410f9ace1
Fixes issue 30417. Initialize global variable each time to
make sure it does not uses values from a previous execution.
src/org/openbravo/costing/AverageCostAdjustment.java
--- a/src/org/openbravo/costing/AverageCostAdjustment.java	Thu Jul 23 17:05:01 2015 +0200
+++ b/src/org/openbravo/costing/AverageCostAdjustment.java	Thu Jul 23 17:16:08 2015 +0200
@@ -61,7 +61,13 @@
 @ComponentProvider.Qualifier("org.openbravo.costing.AverageAlgorithm")
 public class AverageCostAdjustment extends CostingAlgorithmAdjustmentImp {
   private static final Logger log = LoggerFactory.getLogger(CostAdjustmentProcess.class);
-  private String bdCostingId = "";
+  private String bdCostingId;
+
+  @Override
+  protected void init(CostAdjustmentLine costAdjLine) {
+    super.init(costAdjLine);
+    bdCostingId = "";
+  }
 
   @Override
   protected void getRelatedTransactionsByAlgorithm() {