001 /*
002 * Copyright 2011 The Kuali Foundation.
003 *
004 * Licensed under the Educational Community License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 * http://www.opensource.org/licenses/ecl2.php
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016 package org.kuali.kfs.fp.businessobject;
017
018 import org.kuali.rice.kns.util.KualiDecimal;
019
020 /**
021 * This helper class works in conjunction with the SourceAccountingLine bo to help build the UI for the Voucher. On the business
022 * 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
023 * helper class sits alongside the typical SourceAccountingLine bo... the synchronization between the two is the guaranteed order.
024 */
025 public class VoucherAccountingLineHelperBase implements VoucherAccountingLineHelper {
026 private KualiDecimal debit;
027 private KualiDecimal credit;
028
029 /**
030 * Constructs a <code>{@link VoucherAccountingLineHelperBase}</code> instance.
031 */
032 public VoucherAccountingLineHelperBase() {
033 this.credit = KualiDecimal.ZERO;
034 this.debit = KualiDecimal.ZERO;
035 }
036
037 /**
038 * This method retrieves the credit amount.
039 *
040 * @return
041 */
042 public KualiDecimal getCredit() {
043 return credit;
044 }
045
046 /**
047 * This method sets the credit amount.
048 *
049 * @param credit
050 */
051 public void setCredit(KualiDecimal credit) {
052 this.credit = credit;
053 }
054
055 /**
056 * This method retrieves the debit amount.
057 *
058 * @return
059 */
060 public KualiDecimal getDebit() {
061 return debit;
062 }
063
064 /**
065 * This method sets the debit amount.
066 *
067 * @param debit
068 */
069 public void setDebit(KualiDecimal debit) {
070 this.debit = debit;
071 }
072 }