I'm attempting to write a report that contains the purchased quantity on Purchase Invoices, but I'm running into an issue where the definition of "quantity" really means [What's on the Purchase Invoice] - [What has been subtracted due to a Purchase Credit Memo].
You can make a Purchase Credit memo using lines pulled directly from a Purchase Invoice, and there's a relationship there in the "Applies-to Doc_ No_" field on the Purchase Credit Memo Header which contains the Purchase Invoice Number, but there's no way to tell what lines it is actually pulling from the PI and putting on the Invoice. If every line had a unique identifier, that's not too bad of a problem, but unfortunately my company may have the same item number across multiple lines with no unique identifier. I'm relying on NAV tracking a unique identifier in the PCM lines (i.e. Line number from the PI source doc) but there does not appear to be one.
Does anyone have any idea how I can find a link between the lines on a Purchase Invoice to the lines on a Purchase Credit Memo?