本文整理汇总了Java中org.kuali.rice.core.api.util.type.KualiDecimal.negated方法的典型用法代码示例。如果您正苦于以下问题:Java KualiDecimal.negated方法的具体用法?Java KualiDecimal.negated怎么用?Java KualiDecimal.negated使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.kuali.rice.core.api.util.type.KualiDecimal
的用法示例。
在下文中一共展示了KualiDecimal.negated方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getBudgetAdjustmentDecreaseForObject
import org.kuali.rice.core.api.util.type.KualiDecimal; //导入方法依赖的package包/类
public KualiDecimal getBudgetAdjustmentDecreaseForObject(String chartCode, String accountNo,
String objectCode) {
Map searchMap = new HashMap();
searchMap.put("chartOfAccountsCode", chartCode);
searchMap.put("accountNumber", accountNo);
searchMap.put("financialObjectCode", objectCode);
searchMap.put("financialDocumentTypeCode", OLEConstants.DOC_TYP_CD);
searchMap.put("financialBalanceTypeCode", OLEConstants.BAL_TYP_CD);
searchMap.put("financialDocumentApprovedCode", OLEConstants.FDOC_APPR_CD);
List<GeneralLedgerPendingEntry> generalLedgerPendingEntryList = (List<GeneralLedgerPendingEntry>) SpringContext.getBean(
BusinessObjectService.class).findMatching(GeneralLedgerPendingEntry.class, searchMap);
KualiDecimal budgetDecrease = KualiDecimal.ZERO;
if (generalLedgerPendingEntryList.size() > 0) {
for (GeneralLedgerPendingEntry entry : generalLedgerPendingEntryList) {
if (entry.getTransactionLedgerEntryAmount().isLessThan(KualiDecimal.ZERO)) {
budgetDecrease = budgetDecrease.add(entry.getTransactionLedgerEntryAmount());
}
}
}
return budgetDecrease.negated();
}
示例2: getBudgetAdjustmentDecreaseForAccount
import org.kuali.rice.core.api.util.type.KualiDecimal; //导入方法依赖的package包/类
public KualiDecimal getBudgetAdjustmentDecreaseForAccount(String chartCode, String accountNo,
String objectCode) {
Map searchMap = new HashMap();
searchMap.put("chartOfAccountsCode", chartCode);
searchMap.put("accountNumber", accountNo);
searchMap.put("financialDocumentTypeCode", OLEConstants.DOC_TYP_CD);
searchMap.put("financialBalanceTypeCode", OLEConstants.BAL_TYP_CD);
searchMap.put("financialDocumentApprovedCode", OLEConstants.FDOC_APPR_CD);
List<GeneralLedgerPendingEntry> generalLedgerPendingEntryList = (List<GeneralLedgerPendingEntry>) SpringContext.getBean(
BusinessObjectService.class).findMatching(GeneralLedgerPendingEntry.class, searchMap);
KualiDecimal budgetDecrease = KualiDecimal.ZERO;
if (generalLedgerPendingEntryList.size() > 0) {
for (GeneralLedgerPendingEntry entry : generalLedgerPendingEntryList) {
if (entry.getTransactionLedgerEntryAmount().isLessThan(KualiDecimal.ZERO)) {
budgetDecrease = budgetDecrease.add(entry.getTransactionLedgerEntryAmount());
}
}
}
return budgetDecrease.negated();
}
示例3: getBudgetAdjustmentDecreaseForObject
import org.kuali.rice.core.api.util.type.KualiDecimal; //导入方法依赖的package包/类
public KualiDecimal getBudgetAdjustmentDecreaseForObject(String chartCode, String accountNo,
String objectCode) {
Map searchMap = new HashMap();
searchMap.put("chartOfAccountsCode", chartCode);
searchMap.put("accountNumber", accountNo);
searchMap.put("financialObjectCode", objectCode);
searchMap.put("financialDocumentTypeCode", OLEConstants.DOC_TYP_CD);
searchMap.put("financialBalanceTypeCode", OLEConstants.BAL_TYP_CD);
searchMap.put("financialDocumentApprovedCode", OLEConstants.FDOC_APPR_CD);
List<GeneralLedgerPendingEntry> generalLedgerPendingEntryList = (List<GeneralLedgerPendingEntry>) SpringContext.getBean(
BusinessObjectService.class).findMatching(GeneralLedgerPendingEntry.class, searchMap);
KualiDecimal budgetDecrease = KualiDecimal.ZERO;
if (generalLedgerPendingEntryList.size() > 0) {
for (GeneralLedgerPendingEntry entry : generalLedgerPendingEntryList) {
if (entry.getTransactionLedgerEntryAmount().isLessThan(KualiDecimal.ZERO)) {
budgetDecrease = budgetDecrease.add(entry.getTransactionLedgerEntryAmount());
}
}
}
return budgetDecrease.negated();
}
示例4: getBudgetAdjustmentDecreaseForAccount
import org.kuali.rice.core.api.util.type.KualiDecimal; //导入方法依赖的package包/类
public KualiDecimal getBudgetAdjustmentDecreaseForAccount(String chartCode, String accountNo,
String objectCode) {
Map searchMap = new HashMap();
searchMap.put("chartOfAccountsCode", chartCode);
searchMap.put("accountNumber", accountNo);
searchMap.put("financialDocumentTypeCode", OLEConstants.DOC_TYP_CD);
searchMap.put("financialBalanceTypeCode", OLEConstants.BAL_TYP_CD);
searchMap.put("financialDocumentApprovedCode", OLEConstants.FDOC_APPR_CD);
List<GeneralLedgerPendingEntry> generalLedgerPendingEntryList = (List<GeneralLedgerPendingEntry>) SpringContext.getBean(
BusinessObjectService.class).findMatching(GeneralLedgerPendingEntry.class, searchMap);
KualiDecimal budgetDecrease = KualiDecimal.ZERO;
if (generalLedgerPendingEntryList.size() > 0) {
for (GeneralLedgerPendingEntry entry : generalLedgerPendingEntryList) {
if (entry.getTransactionLedgerEntryAmount().isLessThan(KualiDecimal.ZERO)) {
budgetDecrease = budgetDecrease.add(entry.getTransactionLedgerEntryAmount());
}
}
}
return budgetDecrease.negated();
}
示例5: addAccounts
import org.kuali.rice.core.api.util.type.KualiDecimal; //导入方法依赖的package包/类
/**
* Add accounts to a PDP Payment Detail
*
* @param accountsPayableDocument
* @param paymentDetail
* @param documentType
*/
protected void addAccounts(AccountsPayableDocument accountsPayableDocument, PaymentDetail paymentDetail, String documentType) {
String creditMemoDocType = getDataDictionaryService().getDocumentTypeNameByClass(VendorCreditMemoDocument.class);
List<SourceAccountingLine> sourceAccountingLines = purapAccountingService.generateSourceAccountsForVendorRemit(accountsPayableDocument);
for (SourceAccountingLine sourceAccountingLine : sourceAccountingLines) {
KualiDecimal lineAmount = sourceAccountingLine.getAmount();
PaymentAccountDetail paymentAccountDetail = new PaymentAccountDetail();
paymentAccountDetail.setAccountNbr(sourceAccountingLine.getAccountNumber());
if (creditMemoDocType.equals(documentType)) {
lineAmount = lineAmount.negated();
}
paymentAccountDetail.setAccountNetAmount(sourceAccountingLine.getAmount());
paymentAccountDetail.setFinChartCode(sourceAccountingLine.getChartOfAccountsCode());
paymentAccountDetail.setFinObjectCode(sourceAccountingLine.getFinancialObjectCode());
paymentAccountDetail.setFinSubObjectCode(StringUtils.defaultIfEmpty(sourceAccountingLine.getFinancialSubObjectCode(), OLEConstants.getDashFinancialSubObjectCode()));
paymentAccountDetail.setOrgReferenceId(sourceAccountingLine.getOrganizationReferenceId());
paymentAccountDetail.setProjectCode(StringUtils.defaultIfEmpty(sourceAccountingLine.getProjectCode(), OLEConstants.getDashProjectCode()));
paymentAccountDetail.setSubAccountNbr(StringUtils.defaultIfEmpty(sourceAccountingLine.getSubAccountNumber(), OLEConstants.getDashSubAccountNumber()));
paymentDetail.addAccountDetail(paymentAccountDetail);
}
}
示例6: resetLaborLedgerUnitOfWork
import org.kuali.rice.core.api.util.type.KualiDecimal; //导入方法依赖的package包/类
/**
* Intialize the specified key fields of the labor ledger unit of work with the given origin entry
*
* @param laborOriginEntry the given origin entry
* @param keyFields the keys to which values will be assigned
*/
public void resetLaborLedgerUnitOfWork(LaborOriginEntry laborOriginEntry, List<String> keyFields) {
this.workingEntry = new LaborOriginEntry();
this.setKeyFields(keyFields);
if (laborOriginEntry != null) {
ObjectUtil.buildObject(workingEntry, laborOriginEntry, this.getKeyFields());
boolean creditIndicator = KFSConstants.GL_CREDIT_CODE.equals(laborOriginEntry.getTransactionDebitCreditCode());
KualiDecimal entryAmount = laborOriginEntry.getTransactionLedgerEntryAmount();
KualiDecimal unitAmount = creditIndicator ? entryAmount.negated() : entryAmount;
workingEntry.setTransactionLedgerEntryAmount(unitAmount);
workingEntry.setTransactionDebitCreditCode(laborOriginEntry.getTransactionDebitCreditCode());
numOfMember = 1;
}
}
示例7: addAccounts
import org.kuali.rice.core.api.util.type.KualiDecimal; //导入方法依赖的package包/类
/**
* Add accounts to a PDP Payment Detail
*
* @param accountsPayableDocument
* @param paymentDetail
* @param documentType
*/
protected void addAccounts(AccountsPayableDocument accountsPayableDocument, PaymentDetail paymentDetail, String documentType) {
String creditMemoDocType = getDataDictionaryService().getDocumentTypeNameByClass(VendorCreditMemoDocument.class);
List<SourceAccountingLine> sourceAccountingLines = purapAccountingService.generateSourceAccountsForVendorRemit(accountsPayableDocument);
for (SourceAccountingLine sourceAccountingLine : sourceAccountingLines) {
KualiDecimal lineAmount = sourceAccountingLine.getAmount();
PaymentAccountDetail paymentAccountDetail = new PaymentAccountDetail();
paymentAccountDetail.setAccountNbr(sourceAccountingLine.getAccountNumber());
if (creditMemoDocType.equals(documentType)) {
lineAmount = lineAmount.negated();
}
paymentAccountDetail.setAccountNetAmount(lineAmount);
paymentAccountDetail.setFinChartCode(sourceAccountingLine.getChartOfAccountsCode());
paymentAccountDetail.setFinObjectCode(sourceAccountingLine.getFinancialObjectCode());
paymentAccountDetail.setFinSubObjectCode(StringUtils.defaultIfEmpty(sourceAccountingLine.getFinancialSubObjectCode(),KFSConstants.getDashFinancialSubObjectCode()));
paymentAccountDetail.setOrgReferenceId(sourceAccountingLine.getOrganizationReferenceId());
paymentAccountDetail.setProjectCode(StringUtils.defaultIfEmpty(sourceAccountingLine.getProjectCode(),KFSConstants.getDashProjectCode()));
paymentAccountDetail.setSubAccountNbr(StringUtils.defaultIfEmpty(sourceAccountingLine.getSubAccountNumber(),KFSConstants.getDashSubAccountNumber()));
paymentDetail.addAccountDetail(paymentAccountDetail);
}
}
示例8: updateBalanceHistory
import org.kuali.rice.core.api.util.type.KualiDecimal; //导入方法依赖的package包/类
/**
* @see org.kuali.ole.gl.batch.service.BalancingService#updateBalanceHistory(org.kuali.ole.gl.businessobject.OriginEntryInformation)
* @see org.kuali.ole.gl.batch.service.impl.PostBalance#post(org.kuali.ole.gl.businessobject.Transaction, int, java.util.Date)
*/
@Override
public void updateBalanceHistory(Integer postMode, OriginEntryInformation originEntry) {
// TODO Retrieve and update 1 by 1? Is a HashMap or cache better so that storing only occurs once at the end?
OriginEntryFull originEntryFull = (OriginEntryFull) originEntry;
BalanceHistory balanceHistory = new BalanceHistory(originEntryFull);
BalanceHistory retrievedBalanceHistory = (BalanceHistory) businessObjectService.retrieve(balanceHistory);
if(ObjectUtils.isNotNull(retrievedBalanceHistory)) {
balanceHistory = retrievedBalanceHistory;
}
KualiDecimal amount = originEntryFull.getTransactionLedgerEntryAmount();
// Make sure the amount update properly recognized debit / credit logic. This is modeled after PostBalance#post
originEntryFull.refreshReferenceObject(OLEPropertyConstants.BALANCE_TYPE);
originEntryFull.refreshReferenceObject(OLEPropertyConstants.OBJECT_TYPE);
if (originEntryFull.getBalanceType().isFinancialOffsetGenerationIndicator()) {
if (!originEntryFull.getTransactionDebitCreditCode().equals(originEntryFull.getObjectType().getFinObjectTypeDebitcreditCd())) {
amount = amount.negated();
}
}
balanceHistory.addAmount(originEntryFull.getUniversityFiscalPeriodCode(), amount);
businessObjectService.save(balanceHistory);
}
示例9: negateAmountIfNecessary
import org.kuali.rice.core.api.util.type.KualiDecimal; //导入方法依赖的package包/类
/**
* Negates the amount of the internal departmental billing detail record if necessary. For this default implementation, if the
* balance type's offset indicator is yes and the object type has a debit indicator, then the amount is negated.
*
* @param collectorDetail the collector detail
* @param balanceTyp the balance type
* @param objectType the object type
* @param batch the patch to which the interDepartmentalBilling parameter belongs
*/
protected void negateAmountIfNecessary(CollectorDetail collectorDetail, BalanceType balanceTyp, ObjectType objectType, CollectorBatch batch) {
if (balanceTyp != null && objectType != null) {
if (balanceTyp.isFinancialOffsetGenerationIndicator()) {
if (OLEConstants.GL_DEBIT_CODE.equals(objectType.getFinObjectTypeDebitcreditCd())) {
KualiDecimal amount = collectorDetail.getCollectorDetailItemAmount();
amount = amount.negated();
collectorDetail.setCollectorDetailItemAmount(amount);
}
}
}
}
示例10: post
import org.kuali.rice.core.api.util.type.KualiDecimal; //导入方法依赖的package包/类
/**
* @see org.kuali.kfs.gl.batch.service.PostTransaction#post(org.kuali.kfs.gl.businessobject.Transaction, int, java.util.Date)
*/
public String post(Transaction transaction, int mode, Date postDate, ReportWriterService posterReportWriterService) {
String operationType = KFSConstants.OperationType.INSERT;
LedgerBalance ledgerBalance = new LedgerBalance((LaborTransaction) transaction);
// ObjectUtil.buildObject(ledgerBalance, transaction);
LedgerBalance tempLedgerBalance = laborAccountingCycleCachingService.getLedgerBalance(ledgerBalance);
if (ObjectUtils.isNotNull(tempLedgerBalance)) {
ledgerBalance = tempLedgerBalance;
operationType = KFSConstants.OperationType.UPDATE;
}
KualiDecimal amount = transaction.getTransactionLedgerEntryAmount();
if (transaction.getBalanceType().isFinancialOffsetGenerationIndicator()) {
if (!transaction.getTransactionDebitCreditCode().equals(transaction.getObjectType().getFinObjectTypeDebitcreditCd())) {
amount = amount.negated();
}
}
ledgerBalance.addAmount(transaction.getUniversityFiscalPeriodCode(), amount);
if (operationType.equals(KFSConstants.OperationType.INSERT)) {
laborAccountingCycleCachingService.insertLedgerBalance(ledgerBalance);
} else {
laborAccountingCycleCachingService.updateLedgerBalance(ledgerBalance);
}
return operationType;
}
示例11: updateBalanceHistory
import org.kuali.rice.core.api.util.type.KualiDecimal; //导入方法依赖的package包/类
/**
* @see org.kuali.kfs.gl.batch.service.BalancingService#updateBalanceHistory(org.kuali.kfs.gl.businessobject.OriginEntryInformation)
* @see org.kuali.kfs.module.ld.batch.service.impl.LaborPosterServiceImpl#updateLedgerBalance(org.kuali.kfs.gl.businessobject.Transaction, int, java.util.Date)
*/
@Override
public void updateBalanceHistory(Integer postMode, OriginEntryInformation originEntry) {
if(postMode == PosterService.MODE_ENTRIES){
// TODO Retrieve and update 1 by 1? Is a HashMap or cache better so that storing only occurs once at the end?
LaborOriginEntry laborOriginEntry = (LaborOriginEntry) originEntry;
LaborBalanceHistory ledgerBalanceHistory = new LaborBalanceHistory(laborOriginEntry);
LaborBalanceHistory retrievedLedgerBalanceHistory = (LaborBalanceHistory) businessObjectService.retrieve(ledgerBalanceHistory);
if(ObjectUtils.isNotNull(retrievedLedgerBalanceHistory)) {
ledgerBalanceHistory = retrievedLedgerBalanceHistory;
}
// Make sure the amount update properly recognized debit / credit logic. This is modeled after
// LaborPosterServiceImpl#updateLedgerBalance
KualiDecimal amount = laborOriginEntry.getTransactionLedgerEntryAmount();
laborOriginEntry.refreshReferenceObject(KFSPropertyConstants.BALANCE_TYPE);
laborOriginEntry.refreshReferenceObject(KFSPropertyConstants.OBJECT_TYPE);
if (laborOriginEntry.getBalanceType().isFinancialOffsetGenerationIndicator()) {
if (!laborOriginEntry.getTransactionDebitCreditCode().equals(laborOriginEntry.getObjectType().getFinObjectTypeDebitcreditCd())) {
amount = amount.negated();
}
}
ledgerBalanceHistory.addAmount(laborOriginEntry.getUniversityFiscalPeriodCode(), amount);
businessObjectService.save(ledgerBalanceHistory);
}
}
示例12: addAccountTransferAmount
import org.kuali.rice.core.api.util.type.KualiDecimal; //导入方法依赖的package包/类
/**
* Adds the line amount to the given map that contains the total transfer amount for the account and period.
*
* @param accountPeriodTransfer - map holding the total transfers
* @param effortReport - open report for transfer line
* @param transferLine - line with amount to add
*/
protected void addAccountTransferAmount(Map<String, KualiDecimal> accountPeriodTransfer, ExpenseTransferAccountingLine transferLine, EffortCertificationReport effortReport) {
String transferKey = StringUtils.join(new Object[] { transferLine.getPayrollEndDateFiscalYear(), transferLine.getPayrollEndDateFiscalPeriodCode(), transferLine.getChartOfAccountsCode(), transferLine.getAccountNumber(), effortReport.getUniversityFiscalYear()+ "-" + effortReport.getEffortCertificationReportNumber() }, ",");
KualiDecimal transferAmount = transferLine.getAmount().abs();
if (transferLine instanceof ExpenseTransferSourceAccountingLine) {
transferAmount = transferAmount.negated();
}
if (accountPeriodTransfer.containsKey(transferKey)) {
transferAmount = transferAmount.add(accountPeriodTransfer.get(transferKey));
}
accountPeriodTransfer.put(transferKey, transferAmount);
}
示例13: updateBalanceHistory
import org.kuali.rice.core.api.util.type.KualiDecimal; //导入方法依赖的package包/类
/**
* @see org.kuali.kfs.gl.batch.service.BalancingService#updateBalanceHistory(org.kuali.kfs.gl.businessobject.OriginEntryInformation)
* @see org.kuali.kfs.gl.batch.service.impl.PostBalance#post(org.kuali.kfs.gl.businessobject.Transaction, int, java.util.Date)
*/
@Override
public void updateBalanceHistory(Integer postMode, OriginEntryInformation originEntry) {
// TODO Retrieve and update 1 by 1? Is a HashMap or cache better so that storing only occurs once at the end?
OriginEntryFull originEntryFull = (OriginEntryFull) originEntry;
BalanceHistory balanceHistory = new BalanceHistory(originEntryFull);
BalanceHistory retrievedBalanceHistory = (BalanceHistory) businessObjectService.retrieve(balanceHistory);
if(ObjectUtils.isNotNull(retrievedBalanceHistory)) {
balanceHistory = retrievedBalanceHistory;
}
KualiDecimal amount = originEntryFull.getTransactionLedgerEntryAmount();
// Make sure the amount update properly recognized debit / credit logic. This is modeled after PostBalance#post
originEntryFull.refreshReferenceObject(KFSPropertyConstants.BALANCE_TYPE);
originEntryFull.refreshReferenceObject(KFSPropertyConstants.OBJECT_TYPE);
if (originEntryFull.getBalanceType().isFinancialOffsetGenerationIndicator()) {
if (!originEntryFull.getTransactionDebitCreditCode().equals(originEntryFull.getObjectType().getFinObjectTypeDebitcreditCd())) {
amount = amount.negated();
}
}
balanceHistory.addAmount(originEntryFull.getUniversityFiscalPeriodCode(), amount);
businessObjectService.save(balanceHistory);
}
示例14: negateAmountIfNecessary
import org.kuali.rice.core.api.util.type.KualiDecimal; //导入方法依赖的package包/类
/**
* Negates the amount of the internal departmental billing detail record if necessary. For this default implementation, if the
* balance type's offset indicator is yes and the object type has a debit indicator, then the amount is negated.
*
* @param collectorDetail the collector detail
* @param balanceTyp the balance type
* @param objectType the object type
* @param batch the patch to which the interDepartmentalBilling parameter belongs
*/
protected void negateAmountIfNecessary(CollectorDetail collectorDetail, BalanceType balanceTyp, ObjectType objectType, CollectorBatch batch) {
if (balanceTyp != null && objectType != null) {
if (balanceTyp.isFinancialOffsetGenerationIndicator()) {
if (KFSConstants.GL_DEBIT_CODE.equals(objectType.getFinObjectTypeDebitcreditCd())) {
KualiDecimal amount = collectorDetail.getCollectorDetailItemAmount();
amount = amount.negated();
collectorDetail.setCollectorDetailItemAmount(amount);
}
}
}
}
示例15: computePayment
import org.kuali.rice.core.api.util.type.KualiDecimal; //导入方法依赖的package包/类
public KualiDecimal computePayment() {
KualiDecimal absAmount = getTransactionLedgerEntryAmount();
if (absAmount == null) {
return null;
}
return KFSConstants.GL_CREDIT_CODE.equals(getTransactionDebitCreditCode()) ? absAmount.negated() : absAmount;
}