Search in sources :

Example 1 with InvoiceType

use of edu.cornell.kfs.module.cg.businessobject.InvoiceType in project cu-kfs by CU-CommunityApps.

the class InvoiceTypeValuesFinder method getKeyValues.

public List<KeyValue> getKeyValues() {
    KeyValuesService boService = SpringContext.getBean(KeyValuesService.class);
    Collection<InvoiceType> invoiceTypeCodes = boService.findAll(InvoiceType.class);
    List<KeyValue> invoiceTypeKeyLabels = new ArrayList<KeyValue>();
    for (Iterator<InvoiceType> iter = invoiceTypeCodes.iterator(); iter.hasNext(); ) {
        InvoiceType element = (InvoiceType) iter.next();
        if (element.isActive()) {
            // only show active invoice types
            invoiceTypeKeyLabels.add(new ConcreteKeyValue(element.getInvoiceTypeCode(), element.getInvoiceTypeCode()));
        }
    }
    return invoiceTypeKeyLabels;
}
Also used : KeyValuesService(org.kuali.kfs.krad.service.KeyValuesService) ConcreteKeyValue(org.kuali.rice.core.api.util.ConcreteKeyValue) KeyValue(org.kuali.rice.core.api.util.KeyValue) ConcreteKeyValue(org.kuali.rice.core.api.util.ConcreteKeyValue) ArrayList(java.util.ArrayList) InvoiceType(edu.cornell.kfs.module.cg.businessobject.InvoiceType)

Aggregations

InvoiceType (edu.cornell.kfs.module.cg.businessobject.InvoiceType)1 ArrayList (java.util.ArrayList)1 KeyValuesService (org.kuali.kfs.krad.service.KeyValuesService)1 ConcreteKeyValue (org.kuali.rice.core.api.util.ConcreteKeyValue)1 KeyValue (org.kuali.rice.core.api.util.KeyValue)1