Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

Service NameaccountBalanceInquiry
DescriptionProvides the available balance for a given chart of accounts and account number.
API Type

SOAP

Status

COMPLETE

Release Date

 

Last Update

 KFS Version 3.32.0

Notes

WSDL Definition

Operations

NameDescriptionInput
getAccountBalance

Will retrieve the available account balance for one account.

chartOfAccountsCode [Default 'UC'] (Optional)
account number (Required)

Response

AttributeDescriptionValues
Id

Unique Identifier


Account name

description of account


Account number

Chart of Accounts code
UC
Status
New, Open, Close, Changed
FiscalOfficerIdentifiernetid
Account Type Code

Bank code

Consolidation Chart of Accounts code

Consolidation Account Number

Reports to Account Number

Reports to Chart of Accounts Code

FundSid Code

FundSid description

Account Manager System Identifiernetid
Account supervisor Systems Identifiernetid
Organization Code

SubFund group code

Department account owner code

Department reference 1

Cfda number

Project name

Plant funds parent code

Plant funds parent code description

Account expense guideline text

Account income guideline text

Account purpose text

Sample Request XML

Sample Request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v5="http://kfs.kuali.org/core/v5_0">
	<soapenv:Header/>
	<soapenv:Body>
		<v5:getAccountBalance>
			<!-Optional:->
			<arg0>
				<chartOfAccountsCode></chartOfAccountsCode>
				<accountNumber>5612710</accountNumber>
			</arg0>
		</v5:getAccountBalance>
	</soapenv:Body>
</soapenv:Envelope>

Sample Response XML (Good)

Sample Response XML (Good)
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
	<soap:Body>
		<ns2:getAccountBalanceResponse xmlns:ns2="http://kfs.kuali.org/core/v5_0">
			<return>
				<accountBalance>10955.85</accountBalance>
			</return>
		</ns2:getAccountBalanceResponse>
	</soap:Body>
</soap:Envelope>

Sample Response XML (Bad)

Sample Response (Bad)
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
	<soap:Body>
		<soap:Fault>
			<faultcode>soap:Server</faultcode>
			<faultstring>Invalid/empty Account Parameter.</faultstring>
			<detail>
				<ns2:AccountInquiryFault xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://kfs.kuali.org/core/v5_0"/>
			</detail>
		</soap:Fault>
	</soap:Body>
</soap:Envelope>

Code Examples

  • Java

    JUnit
    package com.example.coa.service;
    
    import java.time.LocalDate;
    import java.util.ArrayList;
    import java.util.List;
    
    import javax.xml.bind.JAXBElement;
    
    import org.junit.Test;
    import org.kuali.kfs.core.v5_0.GetAccountsResponse;
    import org.springframework.oxm.jaxb.Jaxb2Marshaller;
    
    import junit.framework.TestCase;
    
    public class AccountInquiryServiceTest extends TestCase {
    
        @Test
        public void testGetAccounts() throws Exception {
    
            List<String> subFunds = new ArrayList<String>();
            subFunds.add("PLEQP");
            subFunds.add("PLRES");
            subFunds.add("PLBHC");
            subFunds.add("PLRHC");
            subFunds.add("OPOTF");
            subFunds.add("PLBND");
            subFunds.add("PLREV");
            subFunds.add("PLUNR");
    
            List<String> organizationcodes = new ArrayList<String>();
            organizationcodes.add("1832");
            organizationcodes.add("1731");
            organizationcodes.add("1863");
            
            LocalDate fromDate = LocalDate.parse("2016-08-26");
            LocalDate toDate = LocalDate.parse("2016-09-15");
                    
            ChartOfAccountsInquiryServiceClient client = new ChartOfAccountsInquiryServiceClient();
            
            Jaxb2Marshaller marshaller = new Jaxb2Marshaller();
            marshaller.setContextPath("org.kuali.kfs.core.v5_0");
            client.setMarshaller(marshaller);
            client.setUnmarshaller(marshaller);
              
            JAXBElement<GetAccountsResponse> response = client.getAccounts(subFunds, organizationcodes, fromDate, toDate);
    
            assertNotNull(response);
        }
    
    }
    Client
    package com.example.coa.service;
    
    import java.time.LocalDate;
    import java.util.List;
    
    import javax.xml.bind.JAXBElement;
    import javax.xml.datatype.DatatypeFactory;
    
    import org.kuali.kfs.core.v5_0.AllAccountRequest;
    import org.kuali.kfs.core.v5_0.GetAccounts;
    import org.kuali.kfs.core.v5_0.GetAccountsResponse;
    import org.kuali.kfs.core.v5_0.ObjectFactory;
    import org.springframework.ws.client.core.support.WebServiceGatewaySupport;
    
    public class ChartOfAccountsInquiryServiceClient extends WebServiceGatewaySupport {
    
        public JAXBElement<GetAccountsResponse> getAccounts(List<String> subFunds, List<String> organizationcodes, LocalDate fromDate, LocalDate toDate) throws Exception {
        	
        	ObjectFactory factory = new ObjectFactory();
        	DatatypeFactory datatypeFactory = DatatypeFactory.newInstance();
    
            String uri = "https://kualinp.uconn.edu/kfs-dev/remoting/chartOfAccountsInquiry";
            GetAccounts request = new GetAccounts();
            AllAccountRequest allAccountRequest = new AllAccountRequest();
            allAccountRequest.getSubFund().addAll(subFunds);
            allAccountRequest.getOrganizationCode().addAll(organizationcodes);
            allAccountRequest.setFromDate(factory.createAllAccountRequestFromDate(datatypeFactory.newXMLGregorianCalendar(fromDate.toString())));
            allAccountRequest.setToDate(factory.createAllAccountRequestToDate(datatypeFactory.newXMLGregorianCalendar(toDate.toString())));
            request.setArg0(allAccountRequest);
            
            return (JAXBElement<GetAccountsResponse>) getWebServiceTemplate().marshalSendAndReceive(uri, request);
        }
    
    }


Criteria Used for Balance Checking:

  1. University Fiscal Year defaults to the current fiscal year.
  2. Chart of Accounts defaults to "UC", if not entered.
  3. Use the Available Balances Lookup logic in KFS, using the following selection criteria.
    1. Consolidation Option = Consolidation
    2. Include Pending Ledger Entry = All
    3. Transfers = Include
    4. Balance Sheet = Include
    5. Indirect Cost = Exclude
    6. Object Code Grouping = Exclude
  4. For Agency Accounts, no matter what fundsid, we will use the cash balance:
    1. Subfund group EQUALS "AGEN",
    2. Only include the balance of Object Code = 1100Lori – is this correct or is it the balance of the beginning balance and fiscal YTD balance? This is what I would define as the "available cash balance".If we are looking at it from the Available Balance screen, the available cash is simply the Actual Amount. If we are looking at it from the General Ledger Balance screen it would be the Beginning Balance plus the Annual Balance (current FY activity). I assume we are pulling from Available Balance. Is this correct, Bruce?
      .
  5. For non-sponsored fiscal accounts in the 1171 fundsid (which are not specifically budgeted during the annual budget process), we will use the available cash balance:
    1. Subfund group NOT EQUAL to "RSTSP",
    2. Fund Sid EQUALS 1171
    3. Only include the balance of Object Code = 1100See comment above regarding definition of "available cash balance.".
  6. For project accounts (as defined by subfund group code RSTSP), across all fundsids, we will include available budget balances from object codes 6000 – 6999. For these, the budget available is based on project-to-date and not fiscal-year-to-date $$.
    1. Subfund group EQUALS "RSTSP",
    2. All fundsids,
    3. Include (sum) the balances of Object Codes 6000 – 6999"Budget available" defined as budget amount less project-to-date actual expenses.
      If we are looking at the Available Balance screen, both Budget and Actuals are cumulative project to date. We should also decut the Encumbrances. So, in my opinion, it is really the sum of the Variance column for object codes 6000-6999..
  7. For all other non-sponsored accounts (subfund NOT RSTSP), across all other fundsids (NOT 1171), we will use the sum of all BUDGET AVAILABLE BALANCES IN(as defined in 3 above) object code in the 6000 – 6999 range:
    1. All other Subfund groups NOT EQUAL to "AGEN" and "RSTSP",
    2. Fund sid NOT EQUAL to 1171,
    3. Include (sum) the balances of Object Codes 6000 – 6999.


Calculation:
Available Balance = (BudgetAmount – ActualsAmount – EncumbranceAmount)

  • No labels