KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > openbravo > erpCommon > ad_forms > DocLine_Material


1 /*
2  ******************************************************************************
3  * The contents of this file are subject to the Compiere License Version 1.1
4  * ("License"); You may not use this file except in compliance with the License
5  * You may obtain a copy of the License at http://www.compiere.org/license.html
6  * Software distributed under the License is distributed on an "AS IS" basis,
7  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
8  * the specific language governing rights and limitations under the License.
9  * The Original Code is Compiere ERP & CRM Business Solution
10  * The Initial Developer of the Original Code is Jorg Janke and ComPiere, Inc.
11  * Portions created by Jorg Janke are Copyright (C) 1999-2001 Jorg Janke, parts
12  * created by ComPiere are Copyright (C) ComPiere, Inc.; All Rights Reserved.
13  * Contributor(s): Openbravo SL
14  * Contributions are Copyright (C) 2001-2006 Openbravo S.L.
15  ******************************************************************************
16 */

17 package org.openbravo.erpCommon.ad_forms;
18
19 import org.apache.log4j.Logger ;
20 // imports for transactions
21
import org.openbravo.database.ConnectionProvider;
22 import java.sql.Connection JavaDoc;
23
24
25
26 public class DocLine_Material extends DocLine {
27   static Logger log4jDocLine_Material = Logger.getLogger(DocLine_Material.class);
28
29 /**
30  * Constructor
31  * @param DocumentType document type
32  * @param TrxHeader_ID trx header id
33  * @param TrxLine_ID trx line id
34  */

35     public DocLine_Material (String JavaDoc DocumentType, String JavaDoc TrxHeader_ID, String JavaDoc TrxLine_ID){
36         super(DocumentType, TrxHeader_ID, TrxLine_ID);
37     }
38
39     /** Locator */
40     public String JavaDoc m_M_Locator_ID = "";
41     public String JavaDoc m_M_LocatorTo_ID = "";
42
43     /**
44      * Set Trasaction Quantity and Storage Qty
45      * @param qty qty
46      */

47     public void setQty (String JavaDoc qty, ConnectionProvider conn){
48     log4jDocLine_Material.debug(" setQty - qty= " + qty);
49         super.setQty(qty); // save TrxQty
50
p_productInfo.setQty(qty, p_productInfo.m_C_UOM_ID, conn);
51     log4jDocLine_Material.debug(" setQty - productInfo.qty = "+ p_productInfo.m_qty);
52     } // setQty
53

54     /**
55      * Get Total Product Costs
56      * @param as accounting schema
57      * @return costs
58      */

59     public String JavaDoc getProductCosts (AcctSchema as, ConnectionProvider conn, Connection JavaDoc con){
60         return p_productInfo.getProductCosts(as, conn, con);
61     } // getProductCosts
62

63     /**
64      * Line Account from Product
65      *
66      * @param AcctType see ProoductInfo.ACCTTYPE_* (0..3)
67      * @param as accounting schema
68      * @return Requested Product Account
69      */

70     public Account getAccount(String JavaDoc AcctType, AcctSchema as, ConnectionProvider conn){
71         return p_productInfo.getAccount (AcctType, as, conn);
72     } // getAccount
73

74
75     public String JavaDoc getServletInfo() {
76     return "Servlet for the accounting";
77   } // end of getServletInfo() method
78
}
79
Popular Tags