/*
 * Copyright 2010 The Kuali Foundation.
 * 
 * Licensed under the Educational Community License, Version 1.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 * http://www.opensource.org/licenses/ecl1.php
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.kuali.kfs.module.endow.document.validation.impl;

public class CashIncreaseDocumentRules extends EndowmentTransactionLinesDocumentBaseRules {

}

@@ -696,99 +696,2410 @@
 %0D%0A%0D%0A
-public class CashIncreaseDocumentRules extends EndowmentTransactionLinesDocumentBaseRules %7B
+import org.kuali.kfs.module.endow.EndowPropertyConstants;%0D%0Aimport org.kuali.kfs.module.endow.businessobject.EndowmentTransactionLine;%0D%0Aimport org.kuali.kfs.module.endow.businessobject.EndowmentTransactionSecurity;%0D%0Aimport org.kuali.kfs.module.endow.document.CashIncreaseDocument;%0D%0Aimport org.kuali.kfs.module.endow.document.EndowmentTransactionLinesDocument;%0D%0Aimport org.kuali.kfs.module.endow.document.service.EndowmentTransactionLinesDocumentService;%0D%0Aimport org.kuali.kfs.sys.context.SpringContext;%0D%0A%0D%0Apublic class CashIncreaseDocumentRules extends EndowmentTransactionLinesDocumentBaseRules %7B%0D%0A    %0D%0A%0D%0A    /**%0D%0A     * @see org.kuali.kfs.module.endow.document.validation.impl.EndowmentTransactionLinesDocumentBaseRules#processAddTransactionLineRules(org.kuali.kfs.module.endow.document.EndowmentTransactionLinesDocument,%0D%0A     *      org.kuali.kfs.module.endow.businessobject.EndowmentTransactionLine)%0D%0A     */%0D%0A    @Override%0D%0A    public boolean processAddTransactionLineRules(EndowmentTransactionLinesDocument document, EndowmentTransactionLine line) %7B%0D%0A%0D%0A        CashIncreaseDocument cashIncreaseDoc = (CashIncreaseDocument) document;%0D%0A        EndowmentTransactionSecurity endowmentTransactionSecurity = cashIncreaseDoc.getTargetTransactionSecurity();%0D%0A        boolean isValid = super.processAddTransactionLineRules(document, line);%0D%0A%0D%0A        if (isValid) %7B%0D%0A            // Obtain Prefix for Error fields in UI.%0D%0A            String ERROR_PREFIX = getErrorPrefix(line, -1);    %0D%0A            %0D%0A            //Is Etran code empty%0D%0A            if(isEndowmentTransactionCodeEmpty(line,ERROR_PREFIX))%0D%0A                return false;%0D%0A            %0D%0A            //Validate ETran code%0D%0A            if(!validateEndowmentTransactionCode(line,ERROR_PREFIX))%0D%0A                return false;%0D%0A%0D%0A            // Validate ETran code as E or I%0D%0A            isValid &= validateEndowmentTransactionTypeCode(line, ERROR_PREFIX);%0D%0A            %0D%0A            //Validate if the chart is matched between the KEMID and EtranCode%0D%0A            isValid &= validateChartMatch(line,ERROR_PREFIX);%0D%0A            %0D%0A            //Set Corpus Indicator  %0D%0A            line.setCorpusIndicator(SpringContext.getBean(EndowmentTransactionLinesDocumentService.class).getCorpusIndicatorValueforAnEndowmentTransactionLine(line.getKemid(), line.getEtranCode(), line.getTransactionIPIndicatorCode()));%0D%0A        %7D%0D%0A%0D%0A        return isValid;%0D%0A    %7D
 %0D%0A%0D%0A

add cash specific validations