I have 2 rules
this rule in in my Invoice BO which work fine.(WORKING)
Invoice.PaymentsRecieved=SUM Payment.PaymentAmount WHERE (Invoice IN Payment.myInvoice)
This rule update the Invoice PaymentRecieved when I edit a Payment (NOT WORKING)
Payment.myInvoice.PaymentsRecieved=SUM Payment.PaymentAmount WHERE (Payment IN Payment.myInvoice)
But it does not calculate properly.
I want to put this rule under the Payment BO so when ever a Payment is made it will update the Invoice BO.
Currently I have this rule in the InvoiceBO that execute when ever I Create a New Payment from an Invoice (which is a rule that pick the invoiceID and apply the payment to it.)
Invoice.PaymentsRecieved=SUM Payment.PaymentAmount WHERE (Invoice IN Payment.myInvoice)
The Edit Payment just edit a Payment but it does not update the Total Payment Properly.
Please Help.
Leo