Search in sources :

Example 6 with ElectronicInvoiceItemHolder

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;
}
Also used : ElectronicInvoiceItemHolder(org.kuali.kfs.module.purap.service.impl.ElectronicInvoiceItemHolder) BigDecimal(java.math.BigDecimal)

Aggregations

ElectronicInvoiceItemHolder (org.kuali.kfs.module.purap.service.impl.ElectronicInvoiceItemHolder)6 KualiDecimal (org.kuali.rice.core.api.util.type.KualiDecimal)4 PaymentRequestItem (org.kuali.kfs.module.purap.businessobject.PaymentRequestItem)2 CuPaymentRequestItemExtension (edu.cornell.kfs.module.purap.businessobject.CuPaymentRequestItemExtension)1 CuPaymentRequestDocument (edu.cornell.kfs.module.purap.document.CuPaymentRequestDocument)1 VendorDetailExtension (edu.cornell.kfs.vnd.businessobject.VendorDetailExtension)1 FileNotFoundException (java.io.FileNotFoundException)1 IOException (java.io.IOException)1 Serializable (java.io.Serializable)1 BigDecimal (java.math.BigDecimal)1 RemoteException (java.rmi.RemoteException)1 ArrayList (java.util.ArrayList)1 HashMap (java.util.HashMap)1 HashSet (java.util.HashSet)1 Set (java.util.Set)1 ValidationException (org.kuali.kfs.krad.exception.ValidationException)1 DocumentService (org.kuali.kfs.krad.service.DocumentService)1 KualiRuleService (org.kuali.kfs.krad.service.KualiRuleService)1 WorkflowDocumentService (org.kuali.kfs.krad.workflow.service.WorkflowDocumentService)1 ElectronicInvoiceRejectReason (org.kuali.kfs.module.purap.businessobject.ElectronicInvoiceRejectReason)1