Skip to content

Commit

Permalink
Merge branch 'release-2.1' of https://github.com/openlibraryenvironme…
Browse files Browse the repository at this point in the history
…nt/ole into release-2.1
  • Loading branch information
sheiksalahudeen committed Sep 21, 2016
2 parents 1155cfa + e7ecc70 commit 09487a4
Show file tree
Hide file tree
Showing 4 changed files with 316 additions and 255 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public String generatePatronBillPayment(OleLoanDocument oleLoanDocument, String
}

OleDeliverBatchServiceImpl oleDeliverBatchService = new OleDeliverBatchServiceImpl();
contentForSendMail.append(oleDeliverBatchService.generateMailContentFromPatronBill(oleLoanDocument, oleLoanDocument.getOlePatron(), feeTypeName, String.valueOf(fineAmount), patronBillPayment));
contentForSendMail.append(oleDeliverBatchService.generateMailContentFromPatronBill(oleLoanDocument, oleLoanDocument.getOlePatron(), feeTypeName, String.valueOf(new KualiDecimal(fineAmount)), patronBillPayment));
OleMailer oleMail = GlobalResourceLoader.getService("oleMailer");
String replyToEmail = getCircDeskLocationResolver().getReplyToEmail(oleLoanDocument.getItemLocation());
if (replyToEmail != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import org.kuali.ole.deliver.notice.executors.HoldExpirationNoticesExecutor;
import org.kuali.ole.deliver.notice.executors.MissingPieceNoticesExecutor;
import org.kuali.ole.deliver.notice.executors.OnHoldNoticesExecutor;
import org.kuali.ole.deliver.service.OleDeliverRequestDocumentHelperServiceImpl;
import org.kuali.ole.deliver.service.OleLoanDocumentDaoOjb;
import org.kuali.ole.deliver.service.ParameterValueResolver;
import org.kuali.ole.deliver.util.*;
Expand Down Expand Up @@ -87,6 +88,7 @@ public abstract class CheckinBaseController extends CircUtilController {
private MissingPieceNoteHandler missingPieceNoteHandler;
private OleLoanDocumentsFromSolrBuilder oleLoanDocumentsFromSolrBuilder;
private OleLoanDocumentDaoOjb loanDaoOjb;
private OleDeliverRequestDocumentHelperServiceImpl oleDeliverRequestDocumentHelperService;

public OnHoldCourtesyNoticeUtil getOnHoldCourtesyNoticeUtil() {
if (null == onHoldCourtesyNoticeUtil) {
Expand Down Expand Up @@ -140,7 +142,15 @@ public DroolsResponse checkin(OLEForm oleForm) {
DroolsResponse droolsResponse = null;
if (null != itemRecord) {
OleLoanDocument loanDocument = getLoanDocument(itemBarcode);
setDataElements(oleForm, itemRecord, loanDocument);

try {
loanDocument = getOleDeliverRequestDocumentHelperService().getLoanDocumentWithItemInfo(loanDocument, false);
}
catch (Exception e) {
e.printStackTrace();
}

setDataElements(oleForm, itemRecord, loanDocument);
droolsResponse = preValidations(itemRecord, oleForm);
if (null != droolsResponse) {
return droolsResponse;
Expand All @@ -158,6 +168,13 @@ public DroolsResponse checkin(OLEForm oleForm) {
return droolsResponse;
}

public OleDeliverRequestDocumentHelperServiceImpl getOleDeliverRequestDocumentHelperService() {
if (oleDeliverRequestDocumentHelperService == null) {
oleDeliverRequestDocumentHelperService = new OleDeliverRequestDocumentHelperServiceImpl();
}
return oleDeliverRequestDocumentHelperService;
}

private void transferExchangeInfoFromDroolsResponseToCheckinForm(OLEForm oleForm, DroolsResponse droolsResponse) {
for (Iterator<String> iterator = droolsResponse.getDroolsExchange().getContext().keySet().iterator(); iterator.hasNext(); ) {
String key = iterator.next();
Expand Down
Loading

0 comments on commit 09487a4

Please sign in to comment.