574 Apply Amount (APPTOAMT) + Discount Taken Amount (DISTKNAM) + Write Off (WROFAMNT) is > then the amount remaining on the invoice
Sometimes you will get this error when you are calling the eConnect method taRMApply , this issue could occur if your trying to apply amount grater than the remaining amount of an invoice.
System will sum the applied amount , Discount Taken Amount and Write Off amount which been pass to the taRMApply method and compare it with the remaining invoice amount (CURTRXAM) in the RM Open table (RM20101), if the sum > the remaining invoice amount system will throw eConnect error 574.
This issue will not occur in Microsoft Dynamics GP , because if you try to apply cash document which has amount grater than the remaining invoice amount, GP system will partially apply the cash receipt amount . e.g. if the invoice amount was 400 USD and the remaining amount 100 USD and you applied 500 USD cash receipt , GP will apply 100 USD to the invoice and the cash receipt will have remaining 400 USD can be applied to other invoices. If you try the same scenario above with eConnect system will through an error "Apply Amount (APPTOAMT) + Discount Taken Amount…..." to work around this issue you need to use the following logic:
Before apply the cash receipt amount to an invoice , you need to compare the invoice remaining amount with cash amount.
If the cash amount >= remaining invoice amount then
applied amount =remaining invoice amount
Else
applied amount =invoice amount
End IF
