1 /* 2 * Copyright 2006 The Kuali Foundation 3 * 4 * Licensed under the Educational Community License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.opensource.org/licenses/ecl2.php 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 package org.kuali.ole.fp.businessobject; 17 18 import org.kuali.rice.core.api.util.type.KualiDecimal; 19 20 /** 21 * This helper class works in conjunction with the SourceAccountingLine bo to help build the UI for the Voucher. On the business 22 * object side, there is a single attribute that keeps track of this and the amount field is used to keep track of the amount. This 23 * helper class sits alongside the typical SourceAccountingLine bo... the synchronization between the two is the guaranteed order. 24 */ 25 public class VoucherAccountingLineHelperBase implements VoucherAccountingLineHelper { 26 private KualiDecimal debit; 27 private KualiDecimal credit; 28 29 /** 30 * Constructs a <code>{@link VoucherAccountingLineHelperBase}</code> instance. 31 */ 32 public VoucherAccountingLineHelperBase() { 33 this.credit = KualiDecimal.ZERO; 34 this.debit = KualiDecimal.ZERO; 35 } 36 37 /** 38 * This method retrieves the credit amount. 39 * 40 * @return 41 */ 42 public KualiDecimal getCredit() { 43 return credit; 44 } 45 46 /** 47 * This method sets the credit amount. 48 * 49 * @param credit 50 */ 51 public void setCredit(KualiDecimal credit) { 52 this.credit = credit; 53 } 54 55 /** 56 * This method retrieves the debit amount. 57 * 58 * @return 59 */ 60 public KualiDecimal getDebit() { 61 return debit; 62 } 63 64 /** 65 * This method sets the debit amount. 66 * 67 * @param debit 68 */ 69 public void setDebit(KualiDecimal debit) { 70 this.debit = debit; 71 } 72 }