1   
2   
3   
4   
5   
6   
7   
8   
9   
10  
11  
12  
13  
14  
15  
16  package org.kuali.ole.module.purap.businessobject;
17  
18  import org.kuali.ole.module.purap.PurapConstants.PurapDocTypeCodes;
19  import org.kuali.ole.sys.businessobject.SourceAccountingLine;
20  import org.kuali.ole.sys.context.SpringContext;
21  import org.kuali.rice.core.api.datetime.DateTimeService;
22  
23  import java.sql.Timestamp;
24  
25  
26  
27  
28  public class AccountsPayableSummaryAccount extends PaymentRequestAccount {
29  
30      private Integer paymentRequestIdentifier;
31      private Integer creditMemoIdentifier;
32      private Timestamp updateTimestamp;
33      private Integer invoiceIdentifier;
34  
35      public AccountsPayableSummaryAccount() {
36      }
37  
38      public AccountsPayableSummaryAccount(SourceAccountingLine account, Integer purapDocumentIdentifier, String docType) {
39          if (PurapDocTypeCodes.PAYMENT_REQUEST_DOCUMENT.equals(docType)) {
40              this.setPaymentRequestIdentifier(purapDocumentIdentifier);
41          } else if (PurapDocTypeCodes.INVOICE_DOCUMENT.equals(docType)) {
42              this.setInvoiceIdentifier(purapDocumentIdentifier);
43          } else if (PurapDocTypeCodes.CREDIT_MEMO_DOCUMENT.equals(docType)) {
44              this.setCreditMemoIdentifier(purapDocumentIdentifier);
45          }
46          this.setChartOfAccountsCode(account.getChartOfAccountsCode());
47          this.setAccountNumber(account.getAccountNumber());
48          this.setSubAccountNumber(account.getSubAccountNumber());
49          this.setFinancialObjectCode(account.getFinancialObjectCode());
50          this.setFinancialSubObjectCode(account.getFinancialSubObjectCode());
51          this.setProjectCode(account.getProjectCode());
52          this.setOrganizationReferenceId(account.getOrganizationReferenceId());
53          this.setAmount(account.getAmount());
54          this.setSequenceNumber(account.getSequenceNumber());
55          this.setUpdateTimestamp(SpringContext.getBean(DateTimeService.class).getCurrentTimestamp());
56      }
57  
58      
59  
60  
61  
62  
63      @Override
64      public Integer getItemIdentifier() {
65          return super.getItemIdentifier();
66      }
67  
68      
69  
70  
71  
72  
73      @Override
74      public void setItemIdentifier(Integer itemIdentifier) {
75          super.setItemIdentifier(itemIdentifier);
76      }
77  
78      public Integer getPaymentRequestIdentifier() {
79          return paymentRequestIdentifier;
80      }
81  
82      public void setPaymentRequestIdentifier(Integer paymentRequestIdentifier) {
83          this.paymentRequestIdentifier = paymentRequestIdentifier;
84      }
85  
86      public Integer getInvoiceIdentifier() {
87          return invoiceIdentifier;
88      }
89  
90      public void setInvoiceIdentifier(Integer invoiceIdentifier) {
91          this.invoiceIdentifier = invoiceIdentifier;
92      }
93  
94  
95      public Integer getCreditMemoIdentifier() {
96          return creditMemoIdentifier;
97      }
98  
99      public void setCreditMemoIdentifier(Integer creditMemoIdentifier) {
100         this.creditMemoIdentifier = creditMemoIdentifier;
101     }
102 
103     public Timestamp getUpdateTimestamp() {
104         return updateTimestamp;
105     }
106 
107     public void setUpdateTimestamp(Timestamp updateTimestamp) {
108         this.updateTimestamp = updateTimestamp;
109     }
110 
111 }