IDEMPIERE-1180 Cost Adjustment Document for Standard and Average Costing. Fixed standard cost adjustment doesn't work for non-stocked product.

This commit is contained in:
Heng Sin Low 2013-09-19 10:53:36 +08:00
parent 40d3121a86
commit cb2624fbef
3 changed files with 29 additions and 3 deletions

View File

@ -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
;

View File

@ -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
;

View File

@ -195,6 +195,12 @@ public class Doc_Inventory extends Doc
if (costAdjustment) if (costAdjustment)
{ {
product = line.getProduct(); product = line.getProduct();
if (!product.isStocked())
{
doPosting = false;
}
else
{
String productCostingMethod = product.getCostingMethod(as); String productCostingMethod = product.getCostingMethod(as);
costingLevel = product.getCostingLevel(as); costingLevel = product.getCostingLevel(as);
if (!docCostingMethod.equals(productCostingMethod)) if (!docCostingMethod.equals(productCostingMethod))
@ -202,6 +208,7 @@ public class Doc_Inventory extends Doc
doPosting = false; doPosting = false;
} }
} }
}
BigDecimal costs = null; BigDecimal costs = null;
BigDecimal adjustmentDiff = null; BigDecimal adjustmentDiff = null;