From 8d2584584b8772dbe828c8199c2531982c3ff3f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Pe=C3=B1uela?= Date: Tue, 19 Feb 2013 19:28:54 -0500 Subject: [PATCH] IDEMPIERE-590 Import Inventory allowing locator/wh from different org --- .../src/org/compiere/process/ImportInventory.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/org.adempiere.base.process/src/org/compiere/process/ImportInventory.java b/org.adempiere.base.process/src/org/compiere/process/ImportInventory.java index 1b499163d0..753f8272f1 100644 --- a/org.adempiere.base.process/src/org/compiere/process/ImportInventory.java +++ b/org.adempiere.base.process/src/org/compiere/process/ImportInventory.java @@ -227,6 +227,15 @@ public class ImportInventory extends SvrProcess if (no != 0) log.warning ("No Location=" + no); + sql = new StringBuilder ("UPDATE I_Inventory ") + .append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Location not Match with Org, ' ") + .append("WHERE AD_Org_ID <> (SELECT AD_Org_ID FROM M_Locator WHERE M_Locator_ID = ").append(p_M_Locator_ID) + .append(" AND I_IsImported<>'Y'").append (clientCheck).append(" )"); + no = DB.executeUpdate (sql.toString (), get_TrxName()); + if (no != 0) + log.warning ("Location not Match with Org=" + no); + + // Set M_Warehouse_ID sql = new StringBuilder ("UPDATE I_Inventory i ")