checkInvoicePaymentApplications will let a Payment which is not PAID cause 
invoice to be PAID
---------------------------------------------------------------------------------------------

                 Key: OFBIZ-446
                 URL: http://issues.apache.org/jira/browse/OFBIZ-446
             Project: OFBiz (The Open for Business Project)
          Issue Type: Bug
          Components: accounting
            Reporter: Si Chen


When you apply a payment to an invoice, 
InvoiceServices.checkInvoicePaymentApplications will a Payment which is not 
PAID cause invoice to be PAID because all it does is look up PaymentApplication 
against the invoice, without regard to the payment's status:

            paymentAppl = delegator.findByAnd("PaymentApplication", 
UtilMisc.toMap("invoiceId", invoiceId));

It needs to consider only SENT or RECEIVED Payments, depending on whether it's 
a Disbursement or Receipt.

Then, when Payment status is changed to SENT or RECEIVED, the 
checkPaymentInvoices service needs to be called.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to