Search in sources :

Example 6 with PaymentWorksVendor

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() + "'.");
    }
}
Also used : PaymentWorksVendor(edu.cornell.kfs.pmw.batch.businessobject.PaymentWorksVendor)

Example 7 with PaymentWorksVendor

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.");
    }
}
Also used : PaymentWorksVendor(edu.cornell.kfs.pmw.batch.businessobject.PaymentWorksVendor)

Example 8 with PaymentWorksVendor

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;
}
Also used : PaymentWorksVendor(edu.cornell.kfs.pmw.batch.businessobject.PaymentWorksVendor)

Example 9 with PaymentWorksVendor

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();
    }
}
Also used : PaymentWorksVendor(edu.cornell.kfs.pmw.batch.businessobject.PaymentWorksVendor) HashMap(java.util.HashMap) HashMap(java.util.HashMap) Map(java.util.Map)

Aggregations

PaymentWorksVendor (edu.cornell.kfs.pmw.batch.businessobject.PaymentWorksVendor)9 PaymentWorksBatchReportRawDataItem (edu.cornell.kfs.pmw.batch.report.PaymentWorksBatchReportRawDataItem)1 PaymentWorksNewVendorRequestsBatchReportData (edu.cornell.kfs.pmw.batch.report.PaymentWorksNewVendorRequestsBatchReportData)1 PaymentWorksNewVendorRequestDetailDTO (edu.cornell.kfs.pmw.batch.xmlObjects.PaymentWorksNewVendorRequestDetailDTO)1 HashMap (java.util.HashMap)1 Map (java.util.Map)1