Search in sources :

Example 1 with LedgerBalance

use of org.kuali.kfs.module.ld.businessobject.LedgerBalance in project cu-kfs by CU-CommunityApps.

the class LedgerBalanceLookupableHelperServiceImpl method getInquiryUrl.

/**
 * @see org.kuali.kfs.kns.lookup.Lookupable#getInquiryUrl(org.kuali.kfs.kns.bo.BusinessObject, java.lang.String)
 */
@Override
public HtmlData getInquiryUrl(BusinessObject bo, String propertyName) {
    if (KFSPropertyConstants.POSITION_NUMBER.equals(propertyName)) {
        LedgerBalance balance = (LedgerBalance) bo;
        AbstractPositionDataDetailsInquirableImpl positionDataDetailsInquirable = new PositionDataDetailsInquirableImpl();
        Map<String, String> fieldValues = new HashMap<String, String>();
        fieldValues.put(propertyName, balance.getPositionNumber());
        BusinessObject positionData = positionDataDetailsInquirable.getBusinessObject(fieldValues);
        return positionData == null ? new AnchorHtmlData(KFSConstants.EMPTY_STRING, KFSConstants.EMPTY_STRING) : positionDataDetailsInquirable.getInquiryUrl(positionData, propertyName);
    }
    return (new LedgerBalanceInquirableImpl()).getInquiryUrl(bo, propertyName);
}
Also used : AbstractPositionDataDetailsInquirableImpl(org.kuali.kfs.integration.ld.businessobject.inquiry.AbstractPositionDataDetailsInquirableImpl) HashMap(java.util.HashMap) LedgerBalance(org.kuali.kfs.module.ld.businessobject.LedgerBalance) BusinessObject(org.kuali.rice.krad.bo.BusinessObject) LedgerBalanceInquirableImpl(com.rsmart.kuali.kfs.module.ld.businessobject.inquiry.LedgerBalanceInquirableImpl) AbstractPositionDataDetailsInquirableImpl(org.kuali.kfs.integration.ld.businessobject.inquiry.AbstractPositionDataDetailsInquirableImpl) PositionDataDetailsInquirableImpl(org.kuali.kfs.module.ld.businessobject.inquiry.PositionDataDetailsInquirableImpl) AnchorHtmlData(org.kuali.kfs.kns.lookup.HtmlData.AnchorHtmlData)

Example 2 with LedgerBalance

use of org.kuali.kfs.module.ld.businessobject.LedgerBalance in project cu-kfs by CU-CommunityApps.

the class July1PositionFundingLookupableHelperServiceImpl method getInquiryUrl.

/**
 * @see org.kuali.kfs.kns.lookup.Lookupable#getInquiryUrl(org.kuali.kfs.kns.bo.BusinessObject, java.lang.String)
 */
@Override
public HtmlData getInquiryUrl(BusinessObject bo, String propertyName) {
    if (KFSPropertyConstants.POSITION_NUMBER.equals(propertyName)) {
        LedgerBalance balance = (LedgerBalance) bo;
        AbstractPositionDataDetailsInquirableImpl positionDataDetailsInquirable = new PositionDataDetailsInquirableImpl();
        Map<String, String> fieldValues = new HashMap<String, String>();
        fieldValues.put(propertyName, balance.getPositionNumber());
        BusinessObject positionData = positionDataDetailsInquirable.getBusinessObject(fieldValues);
        return positionData == null ? new AnchorHtmlData(KFSConstants.EMPTY_STRING, KFSConstants.EMPTY_STRING) : positionDataDetailsInquirable.getInquiryUrl(positionData, propertyName);
    }
    return (new July1PositionFundingInquirableImpl()).getInquiryUrl(bo, propertyName);
}
Also used : AbstractPositionDataDetailsInquirableImpl(org.kuali.kfs.integration.ld.businessobject.inquiry.AbstractPositionDataDetailsInquirableImpl) HashMap(java.util.HashMap) LedgerBalance(org.kuali.kfs.module.ld.businessobject.LedgerBalance) July1PositionFundingInquirableImpl(com.rsmart.kuali.kfs.module.ld.businessobject.inquiry.July1PositionFundingInquirableImpl) BusinessObject(org.kuali.rice.krad.bo.BusinessObject) AbstractPositionDataDetailsInquirableImpl(org.kuali.kfs.integration.ld.businessobject.inquiry.AbstractPositionDataDetailsInquirableImpl) PositionDataDetailsInquirableImpl(org.kuali.kfs.module.ld.businessobject.inquiry.PositionDataDetailsInquirableImpl) AnchorHtmlData(org.kuali.kfs.kns.lookup.HtmlData.AnchorHtmlData)

Example 3 with LedgerBalance

use of org.kuali.kfs.module.ld.businessobject.LedgerBalance in project cu-kfs by CU-CommunityApps.

the class CurrentFundsLookupableHelperServiceImpl method getInquiryUrl.

/**
 * @see org.kuali.kfs.kns.lookup.Lookupable#getInquiryUrl(org.kuali.kfs.kns.bo.BusinessObject, java.lang.String)
 */
@Override
public HtmlData getInquiryUrl(BusinessObject bo, String propertyName) {
    if (KFSPropertyConstants.POSITION_NUMBER.equals(propertyName)) {
        LedgerBalance balance = (LedgerBalance) bo;
        AbstractPositionDataDetailsInquirableImpl positionDataDetailsInquirable = new PositionDataDetailsInquirableImpl();
        Map<String, String> fieldValues = new HashMap<String, String>();
        fieldValues.put(propertyName, balance.getPositionNumber());
        BusinessObject positionData = positionDataDetailsInquirable.getBusinessObject(fieldValues);
        return positionData == null ? new AnchorHtmlData(KFSConstants.EMPTY_STRING, KFSConstants.EMPTY_STRING) : positionDataDetailsInquirable.getInquiryUrl(positionData, propertyName);
    }
    return (new CurrentFundsInquirableImpl()).getInquiryUrl(bo, propertyName);
}
Also used : AbstractPositionDataDetailsInquirableImpl(org.kuali.kfs.integration.ld.businessobject.inquiry.AbstractPositionDataDetailsInquirableImpl) HashMap(java.util.HashMap) LedgerBalance(org.kuali.kfs.module.ld.businessobject.LedgerBalance) BusinessObject(org.kuali.rice.krad.bo.BusinessObject) PositionDataDetailsInquirableImpl(org.kuali.kfs.module.ld.businessobject.inquiry.PositionDataDetailsInquirableImpl) AbstractPositionDataDetailsInquirableImpl(org.kuali.kfs.integration.ld.businessobject.inquiry.AbstractPositionDataDetailsInquirableImpl) AnchorHtmlData(org.kuali.kfs.kns.lookup.HtmlData.AnchorHtmlData) CurrentFundsInquirableImpl(com.rsmart.kuali.kfs.module.ld.businessobject.inquiry.CurrentFundsInquirableImpl)

Example 4 with LedgerBalance

use of org.kuali.kfs.module.ld.businessobject.LedgerBalance in project cu-kfs by CU-CommunityApps.

the class CurrentFundsLookupableHelperServiceImpl method buildDetailedCurrentFundsCollection.

/**
 * Builds the current funds collection with detail option from an iterator
 *
 * @param iterator the current funds iterator
 * @param pendingEntryOption the selected pending entry option
 * @return the detailed balance collection
 */
private Collection<AccountStatusCurrentFunds> buildDetailedCurrentFundsCollection(Collection collection, String pendingEntryOption) {
    Collection<AccountStatusCurrentFunds> retval = new ArrayList<AccountStatusCurrentFunds>();
    for (LedgerBalance balance : ((Collection<LedgerBalance>) collection)) {
        AccountStatusCurrentFunds cf = new AccountStatusCurrentFunds();
        ObjectUtil.buildObject(cf, balance);
        cf.setDummyBusinessObject(new TransientBalanceInquiryAttributes());
        cf.getDummyBusinessObject().setPendingEntryOption(pendingEntryOption);
        cf.setOutstandingEncum(getOutstandingEncum(cf));
        cf.getDummyBusinessObject().setPendingEntryOption(pendingEntryOption);
        cf.getDummyBusinessObject().setConsolidationOption(Constant.DETAIL);
        retval.add(cf);
    }
    return retval;
}
Also used : AccountStatusCurrentFunds(org.kuali.kfs.module.ld.businessobject.AccountStatusCurrentFunds) TransientBalanceInquiryAttributes(org.kuali.kfs.gl.businessobject.TransientBalanceInquiryAttributes) LedgerBalance(org.kuali.kfs.module.ld.businessobject.LedgerBalance) ArrayList(java.util.ArrayList)

Aggregations

LedgerBalance (org.kuali.kfs.module.ld.businessobject.LedgerBalance)4 HashMap (java.util.HashMap)3 AbstractPositionDataDetailsInquirableImpl (org.kuali.kfs.integration.ld.businessobject.inquiry.AbstractPositionDataDetailsInquirableImpl)3 AnchorHtmlData (org.kuali.kfs.kns.lookup.HtmlData.AnchorHtmlData)3 PositionDataDetailsInquirableImpl (org.kuali.kfs.module.ld.businessobject.inquiry.PositionDataDetailsInquirableImpl)3 BusinessObject (org.kuali.rice.krad.bo.BusinessObject)3 CurrentFundsInquirableImpl (com.rsmart.kuali.kfs.module.ld.businessobject.inquiry.CurrentFundsInquirableImpl)1 July1PositionFundingInquirableImpl (com.rsmart.kuali.kfs.module.ld.businessobject.inquiry.July1PositionFundingInquirableImpl)1 LedgerBalanceInquirableImpl (com.rsmart.kuali.kfs.module.ld.businessobject.inquiry.LedgerBalanceInquirableImpl)1 ArrayList (java.util.ArrayList)1 TransientBalanceInquiryAttributes (org.kuali.kfs.gl.businessobject.TransientBalanceInquiryAttributes)1 AccountStatusCurrentFunds (org.kuali.kfs.module.ld.businessobject.AccountStatusCurrentFunds)1