Skip to Content
0
Jun 11, 2018 at 01:13 PM

i want to display AP Downpaymnet advices and AP Invoices list

73 Views Last edit Jun 12, 2018 at 07:54 AM 2 rev

Hi to all

i wrote Query but i'm logic is missed

SELECT distinct T0.[DocNum] [DT NO], T0.[DocDate],T1.[Project], T3.[CardCode], T3.[CardName], T1.[TaxCode],T1.[VatSum], T3.[DocNum] [INV NO],T3.[DocDate], T3.[DocTotal] [INV TOTAL], (T1.[Quantity] * T1.[PriceBefDi] ) [DT TOTAL], T2.[DrawnSum] [DPT Amt Hold INV],
((T1.[Quantity] * T1.[PriceBefDi] )-T2.[DrawnSum]) [DPT DUE FOR INV]

FROM ODPO T0 INNER JOIN DPO1 T1 ON T0.[DocEntry] = T1.[DocEntry] INNER JOIN PCH9 T2 ON T0.[DocEntry] = T2.[BaseAbs] INNER JOIN OPCH T3 ON T2.[DocEntry] = T3.[DocEntry] INNER JOIN PCH1 T4 ON T3.[DocEntry] = T4.[DocEntry] WHERE T0.[DocDate]>=[%1] AND T0.[DocDate] <=[%2]

In that above Query O/P which i hold on apinvoice list only came . but i want to display bot ap down payment select or not also has to come

.....my require ment is i want display Ap Down payment advice against ap invoice list and ap down payment list on selection is Ap down payment date ...

Thanks for advance help