details:   https://code.openbravo.com/erp/devel/pi/rev/521d66167db4
changeset: 21060:521d66167db4
user:      Carlos Aristu <carlos.aristu <at> openbravo.com>
date:      Tue Sep 03 12:15:31 2013 +0200
summary:   fixes issue 24636: Physical inventories with
Non Stocakble Products generate warehouse transactions

diffstat:

 src/org/openbravo/materialmgmt/InventoryCountProcess.java |  3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diffs (17 lines):

diff -r 687b9f2e1716 -r 521d66167db4 
src/org/openbravo/materialmgmt/InventoryCountProcess.java
--- a/src/org/openbravo/materialmgmt/InventoryCountProcess.java Tue Sep 03 
10:21:21 2013 +0200
+++ b/src/org/openbravo/materialmgmt/InventoryCountProcess.java Tue Sep 03 
12:15:31 2013 +0200
@@ -192,10 +192,13 @@
     insert.append(" \nfrom " + InventoryCountLine.ENTITY_NAME + " as e");
     insert.append(" , " + User.ENTITY_NAME + " as u");
     insert.append(" , " + AttributeSetInstance.ENTITY_NAME + " as asi");
+    insert.append(" , " + Product.ENTITY_NAME + " as p");
     insert.append(" \nwhere e." + InventoryCountLine.PROPERTY_PHYSINVENTORY + 
".id = :inv");
     insert.append(" and u.id = :user");
     insert.append(" and asi.id = COALESCE(e." + 
InventoryCountLine.PROPERTY_ATTRIBUTESETVALUE
         + ".id , '0')");
+    // Non Stockable Products should not generate warehouse transactions
+    insert.append(" and e.product.id = p.id and p.stocked = 'Y' and 
p.productType = 'I'");
 
     Query queryInsert = 
OBDal.getInstance().getSession().createQuery(insert.toString());
     queryInsert.setString("inv", inventory.getId());

------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to