use of org.kuali.kfs.module.purap.businessobject.ItemType in project cu-kfs by CU-CommunityApps.
the class PurchaseOrderDocument method getTotalPreTaxDollarAmount.
/**
* Gets the pre tax total dollar amount for this Purchase Order.
*
* @param includeInactive indicates whether inactive items shall be included.
* @param includeBelowTheLine indicates whether below the line items shall be included.
* @return the total dollar amount for this Purchase Order.
*/
public KualiDecimal getTotalPreTaxDollarAmount(boolean includeInactive, boolean includeBelowTheLine) {
KualiDecimal total = new KualiDecimal(BigDecimal.ZERO);
for (PurchaseOrderItem item : (List<PurchaseOrderItem>) getItems()) {
ItemType it = item.getItemType();
if ((includeBelowTheLine || it.isLineItemIndicator()) && (includeInactive || item.isItemActiveIndicator())) {
KualiDecimal extendedPrice = item.getExtendedPrice();
KualiDecimal itemTotal = (extendedPrice != null) ? extendedPrice : KualiDecimal.ZERO;
total = total.add(itemTotal);
}
}
return total;
}
use of org.kuali.kfs.module.purap.businessobject.ItemType in project cu-kfs by CU-CommunityApps.
the class PurchasingAccountsPayableDocumentBase method getTotalDollarAmountWithExclusionsSubsetItems.
/**
* This method...
*
* @param excludedTypes
* @param includeBelowTheLine
* @param itemsForTotal
* @return
*/
protected KualiDecimal getTotalDollarAmountWithExclusionsSubsetItems(String[] excludedTypes, boolean includeBelowTheLine, List<PurApItem> itemsForTotal) {
if (excludedTypes == null) {
excludedTypes = new String[] {};
}
KualiDecimal total = new KualiDecimal(BigDecimal.ZERO);
for (PurApItem item : itemsForTotal) {
item.refreshReferenceObject(PurapPropertyConstants.ITEM_TYPE);
ItemType it = item.getItemType();
if ((includeBelowTheLine || it.isLineItemIndicator()) && !ArrayUtils.contains(excludedTypes, it.getItemTypeCode())) {
KualiDecimal totalAmount = item.getTotalAmount();
KualiDecimal itemTotal = (totalAmount != null) ? totalAmount : KualiDecimal.ZERO;
total = total.add(itemTotal);
}
}
return total;
}
use of org.kuali.kfs.module.purap.businessobject.ItemType in project cu-kfs by CU-CommunityApps.
the class PurchaseOrderDocument method getTotalDollarAmount.
/**
* Gets the total dollar amount for this Purchase Order.
*
* @param includeInactive indicates whether inactive items shall be included.
* @param includeBelowTheLine indicates whether below the line items shall be included.
* @return the total dollar amount for this Purchase Order.
*/
public KualiDecimal getTotalDollarAmount(boolean includeInactive, boolean includeBelowTheLine) {
KualiDecimal total = new KualiDecimal(BigDecimal.ZERO);
for (PurApItem item : (List<PurApItem>) getItems()) {
if (item.getPurapDocument() == null) {
item.setPurapDocument(this);
}
ItemType it = item.getItemType();
if ((includeBelowTheLine || it.isLineItemIndicator()) && (includeInactive || PurApItemUtils.checkItemActive(item))) {
KualiDecimal totalAmount = item.getTotalAmount();
KualiDecimal itemTotal = (totalAmount != null) ? totalAmount : KualiDecimal.ZERO;
total = total.add(itemTotal);
}
}
return total;
}
use of org.kuali.kfs.module.purap.businessobject.ItemType in project cu-kfs by CU-CommunityApps.
the class PurchaseOrderDocument method getTotalTaxAmount.
/**
* Gets the tax total amount for this Purchase Order.
*
* @param includeInactive indicates whether inactive items shall be included.
* @param includeBelowTheLine indicates whether below the line items shall be included.
* @return the total dollar amount for this Purchase Order.
*/
public KualiDecimal getTotalTaxAmount(boolean includeInactive, boolean includeBelowTheLine) {
KualiDecimal total = new KualiDecimal(BigDecimal.ZERO);
for (PurchaseOrderItem item : (List<PurchaseOrderItem>) getItems()) {
ItemType it = item.getItemType();
if ((includeBelowTheLine || it.isLineItemIndicator()) && (includeInactive || item.isItemActiveIndicator())) {
KualiDecimal taxAmount = item.getItemTaxAmount();
KualiDecimal itemTotal = (taxAmount != null) ? taxAmount : KualiDecimal.ZERO;
total = total.add(itemTotal);
}
}
return total;
}
use of org.kuali.kfs.module.purap.businessobject.ItemType in project cu-kfs by CU-CommunityApps.
the class PurchasingAccountsPayableDocumentBase method getTotalTaxAmountWithExclusions.
@Override
public KualiDecimal getTotalTaxAmountWithExclusions(String[] excludedTypes, boolean includeBelowTheLine) {
if (excludedTypes == null) {
excludedTypes = new String[] {};
}
KualiDecimal total = new KualiDecimal(BigDecimal.ZERO);
for (PurApItem item : (List<PurApItem>) getItems()) {
item.refreshReferenceObject(PurapPropertyConstants.ITEM_TYPE);
ItemType it = item.getItemType();
if ((includeBelowTheLine || it.isLineItemIndicator()) && !ArrayUtils.contains(excludedTypes, it.getItemTypeCode())) {
KualiDecimal taxAmount = item.getItemTaxAmount();
KualiDecimal itemTotal = (taxAmount != null) ? taxAmount : KualiDecimal.ZERO;
total = total.add(itemTotal);
}
}
return total;
}
Aggregations