Search in sources :

Example 1 with PaymentSourceWireTransfer

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

the class CuDisbursementVoucherDocumentPreRules method checkWireTransferTabState.

/**
 * This method returns true if the state of all the tabs is valid, false otherwise.
 *
 * @param dvDocument submitted disbursement voucher document
 * @return Returns true if the state of all the tabs is valid, false otherwise.
 */
@SuppressWarnings("deprecation")
protected boolean checkWireTransferTabState(DisbursementVoucherDocument dvDocument) {
    boolean tabStatesOK = true;
    PaymentSourceWireTransfer dvWireTransfer = dvDocument.getWireTransfer();
    // if payment method is CHECK and wire tab contains data, ask user to clear tab
    if ((StringUtils.equals(KFSConstants.PaymentSourceConstants.PAYMENT_METHOD_CHECK, dvDocument.getDisbVchrPaymentMethodCode()) || StringUtils.equals(KFSConstants.PaymentSourceConstants.PAYMENT_METHOD_DRAFT, dvDocument.getDisbVchrPaymentMethodCode())) && hasWireTransferValues(dvWireTransfer)) {
        String questionText = SpringContext.getBean(ConfigurationService.class).getPropertyValueAsString(CUKFSKeyConstants.QUESTION_CLEAR_UNNEEDED_WIRE_TAB);
        boolean clearTab = super.askOrAnalyzeYesNoQuestion(KFSConstants.DisbursementVoucherDocumentConstants.CLEAR_WIRE_TRANSFER_TAB_QUESTION_ID, questionText);
        if (clearTab) {
            // NOTE: Can't replace with new instance because Foreign Draft uses same object
            clearWireTransferValues(dvWireTransfer);
        } else {
            // return to document if the user doesn't want to clear the Wire Transfer tab
            super.event.setActionForwardName(KFSConstants.MAPPING_BASIC);
            tabStatesOK = false;
        }
    }
    return tabStatesOK;
}
Also used : PaymentSourceWireTransfer(org.kuali.kfs.sys.businessobject.PaymentSourceWireTransfer) ConfigurationService(org.kuali.rice.core.api.config.property.ConfigurationService)

Example 2 with PaymentSourceWireTransfer

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

the class RecurringDisbursementVoucherDocumentServiceImpl method buildCuDisbursementVoucherDocument.

private CuDisbursementVoucherDocument buildCuDisbursementVoucherDocument(RecurringDisbursementVoucherDocument recurringDV) throws WorkflowException {
    CuDisbursementVoucherDocument dv = (CuDisbursementVoucherDocument) getDocumentService().getNewDocument(CuDisbursementVoucherDocument.class);
    dv.setDisbVchrContactPersonName(recurringDV.getDisbVchrContactPersonName());
    dv.setDisbVchrContactPhoneNumber(recurringDV.getDisbVchrContactPhoneNumber());
    dv.setDisbVchrContactEmailId(recurringDV.getDisbVchrContactEmailId());
    dv.setDisbVchrAttachmentCode(recurringDV.isDisbVchrAttachmentCode());
    dv.setDisbVchrSpecialHandlingCode(recurringDV.isDisbVchrSpecialHandlingCode());
    dv.setDisbVchrForeignCurrencyInd(recurringDV.isDisbVchrForeignCurrencyInd());
    dv.setDisbursementVoucherDocumentationLocationCode(recurringDV.getDisbursementVoucherDocumentationLocationCode());
    dv.setDisbVchrCheckStubText(recurringDV.getDisbVchrCheckStubText());
    dv.setDvCheckStubOverflowCode(recurringDV.getDvCheckStubOverflowCode());
    dv.setCampusCode(recurringDV.getCampusCode());
    dv.setDisbVchrPayeeTaxControlCode(recurringDV.getDisbVchrPayeeTaxControlCode());
    dv.setDisbVchrPayeeChangedInd(recurringDV.isDisbVchrPayeeChangedInd());
    dv.setExceptionIndicator(recurringDV.isExceptionIndicator());
    dv.setDisbursementVoucherPdpStatus(recurringDV.getDisbursementVoucherPdpStatus());
    dv.setDisbVchrBankCode(recurringDV.getDisbVchrBankCode());
    dv.setPayeeAssigned(recurringDV.isPayeeAssigned());
    dv.setEditW9W8BENbox(recurringDV.isEditW9W8BENbox());
    dv.setDisbVchrPdpBankCode(recurringDV.getDisbVchrPdpBankCode());
    dv.setImmediatePaymentIndicator(recurringDV.isImmediatePaymentIndicator());
    dv.setDisbExcptAttachedIndicator(recurringDV.isDisbExcptAttachedIndicator());
    dv.setDisbVchrPayeeW9CompleteCode(recurringDV.getDisbVchrPayeeW9CompleteCode());
    dv.setDisbVchrPaymentMethodCode(recurringDV.getDisbVchrPaymentMethodCode());
    CuDisbursementVoucherPayeeDetail payeeDetail = (CuDisbursementVoucherPayeeDetail) ObjectUtils.deepCopy(recurringDV.getDvPayeeDetail());
    payeeDetail.setDocumentNumber(dv.getDocumentNumber());
    dv.setDvPayeeDetail(payeeDetail);
    PaymentSourceWireTransfer wireTransfer = (PaymentSourceWireTransfer) ObjectUtils.deepCopy(recurringDV.getWireTransfer());
    wireTransfer.setDocumentNumber(dv.getDocumentNumber());
    dv.setWireTransfer(wireTransfer);
    DisbursementVoucherNonEmployeeTravel nonEmployeeTravel = (DisbursementVoucherNonEmployeeTravel) ObjectUtils.deepCopy(recurringDV.getDvNonEmployeeTravel());
    nonEmployeeTravel.setDocumentNumber(dv.getDocumentNumber());
    dv.setDvNonEmployeeTravel(nonEmployeeTravel);
    DisbursementVoucherNonResidentAlienTax nonAlienTax = (DisbursementVoucherNonResidentAlienTax) ObjectUtils.deepCopy(recurringDV.getDvNonResidentAlienTax());
    nonAlienTax.setDocumentNumber(dv.getDocumentNumber());
    dv.setDvNonResidentAlienTax(nonAlienTax);
    DisbursementVoucherPreConferenceDetail conferenceDetail = (DisbursementVoucherPreConferenceDetail) ObjectUtils.deepCopy(recurringDV.getDvPreConferenceDetail());
    conferenceDetail.setDocumentNumber(dv.getDocumentNumber());
    dv.setDvPreConferenceDetail(conferenceDetail);
    return dv;
}
Also used : CuDisbursementVoucherDocument(edu.cornell.kfs.fp.document.CuDisbursementVoucherDocument) DisbursementVoucherNonEmployeeTravel(org.kuali.kfs.fp.businessobject.DisbursementVoucherNonEmployeeTravel) DisbursementVoucherPreConferenceDetail(org.kuali.kfs.fp.businessobject.DisbursementVoucherPreConferenceDetail) PaymentSourceWireTransfer(org.kuali.kfs.sys.businessobject.PaymentSourceWireTransfer) CuDisbursementVoucherPayeeDetail(edu.cornell.kfs.fp.businessobject.CuDisbursementVoucherPayeeDetail) DisbursementVoucherNonResidentAlienTax(org.kuali.kfs.fp.businessobject.DisbursementVoucherNonResidentAlienTax)

Aggregations

PaymentSourceWireTransfer (org.kuali.kfs.sys.businessobject.PaymentSourceWireTransfer)2 CuDisbursementVoucherPayeeDetail (edu.cornell.kfs.fp.businessobject.CuDisbursementVoucherPayeeDetail)1 CuDisbursementVoucherDocument (edu.cornell.kfs.fp.document.CuDisbursementVoucherDocument)1 DisbursementVoucherNonEmployeeTravel (org.kuali.kfs.fp.businessobject.DisbursementVoucherNonEmployeeTravel)1 DisbursementVoucherNonResidentAlienTax (org.kuali.kfs.fp.businessobject.DisbursementVoucherNonResidentAlienTax)1 DisbursementVoucherPreConferenceDetail (org.kuali.kfs.fp.businessobject.DisbursementVoucherPreConferenceDetail)1 ConfigurationService (org.kuali.rice.core.api.config.property.ConfigurationService)1