use of edu.cornell.kfs.coa.businessobject.AccountReversionGlobalDetail in project cu-kfs by CU-CommunityApps.
the class AccountReversionGlobalRule method checkAllObjectCodesForValidity.
/**
* This method loops through each of the AccountReversionGlobalDetail objects, checking that the entered object codes for
* each of them are compatible with the AccountReversionGlobalAccount specified.
*
* @param globalAcctRev the global account reversion to check
* @param acct the AccountReversionGlobalOrganization with a new chart to check against all of the object codes
* @return true if there are no conflicts, false if otherwise
*/
public boolean checkAllObjectCodesForValidity(AccountReversionGlobal globalAcctRev, AccountReversionGlobalAccount acct) {
boolean success = true;
for (AccountReversionGlobalDetail detail : globalAcctRev.getAccountReversionGlobalDetails()) {
if (!validObjectCode(globalAcctRev.getUniversityFiscalYear(), acct.getChartOfAccountsCode(), detail.getAccountReversionObjectCode())) {
success = false;
GlobalVariables.getMessageMap().putError(CUKFSPropertyConstants.ACCT_REVERSION_ACCT_NUMBER, CUKFSKeyConstants.ERROR_DOCUMENT_GLOBAL_ACCT_REVERSION_OBJECT_CODE_INVALID, new String[] { globalAcctRev.getUniversityFiscalYear().toString(), acct.getChartOfAccountsCode(), detail.getAccountReversionObjectCode(), acct.getChartOfAccountsCode(), acct.getAccountNumber() });
}
}
return success;
}
Aggregations