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