use of edu.cornell.kfs.fp.businessobject.CuDisbursementVoucherPayeeDetail in project cu-kfs by CU-CommunityApps.
the class CuDisbursementVoucherDocument method populateDocumentForRouting.
@Override
public void populateDocumentForRouting() {
CuDisbursementVoucherPayeeDetail payeeDetail = getDvPayeeDetail();
if (payeeDetail.isVendor()) {
payeeDetail.setDisbVchrPayeeEmployeeCode(getVendorService().isVendorInstitutionEmployee(payeeDetail.getDisbVchrVendorHeaderIdNumberAsInteger()));
payeeDetail.setDvPayeeSubjectPaymentCode(getVendorService().isSubjectPaymentVendor(payeeDetail.getDisbVchrVendorHeaderIdNumberAsInteger()));
} else if (payeeDetail.isEmployee() || payeeDetail.isStudent() || payeeDetail.isAlumni()) {
// Determine if employee student or alumni is a research subject
ParameterEvaluator researchPaymentReasonCodeEvaluator = /*REFACTORME*/
SpringContext.getBean(ParameterEvaluatorService.class).getParameterEvaluator(DisbursementVoucherDocument.class, DisbursementVoucherConstants.RESEARCH_PAYMENT_REASONS_PARM_NM, payeeDetail.getDisbVchrPaymentReasonCode());
if (researchPaymentReasonCodeEvaluator.evaluationSucceeds()) {
if (getParameterService().parameterExists(DisbursementVoucherDocument.class, DisbursementVoucherConstants.RESEARCH_NON_VENDOR_PAY_LIMIT_AMOUNT_PARM_NM)) {
String researchPayLimit = getParameterService().getParameterValueAsString(DisbursementVoucherDocument.class, DisbursementVoucherConstants.RESEARCH_NON_VENDOR_PAY_LIMIT_AMOUNT_PARM_NM);
if (StringUtils.isNotBlank(researchPayLimit)) {
KualiDecimal payLimit = new KualiDecimal(researchPayLimit);
if (getDisbVchrCheckTotalAmount().isLessThan(payLimit)) {
payeeDetail.setDvPayeeSubjectPaymentCode(true);
}
}
}
}
}
// Call last, serializes to XML
super.populateDocumentForRouting();
}
use of edu.cornell.kfs.fp.businessobject.CuDisbursementVoucherPayeeDetail in project cu-kfs by CU-CommunityApps.
the class CuDisbursementVoucherDocument method clearPayee.
protected void clearPayee(String messageKey) {
dvPayeeDetail = new CuDisbursementVoucherPayeeDetail();
getDvPayeeDetail().setDisbVchrPayeeIdNumber(StringUtils.EMPTY);
clearDvPayeeIdType();
KNSGlobalVariables.getMessageList().add(messageKey);
}
use of edu.cornell.kfs.fp.businessobject.CuDisbursementVoucherPayeeDetail in project cu-kfs by CU-CommunityApps.
the class CuDisbursementVoucherDocumentTest method setupEmployeePayeeDetail.
public void setupEmployeePayeeDetail(String employeeId) {
CuDisbursementVoucherPayeeDetail dvPayeeDetail = new TestEmployeeDisbursementVoucherPayeeDetail();
dvPayeeDetail.setDisbVchrPayeeIdNumber(employeeId);
dvPayeeDetail.setDisbursementVoucherPayeeTypeCode(KFSConstants.PaymentPayeeTypes.EMPLOYEE);
cuDisbursementVoucherDocument.setDvPayeeDetail(dvPayeeDetail);
}
use of edu.cornell.kfs.fp.businessobject.CuDisbursementVoucherPayeeDetail in project cu-kfs by CU-CommunityApps.
the class CuDisbursementVoucherDocumentTest method setupPayeeDetail.
public void setupPayeeDetail(String disbVchrVendorDetailAssignedIdNumber, String disbVchrVendorHeaderIdNumber) {
CuDisbursementVoucherPayeeDetail dvPayeeDetail = new TestDisbursementVoucherPayeeDetail();
dvPayeeDetail.setDisbVchrPayeeIdNumber(disbVchrVendorHeaderIdNumber + "-" + disbVchrVendorDetailAssignedIdNumber);
dvPayeeDetail.setDisbVchrVendorHeaderIdNumber(disbVchrVendorHeaderIdNumber);
dvPayeeDetail.setDisbVchrVendorDetailAssignedIdNumber(disbVchrVendorDetailAssignedIdNumber);
dvPayeeDetail.setDisbursementVoucherPayeeTypeCode(KFSConstants.PaymentPayeeTypes.VENDOR);
cuDisbursementVoucherDocument.setDvPayeeDetail(dvPayeeDetail);
}
use of edu.cornell.kfs.fp.businessobject.CuDisbursementVoucherPayeeDetail 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