Fact Account Outside Processing (SubContract)
http://sourceforge.net/tracker/?func=detail&atid=879335&aid=2508401&group_id=176962
This commit is contained in:
parent
3ba9d0c81c
commit
402f643293
|
@ -89,6 +89,8 @@ public class DocLine
|
|||
private ProductCost m_productCost = null;
|
||||
/** Production indicator */
|
||||
private boolean m_productionBOM = false;
|
||||
/** Outside Processing */
|
||||
private int m_PP_Cost_Collector_ID = 0;
|
||||
/** Account used only for GL Journal */
|
||||
private MAccount m_account = null;
|
||||
|
||||
|
@ -667,6 +669,24 @@ public class DocLine
|
|||
m_C_LocFrom_ID = C_LocFrom_ID;
|
||||
} // setC_LocFrom_ID
|
||||
|
||||
/**
|
||||
* Get PP_Cost_Collector_ID
|
||||
* @return Cost Collector ID
|
||||
*/
|
||||
public int getPP_Cost_Collector_ID()
|
||||
{
|
||||
return m_PP_Cost_Collector_ID;
|
||||
} // getC_LocFrom_ID
|
||||
|
||||
/**
|
||||
* Get PP_Cost_Collector_ID
|
||||
* @return Cost Collector ID
|
||||
*/
|
||||
public int setPP_Cost_Collector_ID(int PP_Cost_Collector_ID)
|
||||
{
|
||||
return m_PP_Cost_Collector_ID;
|
||||
} // getC_LocFrom_ID
|
||||
|
||||
/**
|
||||
* Get C_LocTo_ID
|
||||
* @return loc to
|
||||
|
|
|
@ -19,6 +19,7 @@ package org.compiere.acct;
|
|||
import java.math.BigDecimal;
|
||||
import java.sql.ResultSet;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import org.compiere.model.MAccount;
|
||||
|
@ -100,6 +101,11 @@ public class Doc_InOut extends Doc
|
|||
BigDecimal Qty = line.getMovementQty();
|
||||
docLine.setReversalLine_ID(line.getReversalLine_ID());
|
||||
docLine.setQty (Qty, getDocumentType().equals(DOCTYPE_MatShipment)); // sets Trx and Storage Qty
|
||||
|
||||
//Define if Outside Processing
|
||||
String sql = "SELECT PP_Cost_Collector_ID FROM C_OrderLine WHERE C_OrderLine_ID=? AND PP_Cost_Collector_ID IS NOT NULL";
|
||||
int PP_Cost_Collector_ID = DB.getSQLValue(getTrxName(), sql, new Object[]{line.getC_OrderLine_ID()});
|
||||
docLine.setPP_Cost_Collector_ID(PP_Cost_Collector_ID);
|
||||
//
|
||||
log.fine(docLine.toString());
|
||||
list.add (docLine);
|
||||
|
@ -386,7 +392,15 @@ public class Doc_InOut extends Doc
|
|||
// Inventory/Asset DR
|
||||
MAccount assets = line.getAccount(ProductCost.ACCTTYPE_P_Asset, as);
|
||||
if (product.isService())
|
||||
assets = line.getAccount(ProductCost.ACCTTYPE_P_Expense, as);
|
||||
{
|
||||
//if the line is a Outside Processing then DR WIP
|
||||
if(line.getPP_Cost_Collector_ID() > 0)
|
||||
assets = line.getAccount(ProductCost.ACCTTYPE_P_WorkInProcess, as);
|
||||
else
|
||||
assets = line.getAccount(ProductCost.ACCTTYPE_P_Expense, as);
|
||||
|
||||
}
|
||||
|
||||
|
||||
// Elaine 2008/06/26
|
||||
/*dr = fact.createLine(line, assets,
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
-- Jan 14, 2009 6:20:03 PM ECT
|
||||
-- Outside Processing Account
|
||||
UPDATE AD_Field SET DisplayLogic='@IsBOM@=''Y'' | @ProductType@=''S''',Updated=TO_DATE('2009-01-14 18:20:03','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Field_ID=56542
|
||||
;
|
||||
|
||||
-- Jan 14, 2009 6:20:10 PM ECT
|
||||
-- Outside Processing Account
|
||||
UPDATE AD_Field SET DisplayLogic='@IsBOM@=''Y'' | @ProductType@=''S''',Updated=TO_DATE('2009-01-14 18:20:10','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Field_ID=56549
|
||||
;
|
||||
|
||||
-- Jan 14, 2009 6:20:18 PM ECT
|
||||
-- Outside Processing Account
|
||||
UPDATE AD_Field SET DisplayLogic='@IsBOM@=''Y'' | @ProductType@=''S''',Updated=TO_DATE('2009-01-14 18:20:18','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Field_ID=56544
|
||||
;
|
||||
|
||||
-- Jan 14, 2009 6:20:21 PM ECT
|
||||
-- Outside Processing Account
|
||||
UPDATE AD_Field SET DisplayLogic='@IsBOM@=''Y'' | @ProductType@=''S''',Updated=TO_DATE('2009-01-14 18:20:21','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Field_ID=56548
|
||||
;
|
||||
|
||||
-- Jan 14, 2009 6:20:24 PM ECT
|
||||
-- Outside Processing Account
|
||||
UPDATE AD_Field SET DisplayLogic='@IsBOM@=''Y'' | @ProductType@=''S''',Updated=TO_DATE('2009-01-14 18:20:24','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Field_ID=56547
|
||||
;
|
||||
|
||||
-- Jan 14, 2009 6:20:28 PM ECT
|
||||
-- Outside Processing Account
|
||||
UPDATE AD_Field SET DisplayLogic='@IsBOM@=''Y'' | @ProductType@=''S''',Updated=TO_DATE('2009-01-14 18:20:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Field_ID=56545
|
||||
;
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
-- Jan 14, 2009 6:20:03 PM ECT
|
||||
-- Outside Processing Account
|
||||
UPDATE AD_Field SET DisplayLogic='@IsBOM@=''Y'' | @ProductType@=''S''',Updated=TO_TIMESTAMP('2009-01-14 18:20:03','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Field_ID=56542
|
||||
;
|
||||
|
||||
-- Jan 14, 2009 6:20:10 PM ECT
|
||||
-- Outside Processing Account
|
||||
UPDATE AD_Field SET DisplayLogic='@IsBOM@=''Y'' | @ProductType@=''S''',Updated=TO_TIMESTAMP('2009-01-14 18:20:10','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Field_ID=56549
|
||||
;
|
||||
|
||||
-- Jan 14, 2009 6:20:18 PM ECT
|
||||
-- Outside Processing Account
|
||||
UPDATE AD_Field SET DisplayLogic='@IsBOM@=''Y'' | @ProductType@=''S''',Updated=TO_TIMESTAMP('2009-01-14 18:20:18','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Field_ID=56544
|
||||
;
|
||||
|
||||
-- Jan 14, 2009 6:20:21 PM ECT
|
||||
-- Outside Processing Account
|
||||
UPDATE AD_Field SET DisplayLogic='@IsBOM@=''Y'' | @ProductType@=''S''',Updated=TO_TIMESTAMP('2009-01-14 18:20:21','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Field_ID=56548
|
||||
;
|
||||
|
||||
-- Jan 14, 2009 6:20:24 PM ECT
|
||||
-- Outside Processing Account
|
||||
UPDATE AD_Field SET DisplayLogic='@IsBOM@=''Y'' | @ProductType@=''S''',Updated=TO_TIMESTAMP('2009-01-14 18:20:24','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Field_ID=56547
|
||||
;
|
||||
|
||||
-- Jan 14, 2009 6:20:28 PM ECT
|
||||
-- Outside Processing Account
|
||||
UPDATE AD_Field SET DisplayLogic='@IsBOM@=''Y'' | @ProductType@=''S''',Updated=TO_TIMESTAMP('2009-01-14 18:20:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Field_ID=56545
|
||||
;
|
||||
|
Loading…
Reference in New Issue