on 07-25-2023 12:21 PM
Hi All
How to edit his Query to show T0.[TrsfrAcct] Account Name in addition to T4.ACCTCODE, T4.ACCTNAME?
SELECT T0.[DocNum] AS 'Receipt No#', T0.[TransId] AS 'Transction #', T1.[DocEntry] AS 'Document No', T0.[Address],
CASE WHEN T1.[InvType] = 18 then 'IN'
WHEN T1.[InvType] = 19 then 'CN'
END As 'Document Type', T3.Docdate AS 'Document Date',
T1.[SumApplied] AS 'Total Payment',T0.[DocDate] AS 'Posting Date', T0.[CardName] As Customer, T4.ACCTCODE, T4.ACCTNAME,T4.[Descrip], T0.[TrsfrAcct], T2.[CreditAcct] AS 'GL Account',T4.SumApplied,T4.VatAmnt,
T0.[JrnlMemo] AS 'Details 2', T0.[DocTotal] AS 'Document total'
FROM
OVPM T0 LEFT JOIN VPM2 T1 ON T0.[DocEntry] = T1.[DocNum]
LEFT JOIN VPM3 T2 ON T0.[DocEntry] = T2.[DocNum]
LEFT JOIN OPCH T3 ON T3. Docentry= T1.Docentry
LEFT JOIN VPM4 T4 ON T4.DocNum=T0.DocEntry
WHERE T0.Docdate between [%0] and [%1] AND T0.Canceled = 'N'
Hi Jitin
How about I need the Expense GL Accounts Code Name as well?
Kedalene
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Check this:
SELECT T0.[DocNum] AS 'Receipt No#', T0.[TransId] AS 'Transction #', T1.[DocEntry] AS 'Document No', T0.[Address],
CASE WHEN T1.[InvType] = 18 then 'IN'
WHEN T1.[InvType] = 19 then 'CN'
END As 'Document Type', T3.Docdate AS 'Document Date',
T1.[SumApplied] AS 'Total Payment',T0.[DocDate] AS 'Posting Date', T0.[CardName] As Customer,
T5.AcctCode, T5.AcctName,T4.[Descrip], T0.[TrsfrAcct], T2.[CreditAcct] AS 'GL Account',T4.SumApplied,T4.VatAmnt,
T0.[JrnlMemo] AS 'Details 2', T0.[DocTotal] AS 'Document total'
FROM
OVPM T0 LEFT JOIN VPM2 T1 ON T0.[DocEntry] = T1.[DocNum]
INNER JOIN OACT T5 ON T5.Acctcode = T0.TrsfrAcct
LEFT JOIN VPM3 T2 ON T0.[DocEntry] = T2.[DocNum]
LEFT JOIN OPCH T3 ON T3. Docentry= T1.Docentry
LEFT JOIN VPM4 T4 ON T4.DocNum=T0.DocEntry
WHERE T0.Docdate between [%0] and [%1] AND T0.Canceled = 'N'
Kr,
Jitin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
104 | |
14 | |
10 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 | |
2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.