use of org.kuali.rice.core.api.util.type.KualiDecimal in project cu-kfs by CU-CommunityApps.
the class AdvanceDepositServiceImpl method getEmailMessageText.
private String getEmailMessageText(AchIncomeFile achIncomeFile, String payerMessage) {
StringBuilder message = new StringBuilder();
int totalPostedTransation = achTotalPostedTransactions + wiredTotalPostedTransactions;
KualiDecimal totalPostedTransactionAmount = achTotalPostedTransactionAmount.add(wiredTotalPostedTransactionAmount);
String fileDateTime;
try {
fileDateTime = getFormattedTimestamp(achIncomeFile, "fileDate/Time").toString();
} catch (FormatException e) {
// use the original file Date/Time string if encountered invalid format
fileDateTime = achIncomeFile.getFileDate() + " " + achIncomeFile.getFileTime();
}
message.append("File Date: " + fileDateTime);
message.append("\n");
message.append(" ");
message.append("COUNT ");
message.append(" AMOUNT ");
message.append("\n");
message.append(StringUtils.rightPad("ACH Posted", 20));
message.append(StringUtils.rightPad(achTotalPostedTransactions + "", 20));
message.append(StringUtils.leftPad(getFormattedAmount("##,##,##0.00", achTotalPostedTransactionAmount), 20));
message.append("\n");
message.append(StringUtils.rightPad("Wire Posted", 20));
message.append(StringUtils.rightPad(wiredTotalPostedTransactions + "", 20));
message.append(StringUtils.leftPad(getFormattedAmount("##,##,##0.00", wiredTotalPostedTransactionAmount), 20));
message.append("\n");
message.append(StringUtils.rightPad("Total Posted", 20));
message.append(StringUtils.rightPad(totalPostedTransation + "", 20));
message.append(StringUtils.leftPad(getFormattedAmount("##,##,##0.00", totalPostedTransactionAmount), 20));
message.append("\n");
message.append("\n");
message.append(StringUtils.rightPad("ACH Skipped", 20));
message.append(StringUtils.rightPad(achTotalSkippedTransactions + "", 20));
message.append(StringUtils.leftPad(getFormattedAmount("##,##,##0.00", achTotalSkippedTransactionAmount), 20));
message.append("\n");
message.append(StringUtils.rightPad("Wire Skipped", 20));
message.append(StringUtils.rightPad(wiredTotalSkippedTransactions + "", 20));
message.append(StringUtils.leftPad(getFormattedAmount("##,##,##0.00", wiredTotalSkippedTransactionAmount), 20));
message.append("\n");
if (StringUtils.isNotBlank(payerMessage)) {
message.append("\n");
message.append("Transactions Missing Payer Name: ");
message.append("\n");
message.append(payerMessage);
}
return message.toString();
}
use of org.kuali.rice.core.api.util.type.KualiDecimal in project cu-kfs by CU-CommunityApps.
the class AdvanceDepositServiceImpl method initializeTransactionCountsAndAmounts.
protected void initializeTransactionCountsAndAmounts() {
achTotalPostedTransactions = 0;
achTotalSkippedTransactions = 0;
wiredTotalPostedTransactions = 0;
wiredTotalSkippedTransactions = 0;
achTotalPostedTransactionAmount = new KualiDecimal(0.00);
achTotalSkippedTransactionAmount = new KualiDecimal(0.00);
wiredTotalPostedTransactionAmount = new KualiDecimal(0.00);
wiredTotalSkippedTransactionAmount = new KualiDecimal(0.00);
}
use of org.kuali.rice.core.api.util.type.KualiDecimal in project cu-kfs by CU-CommunityApps.
the class ProcurementCardFlatInputFileType method initialize.
private void initialize() {
parent = null;
duplicateTransactions = false;
transactionCount = 0;
headerTransactionCount = 0;
footerTransactionCount = 0;
lineCount = 1;
accumulatedDebits = new KualiDecimal(0);
accumulatedCredits = new KualiDecimal(0);
totalDebits = new KualiDecimal(0);
totalCredits = new KualiDecimal(0);
fileFooterCredits = new KualiDecimal(0);
fileFooterDebits = new KualiDecimal(0);
}
use of org.kuali.rice.core.api.util.type.KualiDecimal in project cu-kfs by CU-CommunityApps.
the class CuPurchaseOrderAmendmentDocument method isSeparationOfDutiesReviewRequired.
protected boolean isSeparationOfDutiesReviewRequired() {
try {
Set<Person> priorApprovers = getAllPriorApprovers();
// then no need for separation of duties
if (priorApprovers.size() > 0) {
return false;
}
} catch (WorkflowException we) {
LOG.error("Exception while attempting to retrieve all prior approvers from workflow: " + we);
}
ParameterService parameterService = SpringContext.getBean(ParameterService.class);
KualiDecimal maxAllowedAmount = new KualiDecimal(parameterService.getParameterValueAsString(RequisitionDocument.class, PurapParameterConstants.SEPARATION_OF_DUTIES_DOLLAR_AMOUNT));
// if app param amount is greater than or equal to documentTotalAmount... no need for separation of duties
KualiDecimal totalAmount = getFinancialSystemDocumentHeader().getFinancialDocumentTotalAmount();
if (ObjectUtils.isNotNull(maxAllowedAmount) && ObjectUtils.isNotNull(totalAmount) && (maxAllowedAmount.compareTo(totalAmount) >= 0)) {
return false;
} else {
return true;
}
}
use of org.kuali.rice.core.api.util.type.KualiDecimal in project cu-kfs by CU-CommunityApps.
the class CuRequisitionDocument method isAwardAmountGreaterThanThreshold.
protected boolean isAwardAmountGreaterThanThreshold() {
ParameterService parameterService = SpringContext.getBean(ParameterService.class);
String dollarThreshold = parameterService.getParameterValueAsString("KFS-PURAP", "Requisition", DOLLAR_THRESHOLD_REQUIRING_AWARD_REVIEW);
KualiDecimal dollarThresholdDecimal = new KualiDecimal(dollarThreshold);
if (this.getTotalPreTaxDollarAmount().isGreaterEqual(dollarThresholdDecimal)) {
return true;
}
return false;
}
Aggregations