details:   https://code.openbravo.com/erp/devel/pi/rev/bf85e00422d0
changeset: 28546:bf85e00422d0
user:      Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
date:      Mon Jan 25 13:07:24 2016 +0100
summary:   Fixes issue 31979: Costing Migration Process does not set 
isprocessed flag

Set transaction isprocessed flag as true in updateTrxLegacyCosts, 
updateWithZeroCostRemainingTrx and calculateCosts methods in 
CostingMigrationProcess class.
Set also transaction isprocessed flag as true in 
updateInventoriesCostAndProcessInitInventories method in CostingRuleProcess 
class.

diffstat:

 src/org/openbravo/costing/CostingMigrationProcess.java |  3 +++
 src/org/openbravo/costing/CostingRuleProcess.java      |  3 ++-
 2 files changed, 5 insertions(+), 1 deletions(-)

diffs (47 lines):

diff -r 55b87803d2f4 -r bf85e00422d0 
src/org/openbravo/costing/CostingMigrationProcess.java
--- a/src/org/openbravo/costing/CostingMigrationProcess.java    Tue Jan 26 
12:57:37 2016 +0100
+++ b/src/org/openbravo/costing/CostingMigrationProcess.java    Mon Jan 25 
13:07:24 2016 +0100
@@ -528,6 +528,7 @@
         trx.setTransactionCost(trxCost);
         trx.setCostCalculated(true);
         trx.setCostingStatus("CC");
+        trx.setProcessed(true);
         OBDal.getInstance().save(trx);
         Currency legalEntityCur = 
FinancialUtils.getLegalEntityCurrency(trx.getOrganization());
         BigDecimal cost = BigDecimal.ZERO;
@@ -734,6 +735,7 @@
         trx.setCurrency(cost.getCurrency());
         trx.setCostCalculated(true);
         trx.setCostingStatus("CC");
+        trx.setProcessed(true);
 
         if ((i % 100) == 0) {
           OBDal.getInstance().flush();
@@ -782,6 +784,7 @@
         trx.setCurrency((Currency) 
OBDal.getInstance().getProxy(Currency.ENTITY_NAME, curId));
         trx.setCostCalculated(true);
         trx.setCostingStatus("CC");
+        trx.setProcessed(true);
         OBDal.getInstance().save(trx);
 
         if ((i % 100) == 0) {
diff -r 55b87803d2f4 -r bf85e00422d0 
src/org/openbravo/costing/CostingRuleProcess.java
--- a/src/org/openbravo/costing/CostingRuleProcess.java Tue Jan 26 12:57:37 
2016 +0100
+++ b/src/org/openbravo/costing/CostingRuleProcess.java Mon Jan 25 13:07:24 
2016 +0100
@@ -11,7 +11,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2012-2015 Openbravo SLU
+ * All portions are Copyright (C) 2012-2016 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  *************************************************************************
@@ -534,6 +534,7 @@
         trx.setCostingStatus("CC");
         trx.setCurrency(cur);
         trx.setTransactionCost(trxCost);
+        trx.setProcessed(true);
         OBDal.getInstance().save(trx);
         icl = OBDal.getInstance().get(InventoryCountLine.class, icl.getId());
         InventoryCountLine initICL = getInitIcl(cri.getInitInventory(), icl);

------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
Openbravo-commits mailing list
Openbravo-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to