details:   https://code.openbravo.com/erp/devel/pi/rev/b9068c9d09d1
changeset: 27039:b9068c9d09d1
user:      David Miguelez <david.miguelez <at> openbravo.com>
date:      Fri Jun 26 13:14:29 2015 +0200
summary:   Fixes Issue 30201. Fixes issue with more than 1000 Transactions in
Skip Status.
Also, removes Transactions in Skip Status from the Query to improve
performance.

diffstat:

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

diffs (29 lines):

diff -r d7e8168bd47b -r b9068c9d09d1 
src/org/openbravo/costing/CostingBackground.java
--- a/src/org/openbravo/costing/CostingBackground.java  Thu Jun 25 18:56:49 
2015 +0200
+++ b/src/org/openbravo/costing/CostingBackground.java  Fri Jun 26 13:14:29 
2015 +0200
@@ -112,6 +112,7 @@
               trxId);
           if ("S".equals(transaction.getCostingStatus())) {
             // Do not calculate trx in skip status.
+            transaction.setProcessed(true);
             continue;
           }
           log4j.debug("Start transaction process: " + transaction.getId());
@@ -211,7 +212,7 @@
     where.append(" join trx." + MaterialTransaction.PROPERTY_PRODUCT + " as 
p");
     where.append("\n , " + org.openbravo.model.ad.domain.List.ENTITY_NAME + " 
as trxtype");
     where.append("\n where trx." + MaterialTransaction.PROPERTY_ISPROCESSED + 
" = false");
-    where.append("   and trx." + MaterialTransaction.PROPERTY_ISCOSTCALCULATED 
+ " = false");
+    where.append("   and trx." + MaterialTransaction.PROPERTY_COSTINGSTATUS + 
" <> 'S'");
     where.append("   and p." + Product.PROPERTY_PRODUCTTYPE + " = 'I'");
     where.append("   and p." + Product.PROPERTY_STOCKED + " = true");
     where.append("   and trxtype." + CostAdjustmentUtils.propADListReference + 
".id = :refid");
@@ -246,7 +247,7 @@
     where.append(" join trx." + MaterialTransaction.PROPERTY_PRODUCT + " as 
p");
     where.append("\n , " + org.openbravo.model.ad.domain.List.ENTITY_NAME + " 
as trxtype");
     where.append("\n where trx." + MaterialTransaction.PROPERTY_ISPROCESSED + 
" = false");
-    where.append("   and trx." + MaterialTransaction.PROPERTY_ISCOSTCALCULATED 
+ " = false");
+    where.append("   and trx." + MaterialTransaction.PROPERTY_COSTINGSTATUS + 
" <> 'S'");
     where.append("   and p." + Product.PROPERTY_PRODUCTTYPE + " = 'I'");
     where.append("   and p." + Product.PROPERTY_STOCKED + " = true");
     where.append("   and trxtype." + CostAdjustmentUtils.propADListReference + 
".id = :refid");

------------------------------------------------------------------------------
Monitor 25 network devices or servers for free with OpManager!
OpManager is web-based network management software that monitors 
network devices and physical & virtual servers, alerts via email & sms 
for fault. Monitor 25 devices for free with no restriction. Download now
http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
_______________________________________________
Openbravo-commits mailing list
Openbravo-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to