Skip to Content
0
Former Member
May 28, 2008 at 06:49 AM

Outgoing excise invoice

16 Views

I want to find the outgoing excise invoice no. for goods return.For this I have used following query,

SELECT OOEI.DocNum FROM OOEI INNER JOIN OEI1 ON OOEI.DocEntry = OEI1.DocEntry

inner join orpd on orpd.docnum=OEI1.BaseRef

where orpd.docnum=20

In the above query 20 is the docnum of goods return.

The above query returned two values i.e 8,150. 150 is the correct value of outgoing excise invoice. The other value i.e 8 is created for delivery.

In the table OOEI, I am not able to differentiate delivery and goods return.