From 40d3121a8600dc2a5bd0e8a91e6654ee88876b2c Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Wed, 18 Sep 2013 09:48:08 -0500 Subject: [PATCH 1/2] IDEMPIERE-1323 Zoom Condition bug / fix issue IDEMPIERE-1358 --- .../src/org/adempiere/webui/apps/AEnv.java | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/AEnv.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/AEnv.java index 9eca46c30c..1582fc0d6d 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/AEnv.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/AEnv.java @@ -160,6 +160,21 @@ public final class AEnv zoom(AD_Window_ID, MQuery.getEqualQuery(table.getKeyColumns()[0], Record_ID)); } // zoom + /************************************************************************* + * Zoom + * @param AD_Table_ID + * @param Record_ID + * @param query + */ + public static void zoom (int AD_Table_ID, int Record_ID, MQuery query) + { + int AD_Window_ID = Env.getZoomWindowID(AD_Table_ID, Record_ID); + // Nothing to Zoom to + if (AD_Window_ID == 0) + return; + zoom(AD_Window_ID, query); + } // zoom + /** * Exit System * @param status System exit status (usually 0 for no error) @@ -388,7 +403,7 @@ public final class AEnv } if (value instanceof Integer && ((Integer) value).intValue() >= 0 && zoomQuery != null && zoomQuery.getZoomTableName() != null) { int tableId = MTable.getTable_ID(zoomQuery.getZoomTableName()); - zoom(tableId, ((Integer) value).intValue()); + zoom(tableId, ((Integer) value).intValue(), zoomQuery); } else { int windowId = lookup.getZoom(zoomQuery); zoom(windowId, zoomQuery); From cb2624fbef19905d8e6d76cac321f22d68bb9ac1 Mon Sep 17 00:00:00 2001 From: Heng Sin Low Date: Thu, 19 Sep 2013 10:53:36 +0800 Subject: [PATCH 2/2] IDEMPIERE-1180 Cost Adjustment Document for Standard and Average Costing. Fixed standard cost adjustment doesn't work for non-stocked product. --- .../oracle/201309190245_IDEMPIERE-1180.sql | 11 +++++++++++ .../postgresql/201309190245_IDEMPIERE-1180.sql | 8 ++++++++ .../src/org/compiere/acct/Doc_Inventory.java | 13 ++++++++++--- 3 files changed, 29 insertions(+), 3 deletions(-) create mode 100644 migration/i1.0c-release/oracle/201309190245_IDEMPIERE-1180.sql create mode 100644 migration/i1.0c-release/postgresql/201309190245_IDEMPIERE-1180.sql diff --git a/migration/i1.0c-release/oracle/201309190245_IDEMPIERE-1180.sql b/migration/i1.0c-release/oracle/201309190245_IDEMPIERE-1180.sql new file mode 100644 index 0000000000..27bf80b016 --- /dev/null +++ b/migration/i1.0c-release/oracle/201309190245_IDEMPIERE-1180.sql @@ -0,0 +1,11 @@ +SET SQLBLANKLINES ON +SET DEFINE OFF + +-- Sep 19, 2013 10:36:56 AM MYT +-- IDEMPIERE-1064 Control dashboard access by role +UPDATE AD_Field SET AD_Reference_ID=30, AD_Reference_Value_ID=162,Updated=TO_DATE('2013-09-19 10:36:56','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=202328 +; + +SELECT register_migration_script('201309190245_IDEMPIERE-1180.sql') FROM dual +; + diff --git a/migration/i1.0c-release/postgresql/201309190245_IDEMPIERE-1180.sql b/migration/i1.0c-release/postgresql/201309190245_IDEMPIERE-1180.sql new file mode 100644 index 0000000000..19e4a15737 --- /dev/null +++ b/migration/i1.0c-release/postgresql/201309190245_IDEMPIERE-1180.sql @@ -0,0 +1,8 @@ +-- Sep 19, 2013 10:36:56 AM MYT +-- IDEMPIERE-1064 Control dashboard access by role +UPDATE AD_Field SET AD_Reference_ID=30, AD_Reference_Value_ID=162,Updated=TO_TIMESTAMP('2013-09-19 10:36:56','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=202328 +; + +SELECT register_migration_script('201309190245_IDEMPIERE-1180.sql') FROM dual +; + diff --git a/org.adempiere.base/src/org/compiere/acct/Doc_Inventory.java b/org.adempiere.base/src/org/compiere/acct/Doc_Inventory.java index 8e6967c4f4..750d724da8 100644 --- a/org.adempiere.base/src/org/compiere/acct/Doc_Inventory.java +++ b/org.adempiere.base/src/org/compiere/acct/Doc_Inventory.java @@ -195,12 +195,19 @@ public class Doc_Inventory extends Doc if (costAdjustment) { product = line.getProduct(); - String productCostingMethod = product.getCostingMethod(as); - costingLevel = product.getCostingLevel(as); - if (!docCostingMethod.equals(productCostingMethod)) + if (!product.isStocked()) { doPosting = false; } + else + { + String productCostingMethod = product.getCostingMethod(as); + costingLevel = product.getCostingLevel(as); + if (!docCostingMethod.equals(productCostingMethod)) + { + doPosting = false; + } + } } BigDecimal costs = null;