The join make non sense.
DocNum on ORCT and RCT2 can be joined
OINV joined with RCT2 should be something like
OINV.DocEntry = RCT2.DocEntry and RCT2.InvType = 13
The join make non sense.
DocNum on ORCT and RCT2 can be joined
OINV joined with RCT2 should be something like
OINV.DocEntry = RCT2.DocEntry and RCT2.InvType = 13