Skip to Content
0
Jul 20, 2019 at 12:38 PM

Need to add sales employee connect with concern document

100 Views

select OJDT.RefDate, JDT1.Account,OACT.AcctName,
CASE WHEN  OJDT.TransType = 1 THEN ''
WHEN  OJDT.TransType = 13 THEN 'A/R Invoic'
WHEN  OJDT.TransType = 14 THEN 'A/R CR Note'
WHEN  OJDT.TransType = 15 THEN 'Delivery'
WHEN  OJDT.TransType = 16 THEN 'Sales Return'																							
WHEN  OJDT.TransType = 18 THEN 'A/P Invoice'
WHEN  OJDT.TransType = 19 THEN 'A/P Credit Note'
WHEN  OJDT.TransType = 20 THEN 'GRN'
WHEN  OJDT.TransType = 21 THEN 'Goods Retrun'
WHEN  OJDT.TransType = 24 THEN 'Incoming Payment'
WHEN  OJDT.TransType = 30 THEN 'Journal Entry'
WHEN  OJDT.TransType = 46 THEN 'Outgoing Payment'
WHEN  OJDT.TransType = 59 THEN 'Goods Receipt'
WHEN  OJDT.TransType = 60 THEN 'Goods Issue'
WHEN  OJDT.TransType = 69 THEN 'Landed Cost'
WHEN  OJDT.TransType = 132 THEN 'A/R Correction Invoice'
WHEN  OJDT.TransType = 163 THEN 'A/P Correction Invoice'
WHEN  OJDT.TransType = 164 THEN 'A/P Correction Invoie Reversal'
WHEN  OJDT.TransType = 165 THEN 'A/R Correction Invoice'
WHEN  OJDT.TransType = 136 THEN 'A/R Correction Invoice Reversal'
WHEN  OJDT.TransType = 203 THEN 'A/R Down Payment'
WHEN  OJDT.TransType = 204 THEN 'A/P Down Payment'


ELSE 'NULLVALUE' END AS 'Document Type',
OJDT.BaseRef,OCRD.CardName,ocrd.CardCode,JDT1.Debit,JDT1.Credit,JDT1.ProfitCode from JDT1
inner join OJDT on JDT1.TransId = OJDT.TransId
left outer join ocrd on JDT1.ContraAct = OCRD.CardCode
Left outer join OACT ON JDT1.Account = OACT.AcctCode
Order by OJDT.RefDate asc


Dear Experts

I had created a query over sql, i need a help from the experts , i need to include Sales employee against each document which connected with the document

Pls could any one help my by editing the sql query, i try all my level, i could not Complete sucessfully

Regards

Vinod