Search in sources :

Example 1 with WireCharge

use of org.kuali.kfs.sys.businessobject.WireCharge in project cu-kfs by CU-CommunityApps.

the class DisbursementVoucherAction method retrieveWireChargeMessage.

/**
 * Builds the wire charge message for the current fiscal year.
 *
 * @return the wire charge message for the current fiscal year
 */
protected String retrieveWireChargeMessage() {
    String message = SpringContext.getBean(ConfigurationService.class).getPropertyValueAsString(KFSKeyConstants.MESSAGE_PAYMENT_WIRE_CHARGE);
    WireCharge wireCharge = new WireCharge();
    wireCharge.setUniversityFiscalYear(SpringContext.getBean(UniversityDateService.class).getCurrentFiscalYear());
    wireCharge = (WireCharge) SpringContext.getBean(BusinessObjectService.class).retrieve(wireCharge);
    Object[] args = { wireCharge.getDomesticChargeAmt(), wireCharge.getForeignChargeAmt() };
    return MessageFormat.format(message, args);
}
Also used : WireCharge(org.kuali.kfs.sys.businessobject.WireCharge) ConfigurationService(org.kuali.rice.core.api.config.property.ConfigurationService) BusinessObjectService(org.kuali.kfs.krad.service.BusinessObjectService)

Example 2 with WireCharge

use of org.kuali.kfs.sys.businessobject.WireCharge in project cu-kfs by CU-CommunityApps.

the class CuDisbursementVoucherDocument method generateDocumentGeneralLedgerPendingEntries.

@Override
public boolean generateDocumentGeneralLedgerPendingEntries(GeneralLedgerPendingEntrySequenceHelper sequenceHelper) {
    if (getGeneralLedgerPendingEntries() == null || getGeneralLedgerPendingEntries().size() < 2) {
        LOG.warn("No gl entries for accounting lines.");
        return true;
    }
    /*
         * only generate additional charge entries for payment method wire charge, and if the fee has not been waived
         */
    if (KFSConstants.PaymentSourceConstants.PAYMENT_METHOD_WIRE.equals(getDisbVchrPaymentMethodCode()) && !getWireTransfer().isWireTransferFeeWaiverIndicator()) {
        LOG.debug("generating wire charge gl pending entries.");
        // retrieve wire charge
        WireCharge wireCharge = getPaymentSourceHelperService().retrieveCurrentYearWireCharge();
        // KFSPTS-764: Added if check to eliminate zero dollar wire charge generating zero dollar accounting entries
        if (!isZeroDollarWireCharge(wireCharge)) {
            // KFSPTS-764: only generate GLPE entries when wire charges are NOT zero dollars.
            // generate debits
            GeneralLedgerPendingEntry chargeEntry = getPaymentSourceHelperService().processWireChargeDebitEntries(this, sequenceHelper, wireCharge);
            // generate credits
            getPaymentSourceHelperService().processWireChargeCreditEntries(this, sequenceHelper, wireCharge, chargeEntry);
        }
    }
    // for wire or drafts generate bank offset entry (if enabled), for ACH and checks offset will be generated by PDP
    if (KFSConstants.PaymentSourceConstants.PAYMENT_METHOD_WIRE.equals(getDisbVchrPaymentMethodCode()) || KFSConstants.PaymentSourceConstants.PAYMENT_METHOD_DRAFT.equals(getDisbVchrPaymentMethodCode())) {
        getPaymentSourceHelperService().generateDocumentBankOffsetEntries(this, sequenceHelper, DisbursementVoucherConstants.DOCUMENT_TYPE_WTFD);
    }
    return true;
}
Also used : GeneralLedgerPendingEntry(org.kuali.kfs.sys.businessobject.GeneralLedgerPendingEntry) WireCharge(org.kuali.kfs.sys.businessobject.WireCharge)

Aggregations

WireCharge (org.kuali.kfs.sys.businessobject.WireCharge)2 BusinessObjectService (org.kuali.kfs.krad.service.BusinessObjectService)1 GeneralLedgerPendingEntry (org.kuali.kfs.sys.businessobject.GeneralLedgerPendingEntry)1 ConfigurationService (org.kuali.rice.core.api.config.property.ConfigurationService)1