steps to reproduce in Garden World:
Create Invoice Customer with payment term: 50% Immediate - 50% in 30 days (or other payment term with schedule)
Create some lines
Run Invoice Not Realized Gain/Loss and fill the params with (for testing purpose only):
Accounting Schema: GardenWorld US/A/US Dollar
Revaluation Conversion Type: Spot
Revaluation Date: today
AP - AR: Receivables only
Include All Currencies: Yes
Revaluation Document Type: Blank
Your invoice with payment schedule is not displayed in the report
The problem is C_Invoice_v will break down the invoice's grandtotal based on payment schedule so it fails to fulfill the condition in Line 144
I just change the C_Invoice_v to C_Invoice and now it works.
The issue is reproducible.
The solution suggested by doesn't work because the view C_Invoice_V also changes the sign of the GrandTotal depending on Sales/Purchase.
I found some other bugs when testing this and committed pull request 225