If I take the follow steps:
1) Go to: Project management and accounting --> Project Invoices --> Project Invoices
2) find a project invoice that has a negative invoice amount
3) Click on the Invoice Id (which takes you to the invoice journal)
4) Look in the invoice transactions for the sales Id
In this scenario, the sales id is never populated for negative invoice amounts.
I added code to fix this, but not sure why the default system excludes the sales Id from return orders.
Does anybody know why