Hello everyone - I'm currently running a search to retrieve some data regarding invoices, the issue I'm facing is when trying to retrieve the payment amount of an invoice. If the payment applied to that invoice also has another invoice applied to it, it will retrieve the sum of both lines instead of the corresponding amount. this is the way I'm trying to achieve it:
How can I fix it?