Hi Sarle,
You can join the OIBT, IBT1 (Batches) and OSRI, SRI1 (Serial Numbers) tables into OITM table to get the transaction report.
Outgoing batches and serials are stored in the IBT1 and SRI1 tables, so it is enought to join them into the OINM view (table)
If the items by Delivery note. In this case the delivery note is the key for the serials/batches transaction report. You may create a short development for displaying them in the invoice.
You may read the following blog to understand the basic queries and use them in practice
/people/janos.nagy/blog/2010/06/18/displaying-serial-numbers-batch-details-on-invoice-part-ii
Bacthes related to Invoices
SELECT T0.[BatchNum] , T1.[Quantity] , case when T0.[ExpDate] is null then '' else convert(nvarchar,T0.[ExpDate],102) end, T2.CodeBars FROM OIBT T0 INNER JOIN IBT1 T1 ON T0.ItemCode = T1.ItemCode and T0.WhsCode = T1.WhsCode and T0.BatchNUm = T1.BatchNum inner join OITM T2 on T0.ItemCode = T2.ItemCode
WHERE T1.[BaseType] = '13'
Serial numbers:
SELECT T0.[IntrSerial], T2.CodeBars FROM OSRI T0 INNER JOIN SRI1 T1 ON T0.ItemCode = T1.ItemCode and T0.SysSerial = T1.SysSerial inner join OITM T2 on T0.ItemCode = T2.ItemCode WHERE T1.[BaseType] = '13'
Regards
Rgds,
Kamlesh Naware