use of org.kuali.kfs.module.purap.service.impl.ElectronicInvoiceItemHolder in project cu-kfs by CU-CommunityApps.
the class CuElectronicInvoiceMatchingServiceImpl method getItemTotalAmount.
// KFSPTS-1719,KFSUPGRADE-485
// trying to get the total inv amount for this poline
private BigDecimal getItemTotalAmount(ElectronicInvoiceItemHolder itemHolder) {
BigDecimal totalAmount = new BigDecimal(0);
Integer lineItemNumber = itemHolder.getInvoiceItemLineNumber();
if (lineItemNumber != null) {
for (ElectronicInvoiceItemHolder item : itemHolder.getInvoiceOrderHolder().getItems()) {
if (item.getInvoiceItemLineNumber() != null && item.getInvoiceItemLineNumber().equals(lineItemNumber)) {
totalAmount = totalAmount.add(item.getInvoiceItemSubTotalAmount());
}
}
}
return totalAmount;
}
Aggregations