本文整理汇总了Java中org.kuali.rice.core.api.util.type.KualiDecimal.doubleValue方法的典型用法代码示例。如果您正苦于以下问题:Java KualiDecimal.doubleValue方法的具体用法?Java KualiDecimal.doubleValue怎么用?Java KualiDecimal.doubleValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.kuali.rice.core.api.util.type.KualiDecimal
的用法示例。
在下文中一共展示了KualiDecimal.doubleValue方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: customizeExplicitGeneralLedgerPendingEntry
import org.kuali.rice.core.api.util.type.KualiDecimal; //导入方法依赖的package包/类
/**
* @see org.kuali.module.purap.rules.PurapAccountingDocumentRuleBase#customizeExplicitGeneralLedgerPendingEntry(org.kuali.ole.sys.document.AccountingDocument,
* org.kuali.ole.sys.businessobject.AccountingLine, org.kuali.ole.sys.businessobject.GeneralLedgerPendingEntry)
*/
@Override
public void customizeExplicitGeneralLedgerPendingEntry(GeneralLedgerPendingEntrySourceDetail postable, GeneralLedgerPendingEntry explicitEntry) {
super.customizeExplicitGeneralLedgerPendingEntry(postable, explicitEntry);
SpringContext.getBean(PurapGeneralLedgerService.class).customizeGeneralLedgerPendingEntry(this, (AccountingLine) postable, explicitEntry, getPurapDocumentIdentifier(), GL_DEBIT_CODE, PurapDocTypeCodes.PO_DOCUMENT, true);
KualiDecimal accountTotalGLEntryAmount = this.getAccountTotalGLEntryAmount((AccountingLine) postable);
explicitEntry.setTransactionLedgerEntryAmount(accountTotalGLEntryAmount);
String debitCreditCode = GL_DEBIT_CODE;
// if the amount is negative, flip the D/C indicator
if (accountTotalGLEntryAmount.doubleValue() < 0) {
if (GL_CREDIT_CODE.equals(debitCreditCode)) {
if (GL_CREDIT_CODE.equals(debitCreditCode)) {
explicitEntry.setTransactionDebitCreditCode(GL_DEBIT_CODE);
}
} else {
explicitEntry.setTransactionDebitCreditCode(GL_CREDIT_CODE);
}
} else {
explicitEntry.setTransactionDebitCreditCode(debitCreditCode);
}
// don't think i should have to override this, but default isn't getting the right PO doc
explicitEntry.setFinancialDocumentTypeCode(PurapDocTypeCodes.PO_DOCUMENT);
}
示例2: getReimbursableTotal
import org.kuali.rice.core.api.util.type.KualiDecimal; //导入方法依赖的package包/类
/**
* @see org.kuali.kfs.module.tem.document.TravelDocument#getReimbursableTotal()
*/
@Override
public KualiDecimal getReimbursableTotal() {
KualiDecimal eligible = getEligibleAmount();
final KualiDecimal expenseLimit = getExpenseLimit();
if (expenseLimit != null && expenseLimit.doubleValue() > 0) {
return eligible.isGreaterThan(expenseLimit) ? expenseLimit : eligible;
}
return eligible;
}
示例3: isTotalPayrollAmountOverChanged
import org.kuali.rice.core.api.util.type.KualiDecimal; //导入方法依赖的package包/类
/**
* determine if the change on the total payroll amount exceeds the specified limit
*
* @param document the given effort certification document
* @param limitOfTotalPayrollAmountChange the specified upper bound limit
* @return true if the change on the total payroll amount exceeds the specified limit; otherwise, false
*/
public static boolean isTotalPayrollAmountOverChanged(EffortCertificationDocument document, double limitOfTotalPayrollAmountChange) {
KualiDecimal totalPayrollAmount = document.getTotalPayrollAmount();
KualiDecimal totalOriginalPayrollAmount = document.getTotalOriginalPayrollAmount();
KualiDecimal difference = totalOriginalPayrollAmount.subtract(totalPayrollAmount).abs();
return difference.doubleValue() > limitOfTotalPayrollAmountChange;
}
示例4: getAssetPaymentDistributions
import org.kuali.rice.core.api.util.type.KualiDecimal; //导入方法依赖的package包/类
/**
* @see org.kuali.kfs.module.cam.util.distribution.AssetDistribution#getAssetPaymentDistributions()
*/
public Map<String, Map<AssetPaymentAssetDetail, KualiDecimal>> getAssetPaymentDistributions() {
distributionResult = new HashMap<String, Map<AssetPaymentAssetDetail, KualiDecimal>>();
KualiDecimal totalLineAmount = getTotalLineAmount();
for (AssetPaymentDetail line : getAssetPaymentDetailLines()) {
KualiDecimal lineAmount = line.getAmount();
KualiDecimal remainingAmount = lineAmount;
Map<AssetPaymentAssetDetail, KualiDecimal> apadMap = new HashMap<AssetPaymentAssetDetail, KualiDecimal>();
int size = doc.getAssetPaymentAssetDetail().size();
for (int i = 0; i < size; i++) {
AssetPaymentAssetDetail apad = doc.getAssetPaymentAssetDetail().get(i);
if (i < size - 1) {
double allocationPercentage = 0d;
// KualiDecimal allocationPercentage = new KualiDecimal(new BigDecimal(0), 6);
if (totalLineAmount.isNonZero()) {
allocationPercentage = apad.getAllocatedUserValue().doubleValue() / totalLineAmount.doubleValue();
// allocationPercentage = apad.getAllocatedUserValue().divide(totalLineAmount);
}
KualiDecimal amount = new KualiDecimal(allocationPercentage * lineAmount.doubleValue());
// KualiDecimal amount = allocationPercentage.multiply(lineAmount);
apadMap.put(apad, amount);
remainingAmount = remainingAmount.subtract(amount);
} else {
apadMap.put(apad, remainingAmount);
}
}
distributionResult.put(line.getAssetPaymentDetailKey(), apadMap);
}
return distributionResult;
}
示例5: distribute
import org.kuali.rice.core.api.util.type.KualiDecimal; //导入方法依赖的package包/类
public void distribute() {
KualiDecimal totalSourceAmount = this.assetGlobal.getTotalCostAmount();
KualiDecimal totalSeparateAmount = this.assetGlobal.getSeparateSourceTotalAmount();
KualiDecimal remainingAmount = totalSourceAmount.subtract(totalSeparateAmount);
// Compute separate ratio
separateRatio = totalSeparateAmount.doubleValue() / totalSourceAmount.doubleValue();
// Compute the retained ratio
retainRatio = remainingAmount.doubleValue() / totalSourceAmount.doubleValue();
List<AssetGlobalDetail> assetGlobalDetails = this.assetGlobal.getAssetGlobalDetails();
int size = assetGlobalDetails.size();
assetAllocateRatios = new double[size];
AssetGlobalDetail assetGlobalDetail = null;
// Compute ratio by each asset
for (int i = 0; i < size; i++) {
assetGlobalDetail = assetGlobalDetails.get(i);
Long capitalAssetNumber = assetGlobalDetail.getCapitalAssetNumber();
totalByAsset.put(capitalAssetNumber, KualiDecimal.ZERO);
assetAllocateRatios[i] = assetGlobalDetail.getSeparateSourceAmount().doubleValue() / totalSeparateAmount.doubleValue();
}
// Prepare the source and offset payments for split
prepareSourcePaymentsForSplit();
// Distribute payments by ratio
allocatePaymentAmountsByRatio();
// Round and balance by each payment line
roundPaymentAmounts();
// Round and balance by separate source amount
roundAccountChargeAmount();
// create offset payments
createOffsetPayments();
}
示例6: recalculatePayrollAmount
import org.kuali.rice.core.api.util.type.KualiDecimal; //导入方法依赖的package包/类
/**
* recalculate the payroll amount based on the given total amount and effort percent
*
* @param totalPayrollAmount the given total amount
* @param effortPercent the given effort percent
* @return the payroll amount calculated from the given total amount and effort percent
*/
public static KualiDecimal recalculatePayrollAmount(KualiDecimal totalPayrollAmount, Integer effortPercent) {
double amount = totalPayrollAmount.doubleValue() * effortPercent / HUNDRED_DOLLAR_AMOUNT.doubleValue();
return new KualiDecimal(amount);
}
示例7: recalculateEffortPercent
import org.kuali.rice.core.api.util.type.KualiDecimal; //导入方法依赖的package包/类
/**
* recalculate the effort percent based on the given total amount and payroll amount
*
* @param totalPayrollAmount the given total amount
* @param payrollAmount the given payroll amount
* @return the effort percent calculated from the given total amount and payroll amount
*/
public static Double recalculateEffortPercent(KualiDecimal totalPayrollAmount, KualiDecimal payrollAmount) {
double percent = payrollAmount.doubleValue() * HUNDRED_DOLLAR_AMOUNT.doubleValue() / totalPayrollAmount.doubleValue();
return percent;
}