📄 docline_material.java
字号:
/******************************************************************************
* The contents of this file are subject to the Compiere License Version 1.1
* ("License"); You may not use this file except in compliance with the License
* You may obtain a copy of the License at http://www.compiere.org/license.html
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
* the specific language governing rights and limitations under the License.
* The Original Code is Compiere ERP & CRM Business Solution
* The Initial Developer of the Original Code is Jorg Janke and ComPiere, Inc.
* Portions created by Jorg Janke are Copyright (C) 1999-2001 Jorg Janke, parts
* created by ComPiere are Copyright (C) ComPiere, Inc.; All Rights Reserved.
* Contributor(s): ______________________________________.
*****************************************************************************/
package org.compiere.acct;
import java.sql.*;
import java.math.*;
import org.compiere.model.*;
/**
* Document Line for Material Movements
* (Shipment, Inventory, Movement, Production)
*
* @author Jorg Janke
* @version $Id: DocLine_Material.java,v 1.5 2003/03/19 06:47:31 jjanke Exp $
*/
public class DocLine_Material extends DocLine
{
/**
* Constructor
* @param DocumentType document type
* @param TrxHeader_ID trx header id
* @param TrxLine_ID trx line id
*/
public DocLine_Material (String DocumentType, int TrxHeader_ID, int TrxLine_ID)
{
super(DocumentType, TrxHeader_ID, TrxLine_ID);
} // DocLine_Material
/** Locator */
private int m_M_Locator_ID = 0;
private int m_M_LocatorTo_ID = 0;
/**
* Set Warehouse Loactor
* @param M_Locator_ID locator
*/
public void setM_Locator_ID (int M_Locator_ID)
{
m_M_Locator_ID = M_Locator_ID;
} // setM_Locator_ID
/**
* Get Warehouse Locator
* @return M_Locator_ID
*/
public int getM_Locator_ID()
{
return m_M_Locator_ID;
} // getM_Locator_ID
/**
* Set Warehouse Loactor To
* @param M_Locator_ID (to)
*/
public void setM_LocatorTo_ID (int M_Locator_ID)
{
m_M_LocatorTo_ID = M_Locator_ID;
} // setM_LocatorTo_ID
/**
* Get Warehouse Locator To
* @return M_Locator_ID (to)
*/
public int getM_LocatorTo_ID()
{
return m_M_LocatorTo_ID;
} // getM_LocatorTo_ID
/**
* Get Transcation (or Storage) UOM
* @return C_UOM_ID Trx for MatShipment/Receipt - Storage for all others
*/
public int getC_UOM_ID()
{
// Trx UOM
if (p_DocumentType.equals(DocVO.DOCTYPE_MatShipment)
|| p_DocumentType.equals(DocVO.DOCTYPE_MatReceipt))
return super.getC_UOM_ID();
// Storage UOM
return p_productInfo.getC_UOM_ID();
} // getC_UOM_ID
/**
* Set Trasaction Quantity and Storage Qty
* @param qty qty
*/
public void setQty (BigDecimal qty)
{
super.setQty(qty); // save TrxQty
p_productInfo.setQty (qty, p_productInfo.getC_UOM_ID());
} // setQty
/**
* Get Total Product Costs
* @param as accounting schema
* @return costs
*/
public BigDecimal getProductCosts (AcctSchema as)
{
return p_productInfo.getProductCosts(as);
} // getProductCosts
/**
* Line Account from Product
*
* @param AcctType see ProoductInfo.ACCTTYPE_* (0..3)
* @param as accounting schema
* @return Requested Product Account
*/
public Account getAccount(int AcctType, AcctSchema as)
{
return p_productInfo.getAccount (AcctType, as);
} // getAccount
} // DocLine_Material
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -