use of edu.cornell.kfs.pmw.batch.businessobject.PaymentWorksVendor in project cu-kfs by CU-CommunityApps.
the class PaymentWorksBatchUtilityServiceImpl method registerKfsPvenDisapprovalForExistingPaymentWorksVendor.
@Override
public void registerKfsPvenDisapprovalForExistingPaymentWorksVendor(String kfsVendorDocumentNumber, VendorDetail vendorDetail) {
PaymentWorksVendor pmwVendor = getPaymentWorksVendorByDocumentNumber(kfsVendorDocumentNumber);
if (ObjectUtils.isNotNull(pmwVendor)) {
LOG.info("registerKfsPvenDisapprovalForExistingPaymentWorksVendor: Disapproving PaymentWorks originating Vendor with table ID '" + pmwVendor.getId() + "' and kfsVendorDocumentNumber '" + kfsVendorDocumentNumber + "' and pmwVendorRequestId '" + pmwVendor.getPmwVendorRequestId() + "'");
getPaymentWorksVendorDao().updateExistingPaymentWorksVendorInStagingTable(pmwVendor.getId(), PaymentWorksConstants.KFSVendorProcessingStatus.VENDOR_DISAPPROVED, vendorDetail.getVendorHeaderGeneratedIdentifier(), vendorDetail.getVendorDetailAssignedIdentifier(), getDateTimeService().getCurrentTimestamp());
} else {
LOG.error("registerKfsPvenDisapprovalForExistingPaymentWorksVendor: Vendor retrieval by KFS document number '" + kfsVendorDocumentNumber + "' did not find vendor with pmwVendorRequestId '" + pmwVendor.getPmwVendorRequestId() + "'.");
}
}
use of edu.cornell.kfs.pmw.batch.businessobject.PaymentWorksVendor in project cu-kfs by CU-CommunityApps.
the class PaymentWorksBatchUtilityServiceImpl method registerKfsPvenApprovalForExistingPaymentWorksVendor.
@Override
public void registerKfsPvenApprovalForExistingPaymentWorksVendor(String kfsVendorDocumentNumber, VendorDetail vendorDetail) {
PaymentWorksVendor pmwVendor = getPaymentWorksVendorByDocumentNumber(kfsVendorDocumentNumber);
if (ObjectUtils.isNotNull(pmwVendor)) {
LOG.info("registerKfsPvenApprovalForExistingPaymentWorksVendor: Approving PaymentWorks originating Vendor with table ID '" + pmwVendor.getId() + "' and kfsVendorDocumentNumber '" + kfsVendorDocumentNumber + "' and pmwVendorRequestId '" + pmwVendor.getPmwVendorRequestId() + "' and vendor number '");
getPaymentWorksVendorDao().updateExistingPaymentWorksVendorInStagingTable(pmwVendor.getId(), PaymentWorksConstants.KFSVendorProcessingStatus.VENDOR_APPROVED, vendorDetail.getVendorHeaderGeneratedIdentifier(), vendorDetail.getVendorDetailAssignedIdentifier(), getDateTimeService().getCurrentTimestamp());
} else {
LOG.error("registerKfsPvenApprovalForExistingPaymentWorksVendor: PaymentWorks staging table retrieval by KFS document number '" + kfsVendorDocumentNumber + "' failed to find vendor to set KFS Approve status values.");
}
}
use of edu.cornell.kfs.pmw.batch.businessobject.PaymentWorksVendor in project cu-kfs by CU-CommunityApps.
the class PaymentWorksBatchUtilityServiceImpl method populateKfsEnteredPaymentWorksVendor.
private PaymentWorksVendor populateKfsEnteredPaymentWorksVendor(String kfsVendorDocumentNumber, VendorDetail vendorDetail, String kfsVendorProcessingStatus) {
PaymentWorksVendor pmwVendor = new PaymentWorksVendor();
pmwVendor.setPmwTransactionType(PaymentWorksConstants.PaymentWorksTransactionType.KFS_ORIGINATING_VENDOR);
pmwVendor.setKfsVendorProcessingStatus(kfsVendorProcessingStatus);
pmwVendor.setKfsVendorDocumentNumber(kfsVendorDocumentNumber);
pmwVendor.setProcessTimestamp(getDateTimeService().getCurrentTimestamp());
pmwVendor.setKfsVendorHeaderGeneratedIdentifier(vendorDetail.getVendorHeaderGeneratedIdentifier());
pmwVendor.setKfsVendorDetailAssignedIdentifier(vendorDetail.getVendorDetailAssignedIdentifier());
pmwVendor.setRequestingCompanyTin(vendorDetail.getVendorHeader().getVendorTaxNumber());
populateVendorLegalName(pmwVendor, vendorDetail);
populateRemitAddress(pmwVendor, vendorDetail);
populateContactEmail(pmwVendor, vendorDetail);
return pmwVendor;
}
use of edu.cornell.kfs.pmw.batch.businessobject.PaymentWorksVendor in project cu-kfs by CU-CommunityApps.
the class PaymentWorksBatchUtilityServiceImpl method getPaymentWorksVendorByDocumentNumber.
private PaymentWorksVendor getPaymentWorksVendorByDocumentNumber(String documentNumber) {
Map criteria = new HashMap();
criteria.put(PaymentWorksPropertiesConstants.PaymentWorksVendor.KFS_VENDOR_DOCUMENT_NUMBER, documentNumber);
Collection<PaymentWorksVendor> newVendors = getBusinessObjectService().findMatching(PaymentWorksVendor.class, criteria);
if (ObjectUtils.isNull(newVendors) || newVendors.isEmpty()) {
return null;
} else {
return newVendors.iterator().next();
}
}
Aggregations