Try:
SELECT T0.[DocNum], T0.[DocDate], T0.[CardCode], T0.[CardName], T1.[ItemCode], T1.[Dscription], T1.[Quantity], T0.[VatSum] - T3.[VatSum], T0.[DocTotal] - T3.[DocTotal] FROM OPCH T0 INNER JOIN PCH1 T1 ON T0.DocEntry = T1.DocEntry left join RPC1 T2 on T2.[BaseEntry] = T1.docentry and T2.[BaseLine] = T1.[LineNum] INNER JOIN ORPC T3 ON T2.DocEntry = T3.DocEntry WHERE T0.[DocDate] between [%0] and [%1]