1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.kuali.ole.module.purap.businessobject;
18
19 import org.kuali.rice.core.api.util.type.KualiDecimal;
20 import org.kuali.rice.krad.util.ObjectUtils;
21
22
23
24
25 public class PurchaseOrderAccount extends PurApAccountingLineBase {
26
27
28
29
30
31
32 private KualiDecimal itemAccountOutstandingEncumbranceAmount;
33
34
35
36
37 public PurchaseOrderAccount() {
38 }
39
40 public PurchaseOrderAccount(PurApAccountingLine ra) {
41 this.setAccountLinePercent(ra.getAccountLinePercent());
42 this.setAccountNumber(ra.getAccountNumber());
43 this.setChartOfAccountsCode(ra.getChartOfAccountsCode());
44 this.setFinancialObjectCode(ra.getFinancialObjectCode());
45 this.setFinancialSubObjectCode(ra.getFinancialSubObjectCode());
46 this.setOrganizationReferenceId(ra.getOrganizationReferenceId());
47 this.setProjectCode(ra.getProjectCode());
48 this.setSubAccountNumber(ra.getSubAccountNumber());
49 this.setSequenceNumber(ra.getSequenceNumber());
50 this.setAmount(ra.getAmount());
51 this.setAccountLinePercent(ra.getAccountLinePercent());
52 }
53
54
55
56
57 @Override
58 public KualiDecimal getAlternateAmountForGLEntryCreation() {
59 if (ObjectUtils.isNull(super.getAlternateAmountForGLEntryCreation())) {
60 return getItemAccountOutstandingEncumbranceAmount();
61 }
62 return super.getAlternateAmountForGLEntryCreation();
63 }
64
65 public KualiDecimal getItemAccountOutstandingEncumbranceAmount() {
66 return itemAccountOutstandingEncumbranceAmount;
67 }
68
69 public void setItemAccountOutstandingEncumbranceAmount(KualiDecimal itemAccountOutstandingEncumbranceAmount) {
70 this.itemAccountOutstandingEncumbranceAmount = itemAccountOutstandingEncumbranceAmount;
71 }
72
73 public PurchaseOrderItem getPurchaseOrderItem() {
74 return super.getPurapItem();
75 }
76
77
78
79
80
81
82
83 @Deprecated
84 public void setPurchaseOrderItem(PurchaseOrderItem purchaseOrderItem) {
85 super.setPurapItem(purchaseOrderItem);
86 }
87
88
89
90
91 public void copyFrom(PurchaseOrderAccount other) {
92 super.copyFrom(other);
93 setItemAccountOutstandingEncumbranceAmount(other.getItemAccountOutstandingEncumbranceAmount());
94 }
95 }