use of org.kuali.kfs.sys.service.NonTransactional in project cu-kfs by CU-CommunityApps.
the class CuPaymentRequestServiceImpl method resetExtractedPaymentRequest.
/**
* @see org.kuali.kfs.module.purap.document.service.PaymentRequestService#resetExtractedPaymentRequest(org.kuali.kfs.module.purap.document.PaymentRequestDocument,
* java.lang.String)
*/
@Override
@NonTransactional
public void resetExtractedPaymentRequest(PaymentRequestDocument paymentRequest, String note) {
LOG.debug("resetExtractedPaymentRequest() started");
if (PaymentRequestStatuses.CANCELLED_STATUSES.contains(paymentRequest.getApplicationDocumentStatus())) {
LOG.debug("resetExtractedPaymentRequest() ended");
return;
}
paymentRequest.setExtractedTimestamp(null);
paymentRequest.setPaymentPaidTimestamp(null);
String noteText = "This Payment Request is being reset for extraction by PDP " + note;
try {
Note resetNote = documentService.createNoteFromDocument(paymentRequest, noteText);
paymentRequest.addNote(resetNote);
noteService.save(resetNote);
} catch (Exception e) {
throw new RuntimeException(PurapConstants.REQ_UNABLE_TO_CREATE_NOTE + " " + e);
}
purapService.saveDocumentNoValidation(paymentRequest);
if (LOG.isDebugEnabled()) {
LOG.debug("resetExtractedPaymentRequest() PREQ " + paymentRequest.getPurapDocumentIdentifier() + " Reset from Extracted status");
}
// force reindexing
reIndexDocument(paymentRequest);
}
use of org.kuali.kfs.sys.service.NonTransactional in project cu-kfs by CU-CommunityApps.
the class CuPaymentRequestServiceImpl method removeRequestCancelOnPaymentRequest.
/**
* @see org.kuali.kfs.module.purap.document.service.PaymentRequestService#removeHoldOnPaymentRequest(org.kuali.kfs.module.purap.document.PaymentRequestDocument)
*/
@Override
@NonTransactional
public void removeRequestCancelOnPaymentRequest(PaymentRequestDocument document, String note) throws Exception {
// save the note
Note noteObj = documentService.createNoteFromDocument(document, note);
document.addNote(noteObj);
noteService.save(noteObj);
clearRequestCancelFields(document);
purapService.saveDocumentNoValidation(document);
// force reindexing
reIndexDocument(document);
}
use of org.kuali.kfs.sys.service.NonTransactional in project cu-kfs by CU-CommunityApps.
the class CuPaymentRequestServiceImpl method cancelExtractedPaymentRequest.
@Override
@NonTransactional
public void cancelExtractedPaymentRequest(PaymentRequestDocument paymentRequest, String note) {
LOG.debug("cancelExtractedPaymentRequest() started");
if (PaymentRequestStatuses.CANCELLED_STATUSES.contains(paymentRequest.getApplicationDocumentStatus())) {
LOG.debug("cancelExtractedPaymentRequest() ended");
return;
}
try {
Note cancelNote = documentService.createNoteFromDocument(paymentRequest, note);
paymentRequest.addNote(cancelNote);
noteService.save(cancelNote);
} catch (Exception e) {
throw new RuntimeException(PurapConstants.REQ_UNABLE_TO_CREATE_NOTE, e);
}
// cancel extracted should not reopen PO
paymentRequest.setReopenPurchaseOrderIndicator(false);
// Performs save, so
getAccountsPayableService().cancelAccountsPayableDocument(paymentRequest, "");
// is necessary
if (LOG.isDebugEnabled()) {
LOG.debug("cancelExtractedPaymentRequest() PREQ " + paymentRequest.getPurapDocumentIdentifier() + " Cancelled Without Workflow");
LOG.debug("cancelExtractedPaymentRequest() ended");
}
// force reindexing
reIndexDocument(paymentRequest);
}
use of org.kuali.kfs.sys.service.NonTransactional in project cu-kfs by CU-CommunityApps.
the class CuPaymentRequestServiceImpl method addHoldOnPaymentRequest.
@Override
@NonTransactional
public PaymentRequestDocument addHoldOnPaymentRequest(PaymentRequestDocument document, String note) throws Exception {
// save the note
Note noteObj = documentService.createNoteFromDocument(document, note);
document.addNote(noteObj);
noteService.save(noteObj);
document.setHoldIndicator(true);
document.setLastActionPerformedByPersonId(GlobalVariables.getUserSession().getPerson().getPrincipalId());
purapService.saveDocumentNoValidation(document);
// force reindexing
reIndexDocument(document);
return document;
}
use of org.kuali.kfs.sys.service.NonTransactional in project cu-kfs by CU-CommunityApps.
the class GlLineServiceImpl method createAssetGlobalDocument.
/**
* @see GlLineService#createAssetGlobalDocument(List,
* GeneralLedgerEntry)
*/
@Override
@NonTransactional
public Document createAssetGlobalDocument(GeneralLedgerEntry primary, Integer capitalAssetLineNumber) throws WorkflowException {
// initiate a new document
MaintenanceDocument document = (MaintenanceDocument) documentService.getNewDocument(DocumentTypeName.ASSET_ADD_GLOBAL);
// create asset global
AssetGlobal assetGlobal = createAssetGlobal(primary, document);
assetGlobal.setCapitalAssetBuilderOriginIndicator(true);
assetGlobal.setAcquisitionTypeCode(assetGlobalService.getNewAcquisitionTypeCode());
updatePreTagInformation(primary, document, assetGlobal, capitalAssetLineNumber);
assetGlobal.getAssetPaymentDetails().addAll(createAssetPaymentDetails(primary, document, 0, capitalAssetLineNumber));
// save the document
document.getNewMaintainableObject().setMaintenanceAction(KRADConstants.MAINTENANCE_NEW_ACTION);
document.getDocumentHeader().setDocumentDescription(CAB_DESC_PREFIX + primary.getDocumentNumber());
document.getNewMaintainableObject().setBusinessObject(assetGlobal);
document.getNewMaintainableObject().setBoClass(assetGlobal.getClass());
documentService.saveDocument(document);
// mark the capital asset as processed..
markCapitalAssetProcessed(primary, capitalAssetLineNumber);
deactivateGLEntries(primary, document, capitalAssetLineNumber);
return document;
}
Aggregations