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.ole.module.purap.util.PurApObjectUtils;
20  import org.kuali.ole.sys.businessobject.AccountingLineBase;
21  import org.kuali.rice.core.api.util.type.KualiDecimal;
22  
23  
24  
25  
26  public class PaymentRequestAccount extends PurApAccountingLineBase {
27  
28      private KualiDecimal disencumberedAmount = KualiDecimal.ZERO;
29      private KualiDecimal existingAmount;
30      
31  
32  
33      public PaymentRequestAccount() {
34          this.setAmount(null);
35          this.setAccountLinePercent(null);
36          this.setSequenceNumber(0);
37      }
38  
39      
40  
41  
42  
43  
44  
45      public PaymentRequestAccount(PaymentRequestItem item, PurchaseOrderAccount poa) {
46          this();
47          
48          PurApObjectUtils.populateFromBaseClass(AccountingLineBase.class, poa, this);
49          
50          this.setSequenceNumber(poa.getSequenceNumber());
51          this.setAccountLinePercent(poa.getAccountLinePercent());
52          setItemIdentifier(item.getItemIdentifier());
53          setPaymentRequestItem(item);
54      }
55  
56      
57  
58  
59  
60  
61  
62      public PaymentRequestAccount(PaymentRequestItem item, InvoiceAccount poa) {
63          this();
64          
65          PurApObjectUtils.populateFromBaseClass(AccountingLineBase.class, poa, this);
66          
67          this.setSequenceNumber(poa.getSequenceNumber());
68          this.setAccountLinePercent(poa.getAccountLinePercent());
69          setItemIdentifier(item.getItemIdentifier());
70          setPaymentRequestItem(item);
71      }
72  
73      public KualiDecimal getExistingAmount() {
74          return existingAmount;
75      }
76  
77      public void setExistingAmount(KualiDecimal existingAmount) {
78          this.existingAmount = existingAmount;
79      }
80      public KualiDecimal getDisencumberedAmount() {
81          return disencumberedAmount;
82      }
83  
84      public void setDisencumberedAmount(KualiDecimal disencumberedAmount) {
85          this.disencumberedAmount = disencumberedAmount;
86      }
87  
88      public PaymentRequestItem getPaymentRequestItem() {
89          return super.getPurapItem();
90      }
91  
92      public void setPaymentRequestItem(PaymentRequestItem paymentRequestItem) {
93          super.setPurapItem(paymentRequestItem);
94      }
95  
96      
97  
98  
99      public void copyFrom(PaymentRequestAccount other) {
100         super.copyFrom(other);
101         setDisencumberedAmount(other.getDisencumberedAmount());
102     }
103 
104 }