View Javadoc
1   /*
2    * The Kuali Financial System, a comprehensive financial management system for higher education.
3    * 
4    * Copyright 2005-2014 The Kuali Foundation
5    * 
6    * This program is free software: you can redistribute it and/or modify
7    * it under the terms of the GNU Affero General Public License as
8    * published by the Free Software Foundation, either version 3 of the
9    * License, or (at your option) any later version.
10   * 
11   * This program is distributed in the hope that it will be useful,
12   * but WITHOUT ANY WARRANTY; without even the implied warranty of
13   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14   * GNU Affero General Public License for more details.
15   * 
16   * You should have received a copy of the GNU Affero General Public License
17   * along with this program.  If not, see <http://www.gnu.org/licenses/>.
18   */
19  package org.kuali.kfs.module.ar.businessobject;
20  
21  import org.kuali.kfs.coa.businessobject.Account;
22  import org.kuali.kfs.coa.businessobject.ObjectCode;
23  import org.kuali.kfs.module.ar.document.CustomerInvoiceDocument;
24  import org.kuali.kfs.sys.document.validation.impl.AccountingDocumentRuleBaseConstants.GENERAL_LEDGER_PENDING_ENTRY_CODE;
25  import org.kuali.rice.core.api.util.type.KualiDecimal;
26  
27  public class ReceivableCustomerInvoiceDetail extends CustomerInvoiceDetail {
28  
29     private CustomerInvoiceDetail postable;
30     private CustomerInvoiceDocument poster;
31     private boolean isUsingReceivableFAU;
32  
33     public ReceivableCustomerInvoiceDetail(CustomerInvoiceDetail postable, CustomerInvoiceDocument poster){
34         this.poster = poster;
35         this.postable = postable;
36         this.postable.refreshNonUpdateableReferences();
37     }
38  
39     @Override
40      public Account getAccount() {
41         return postable.getAccount();
42      }
43  
44     @Override
45      public String getAccountNumber() {
46         return postable.getAccountNumber();
47      }
48  
49     @Override
50      public KualiDecimal getAmount() {
51          return postable.getInvoiceItemPreTaxAmount();
52      }
53  
54     @Override
55      public String getChartOfAccountsCode() {
56         return postable.getChartOfAccountsCode();
57      }
58  
59     @Override
60      public String getDocumentNumber() {
61          return postable.getDocumentNumber();
62      }
63  
64     @Override
65      public String getFinancialDocumentLineDescription() {
66          return postable.getFinancialDocumentLineDescription();
67      }
68  
69     @Override
70      public String getFinancialObjectCode() {
71         return postable.getAccountsReceivableObjectCode();
72      }
73  
74     @Override
75      public ObjectCode getObjectCode() {
76         return postable.getAccountsReceivableObject();
77      }
78  
79     @Override
80     public String getFinancialSubObjectCode() {
81         return GENERAL_LEDGER_PENDING_ENTRY_CODE.getBlankFinancialSubObjectCode();
82     }
83  
84     @Override
85      public String getOrganizationReferenceId() {
86         return postable.getOrganizationReferenceId();
87      }
88  
89     @Override
90      public String getProjectCode() {
91         return postable.getProjectCode();
92      }
93  
94     @Override
95      public String getSubAccountNumber() {
96         return postable.getSubAccountNumber();
97      }
98  
99  }