KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > compiere > acct > DocLine_Bank


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

14 package org.compiere.acct;
15
16 import java.math.*;
17 import java.sql.*;
18
19 import org.compiere.util.*;
20 import org.compiere.model.*;
21
22 /**
23  * Bank Statement Line
24  *
25  * @author Jorg Janke
26  * @version $Id: DocLine_Bank.java,v 1.5 2003/03/19 06:47:31 jjanke Exp $
27  */

28 public class DocLine_Bank extends DocLine
29 {
30     /**
31      * Constructor
32      * @param DocumentType document type
33      * @param TrxHeader_ID trx header
34      * @param TrxLine_ID trx line
35      */

36     public DocLine_Bank (String JavaDoc DocumentType, int TrxHeader_ID, int TrxLine_ID)
37     {
38         super (DocumentType, TrxHeader_ID, TrxLine_ID);
39     } // DocLine_Bank
40

41
42     private boolean m_IsReversal = false;
43
44     private int m_C_Payment_ID = 0;
45
46     private BigDecimal m_TrxAmt = Env.ZERO;
47     private BigDecimal m_StmtAmt = Env.ZERO;
48     private BigDecimal m_InterestAmt = Env.ZERO;
49
50     /**
51      * Set Payment
52      * @param C_Payment_ID payment
53      */

54     public void setC_Payment_ID (int C_Payment_ID)
55     {
56         m_C_Payment_ID = C_Payment_ID;
57     } // setC_Payment_ID
58
/**
59      * Get Payment
60      * @return C_Paymnet_ID
61      */

62     public int getC_Payment_ID()
63     {
64         return m_C_Payment_ID;
65     } // getC_Payment_ID
66

67     /**
68      * Set Reversal
69      * @param IsReversal "N" (default)
70      */

71     public void setIsReversal(String JavaDoc IsReversal)
72     {
73         if (IsReversal != null && IsReversal.equals("Y"))
74             m_IsReversal = true;
75         else
76             m_IsReversal = false;
77     }// setIsReversal
78

79     /**
80      * Is Reversal
81      * @return true if reversal
82      */

83     public boolean isReversal()
84     {
85         return m_IsReversal;
86     } // isReversal
87

88     /**
89      * Set Amounts
90      * @param StmtAmt statement amt
91      * @param InterestAmt interest amount
92      * @param TrxAmt transaction amount
93      */

94     public void setAmount (BigDecimal StmtAmt, BigDecimal InterestAmt, BigDecimal TrxAmt)
95     {
96         if (StmtAmt != null)
97             m_StmtAmt = StmtAmt;
98         if (InterestAmt != null)
99             m_InterestAmt = InterestAmt;
100         if (TrxAmt != null)
101             m_TrxAmt = TrxAmt;
102     } // setAmount
103

104     /**
105      * Get Interest
106      * @return InterestAmount
107      */

108     public BigDecimal getInterestAmt()
109     {
110         return m_InterestAmt;
111     } // getInterestAmt
112

113     /**
114      * Get Statement
115      * @return Starement Amount
116      */

117     public BigDecimal getStmtAmt()
118     {
119         return m_StmtAmt;
120     } // getStrmtAmt
121

122     /**
123      * Get Transaction
124      * @return transaction amount
125      */

126     public BigDecimal getTrxAmt()
127     {
128         return m_TrxAmt;
129     } // getTrxAmt
130

131 } // DocLine_Bank
132
Popular Tags