org.kuali.kfs.module.ar.document.validation.impl
Class PaymentApplicationDocumentRuleUtil

java.lang.Object
  extended by org.kuali.kfs.module.ar.document.validation.impl.PaymentApplicationDocumentRuleUtil

public class PaymentApplicationDocumentRuleUtil
extends Object


Constructor Summary
PaymentApplicationDocumentRuleUtil()
           
 
Method Summary
static boolean validateAllAmounts(PaymentApplicationDocument applicationDocument, List<CustomerInvoiceDetail> invoiceDetails, NonInvoiced newNonInvoiced, org.kuali.rice.kns.util.KualiDecimal totalFromControl)
           
static boolean validateAmountAppliedToCustomerInvoiceDetailByPaymentApplicationDocument(CustomerInvoiceDetail customerInvoiceDetail, PaymentApplicationDocument paymentApplicationDocument, org.kuali.rice.kns.util.KualiDecimal totalFromControl)
           
static boolean validateApplieds(List<CustomerInvoiceDetail> customerInvoiceDetails, PaymentApplicationDocument paymentAplicationDocument, org.kuali.rice.kns.util.KualiDecimal totalFromControl)
          This method determines whether or not the amount to be applied to an invoice is acceptable.
static boolean validateCumulativeSumOfInvoicePaidAppliedDoesntExceedCashControlTotal(PaymentApplicationDocument paymentApplicationDocument)
          The sum of invoice paid applied amounts cannot exceed the cash control total amount
static boolean validateCumulativeSumOfInvoicePaidAppliedsIsGreaterThanOrEqualToZero(PaymentApplicationDocument paymentApplicationDocument)
          The sum of invoice paid applied amounts cannot be less than zero.
static boolean validateInvoicePaidApplied(InvoicePaidApplied invoicePaidApplied, String fieldName, org.kuali.rice.kns.util.KualiDecimal totalFromControl)
          This method checks that an invoice paid applied is for a valid amount.
static boolean validateNonAppliedHolding(PaymentApplicationDocument applicationDocument, org.kuali.rice.kns.util.KualiDecimal totalFromControl)
          This method validates the unapplied attribute of the document.
static boolean validateNonInvoiced(NonInvoiced nonInvoiced, PaymentApplicationDocument paymentApplicationDocument, org.kuali.rice.kns.util.KualiDecimal totalFromControl)
          Validate non-ar/non-invoice line items on a PaymentApplicationDocument.
static boolean validateNonInvoicedAmountDoesntExceedCashControlTotal(PaymentApplicationDocument paymentApplicationDocument)
          The sum of non invoiceds must be less than or equal to the cash control total amount
static boolean validateNonInvoicedAmountIsGreaterThanOrEqualToZero(PaymentApplicationDocument paymentApplicationDocument)
          The unapplied amount can't be negative
static boolean validateUnappliedAmountDoesntExceedCashControlTotal(PaymentApplicationDocument paymentApplicationDocument)
          The unapplied amount must be less than or equal to the cash control total amount
static boolean validateUnappliedAmountIsGreaterThanOrEqualToZero(PaymentApplicationDocument paymentApplicationDocument)
          The unapplied amount can't be negative
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PaymentApplicationDocumentRuleUtil

public PaymentApplicationDocumentRuleUtil()
Method Detail

validateAllAmounts

public static boolean validateAllAmounts(PaymentApplicationDocument applicationDocument,
                                         List<CustomerInvoiceDetail> invoiceDetails,
                                         NonInvoiced newNonInvoiced,
                                         org.kuali.rice.kns.util.KualiDecimal totalFromControl)
                                  throws org.kuali.rice.kew.exception.WorkflowException
Throws:
org.kuali.rice.kew.exception.WorkflowException

validateInvoicePaidApplied

public static boolean validateInvoicePaidApplied(InvoicePaidApplied invoicePaidApplied,
                                                 String fieldName,
                                                 org.kuali.rice.kns.util.KualiDecimal totalFromControl)
This method checks that an invoice paid applied is for a valid amount.

Parameters:
invoicePaidApplied -
Returns:

validateCumulativeSumOfInvoicePaidAppliedDoesntExceedCashControlTotal

public static boolean validateCumulativeSumOfInvoicePaidAppliedDoesntExceedCashControlTotal(PaymentApplicationDocument paymentApplicationDocument)
                                                                                     throws org.kuali.rice.kew.exception.WorkflowException
The sum of invoice paid applied amounts cannot exceed the cash control total amount

Parameters:
paymentApplicationDocument -
Returns:
Throws:
org.kuali.rice.kew.exception.WorkflowException

validateCumulativeSumOfInvoicePaidAppliedsIsGreaterThanOrEqualToZero

public static boolean validateCumulativeSumOfInvoicePaidAppliedsIsGreaterThanOrEqualToZero(PaymentApplicationDocument paymentApplicationDocument)
                                                                                    throws org.kuali.rice.kew.exception.WorkflowException
The sum of invoice paid applied amounts cannot be less than zero.

Parameters:
paymentApplicationDocument -
Returns:
Throws:
org.kuali.rice.kew.exception.WorkflowException

validateNonInvoicedAmountDoesntExceedCashControlTotal

public static boolean validateNonInvoicedAmountDoesntExceedCashControlTotal(PaymentApplicationDocument paymentApplicationDocument)
                                                                     throws org.kuali.rice.kew.exception.WorkflowException
The sum of non invoiceds must be less than or equal to the cash control total amount

Parameters:
paymentApplicationDocument -
Returns:
Throws:
org.kuali.rice.kew.exception.WorkflowException

validateNonInvoicedAmountIsGreaterThanOrEqualToZero

public static boolean validateNonInvoicedAmountIsGreaterThanOrEqualToZero(PaymentApplicationDocument paymentApplicationDocument)
                                                                   throws org.kuali.rice.kew.exception.WorkflowException
The unapplied amount can't be negative

Parameters:
paymentApplicationDocument -
Returns:
Throws:
org.kuali.rice.kew.exception.WorkflowException

validateUnappliedAmountDoesntExceedCashControlTotal

public static boolean validateUnappliedAmountDoesntExceedCashControlTotal(PaymentApplicationDocument paymentApplicationDocument)
                                                                   throws org.kuali.rice.kew.exception.WorkflowException
The unapplied amount must be less than or equal to the cash control total amount

Parameters:
paymentApplicationDocument -
Returns:
Throws:
org.kuali.rice.kew.exception.WorkflowException

validateUnappliedAmountIsGreaterThanOrEqualToZero

public static boolean validateUnappliedAmountIsGreaterThanOrEqualToZero(PaymentApplicationDocument paymentApplicationDocument)
                                                                 throws org.kuali.rice.kew.exception.WorkflowException
The unapplied amount can't be negative

Parameters:
paymentApplicationDocument -
Returns:
Throws:
org.kuali.rice.kew.exception.WorkflowException

validateNonInvoiced

public static boolean validateNonInvoiced(NonInvoiced nonInvoiced,
                                          PaymentApplicationDocument paymentApplicationDocument,
                                          org.kuali.rice.kns.util.KualiDecimal totalFromControl)
                                   throws org.kuali.rice.kew.exception.WorkflowException
Validate non-ar/non-invoice line items on a PaymentApplicationDocument.

Parameters:
nonInvoiced -
Returns:
Throws:
org.kuali.rice.kew.exception.WorkflowException

validateApplieds

public static boolean validateApplieds(List<CustomerInvoiceDetail> customerInvoiceDetails,
                                       PaymentApplicationDocument paymentAplicationDocument,
                                       org.kuali.rice.kns.util.KualiDecimal totalFromControl)
                                throws org.kuali.rice.kew.exception.WorkflowException
This method determines whether or not the amount to be applied to an invoice is acceptable.

Parameters:
customerInvoiceDetails -
Returns:
Throws:
org.kuali.rice.kew.exception.WorkflowException

validateAmountAppliedToCustomerInvoiceDetailByPaymentApplicationDocument

public static boolean validateAmountAppliedToCustomerInvoiceDetailByPaymentApplicationDocument(CustomerInvoiceDetail customerInvoiceDetail,
                                                                                               PaymentApplicationDocument paymentApplicationDocument,
                                                                                               org.kuali.rice.kns.util.KualiDecimal totalFromControl)
                                                                                        throws org.kuali.rice.kew.exception.WorkflowException
Parameters:
customerInvoiceDetail -
paymentApplicationDocument -
Returns:
Throws:
org.kuali.rice.kew.exception.WorkflowException

validateNonAppliedHolding

public static boolean validateNonAppliedHolding(PaymentApplicationDocument applicationDocument,
                                                org.kuali.rice.kns.util.KualiDecimal totalFromControl)
                                         throws org.kuali.rice.kew.exception.WorkflowException
This method validates the unapplied attribute of the document.

Parameters:
document -
Returns:
Throws:
org.kuali.rice.kew.exception.WorkflowException


Copyright © 2005-2012 The Kuali Foundation. All Rights Reserved.