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;
}
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;
}
Aggregations