001    /*
002     * Copyright 2011 The Kuali Foundation.
003     * 
004     * Licensed under the Educational Community License, Version 2.0 (the "License");
005     * you may not use this file except in compliance with the License.
006     * You may obtain a copy of the License at
007     * 
008     * http://www.opensource.org/licenses/ecl2.php
009     * 
010     * Unless required by applicable law or agreed to in writing, software
011     * distributed under the License is distributed on an "AS IS" BASIS,
012     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013     * See the License for the specific language governing permissions and
014     * limitations under the License.
015     */
016    
017    package org.kuali.kfs.fp.businessobject;
018    
019    import java.sql.Date;
020    import java.util.LinkedHashMap;
021    
022    import org.kuali.kfs.coa.businessobject.Account;
023    import org.kuali.kfs.coa.businessobject.Chart;
024    import org.kuali.kfs.sys.KFSPropertyConstants;
025    import org.kuali.rice.kns.bo.PersistableBusinessObjectBase;
026    import org.kuali.rice.kns.util.KualiDecimal;
027    
028    /**
029     * This class is used to represent a sales tax business object.
030     */
031    public class SalesTax extends PersistableBusinessObjectBase {
032    
033        private String documentNumber;
034        private String financialDocumentLineTypeCode;
035        private Integer financialDocumentLineNumber;
036        private String chartOfAccountsCode;
037        private String accountNumber;
038        private KualiDecimal financialDocumentGrossSalesAmount;
039        private KualiDecimal financialDocumentTaxableSalesAmount;
040        private Date financialDocumentSaleDate;
041    
042        private Account account;
043        private Chart chartOfAccounts;
044    
045        /**
046         * Default constructor.
047         */
048        public SalesTax() {
049    
050        }
051    
052        /**
053         * Gets the documentNumber attribute.
054         * 
055         * @return Returns the documentNumber
056         */
057        public String getDocumentNumber() {
058            return documentNumber;
059        }
060    
061        /**
062         * Sets the documentNumber attribute.
063         * 
064         * @param documentNumber The documentNumber to set.
065         */
066        public void setDocumentNumber(String documentNumber) {
067            this.documentNumber = documentNumber;
068        }
069    
070    
071        /**
072         * Gets the financialDocumentLineTypeCode attribute.
073         * 
074         * @return Returns the financialDocumentLineTypeCode
075         */
076        public String getFinancialDocumentLineTypeCode() {
077            return financialDocumentLineTypeCode;
078        }
079    
080        /**
081         * Sets the financialDocumentLineTypeCode attribute.
082         * 
083         * @param financialDocumentLineTypeCode The financialDocumentLineTypeCode to set.
084         */
085        public void setFinancialDocumentLineTypeCode(String financialDocumentLineTypeCode) {
086            this.financialDocumentLineTypeCode = financialDocumentLineTypeCode;
087        }
088    
089    
090        /**
091         * Gets the financialDocumentLineNumber attribute.
092         * 
093         * @return Returns the financialDocumentLineNumber
094         */
095        public Integer getFinancialDocumentLineNumber() {
096            return financialDocumentLineNumber;
097        }
098    
099        /**
100         * Sets the financialDocumentLineNumber attribute.
101         * 
102         * @param financialDocumentLineNumber The financialDocumentLineNumber to set.
103         */
104        public void setFinancialDocumentLineNumber(Integer financialDocumentLineNumber) {
105            this.financialDocumentLineNumber = financialDocumentLineNumber;
106        }
107    
108    
109        /**
110         * Gets the chartOfAccountsCode attribute.
111         * 
112         * @return Returns the chartOfAccountsCode
113         */
114        public String getChartOfAccountsCode() {
115            return chartOfAccountsCode;
116        }
117    
118        /**
119         * Sets the chartOfAccountsCode attribute.
120         * 
121         * @param chartOfAccountsCode The chartOfAccountsCode to set.
122         */
123        public void setChartOfAccountsCode(String chartOfAccountsCode) {
124            this.chartOfAccountsCode = chartOfAccountsCode;
125        }
126    
127    
128        /**
129         * Gets the accountNumber attribute.
130         * 
131         * @return Returns the accountNumber
132         */
133        public String getAccountNumber() {
134            return accountNumber;
135        }
136    
137        /**
138         * Sets the accountNumber attribute.
139         * 
140         * @param accountNumber The accountNumber to set.
141         */
142        public void setAccountNumber(String accountNumber) {
143            this.accountNumber = accountNumber;
144        }
145    
146    
147        /**
148         * Gets the financialDocumentGrossSalesAmount attribute.
149         * 
150         * @return Returns the financialDocumentGrossSalesAmount
151         */
152        public KualiDecimal getFinancialDocumentGrossSalesAmount() {
153            return financialDocumentGrossSalesAmount;
154        }
155    
156        /**
157         * Sets the financialDocumentGrossSalesAmount attribute.
158         * 
159         * @param financialDocumentGrossSalesAmount The financialDocumentGrossSalesAmount to set.
160         */
161        public void setFinancialDocumentGrossSalesAmount(KualiDecimal financialDocumentGrossSalesAmount) {
162            this.financialDocumentGrossSalesAmount = financialDocumentGrossSalesAmount;
163        }
164    
165    
166        /**
167         * Gets the financialDocumentTaxableSalesAmount attribute.
168         * 
169         * @return Returns the financialDocumentTaxableSalesAmount
170         */
171        public KualiDecimal getFinancialDocumentTaxableSalesAmount() {
172            return financialDocumentTaxableSalesAmount;
173        }
174    
175        /**
176         * Sets the financialDocumentTaxableSalesAmount attribute.
177         * 
178         * @param financialDocumentTaxableSalesAmount The financialDocumentTaxableSalesAmount to set.
179         */
180        public void setFinancialDocumentTaxableSalesAmount(KualiDecimal financialDocumentTaxableSalesAmount) {
181            this.financialDocumentTaxableSalesAmount = financialDocumentTaxableSalesAmount;
182        }
183    
184    
185        /**
186         * Gets the financialDocumentSaleDate attribute.
187         * 
188         * @return Returns the financialDocumentSaleDate
189         */
190        public Date getFinancialDocumentSaleDate() {
191            return financialDocumentSaleDate;
192        }
193    
194        /**
195         * Sets the financialDocumentSaleDate attribute.
196         * 
197         * @param financialDocumentSaleDate The financialDocumentSaleDate to set.
198         */
199        public void setFinancialDocumentSaleDate(Date financialDocumentSaleDate) {
200            this.financialDocumentSaleDate = financialDocumentSaleDate;
201        }
202    
203    
204        /**
205         * Gets the account attribute.
206         * 
207         * @return Returns the account
208         */
209        public Account getAccount() {
210            return account;
211        }
212    
213        /**
214         * Sets the account attribute.
215         * 
216         * @param account The account to set.
217         * @deprecated
218         */
219        public void setAccount(Account account) {
220            this.account = account;
221        }
222    
223        /**
224         * Gets the chartOfAccounts attribute.
225         * 
226         * @return Returns the chartOfAccounts
227         */
228        public Chart getChartOfAccounts() {
229            return chartOfAccounts;
230        }
231    
232        /**
233         * Sets the chartOfAccounts attribute.
234         * 
235         * @param chartOfAccounts The chartOfAccounts to set.
236         * @deprecated
237         */
238        public void setChartOfAccounts(Chart chartOfAccounts) {
239            this.chartOfAccounts = chartOfAccounts;
240        }
241    
242        /**
243         * @see org.kuali.rice.kns.bo.BusinessObjectBase#toStringMapper()
244         */
245        protected LinkedHashMap toStringMapper() {
246            LinkedHashMap m = new LinkedHashMap();
247            m.put(KFSPropertyConstants.DOCUMENT_NUMBER, this.documentNumber);
248            m.put("financialDocumentLineTypeCode", this.financialDocumentLineTypeCode);
249            if (this.financialDocumentLineNumber != null) {
250                m.put("financialDocumentLineNumber", this.financialDocumentLineNumber.toString());
251            }
252            return m;
253        }
254    }