Hi,
This query works and get the related receipt line from an invoice line, but it seems that only works with lines type=2, which triggered the item ledger entry and value entry table's line, and what about the rest? Do you know any other structure link for those types?
Really, I couldn’t believe such difficulties and workaround just to get this basic information, in my opinion with easy design solutions like adding two columns (document no_ and line no_) to either Purchase Receipt or Invoice line table, or maybe I’m not aware of the problem.
Best regards,
Abedul53