/** * Sets the corporate card payment cancel date to the given cancel date and handles the entry * cancellation for the payment * * @see * org.kuali.kfs.sys.batch.service.PaymentSourceToExtractService#cancelPayment(org.kuali.kfs.sys.document.PaymentSource, * java.sql.Date) */ @Override public void cancelPayment(TEMReimbursementDocument paymentSource, Date cancelDate) { if (paymentSource.getCorporateCardPaymentCancelDate() == null) { try { paymentSource.setCorporateCardPaymentCancelDate(cancelDate); getPaymentSourceHelperService().handleEntryCancellation(paymentSource, this); // save the document getDocumentService() .saveDocument( paymentSource, AccountingDocumentSaveWithNoLedgerEntryGenerationEvent.class); } catch (WorkflowException we) { LOG.error( "encountered workflow exception while attempting to save Disbursement Voucher: " + paymentSource.getDocumentNumber() + " " + we); throw new RuntimeException(we); } } }