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:
parent
40d3121a86
commit
cb2624fbef
|
@ -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
|
||||||
|
;
|
||||||
|
|
|
@ -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
|
||||||
|
;
|
||||||
|
|
|
@ -195,12 +195,19 @@ public class Doc_Inventory extends Doc
|
||||||
if (costAdjustment)
|
if (costAdjustment)
|
||||||
{
|
{
|
||||||
product = line.getProduct();
|
product = line.getProduct();
|
||||||
String productCostingMethod = product.getCostingMethod(as);
|
if (!product.isStocked())
|
||||||
costingLevel = product.getCostingLevel(as);
|
|
||||||
if (!docCostingMethod.equals(productCostingMethod))
|
|
||||||
{
|
{
|
||||||
doPosting = false;
|
doPosting = false;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
String productCostingMethod = product.getCostingMethod(as);
|
||||||
|
costingLevel = product.getCostingLevel(as);
|
||||||
|
if (!docCostingMethod.equals(productCostingMethod))
|
||||||
|
{
|
||||||
|
doPosting = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
BigDecimal costs = null;
|
BigDecimal costs = null;
|
||||||
|
|
Loading…
Reference in New Issue